Skip to main content

Lighthouse Package

Terminal UI for local development management

The @serverless-monolith/lighthouse package provides an interactive terminal user interface (TUI) for managing your Serverless Monolith development environment.

Installation

pnpm add @serverless-monolith/lighthouse

Features

  • Interactive TUI: Beautiful terminal interface built with React and Ink
  • Process Management: Start, stop, and restart your services
  • Bruno Integration: Execute API requests from Bruno collections
  • Real-time Logs: Stream logs from all running processes
  • Dashboards: Monitor status, queues, and metrics
  • Keyboard Shortcuts: Efficient navigation and control

Quick Start

Create Configuration

// lighthouse.config.ts
import { defineLighthouseConfig } from '@serverless-monolith/lighthouse';

export default defineLighthouseConfig({
proxy: {
port: 5454,
cors: true,
logRequests: true,
},
brunoPath: './bruno',
coreGroups: [
{
coreName: 'my-service',
baseUrl: 'http://localhost:4005',
routes: [
{ name: 'api', pathPrefix: '/api/http/' },
],
},
],
processes: [
{
id: 'my-service',
name: 'My Service',
command: 'pnpm',
args: ['dev'],
cwd: './my-service',
mode: 'auto',
healthCheck: { // Required
url: 'http://localhost:4005/health',
interval: 5000,
},
},
],
});

Start Lighthouse

lighthouse

Interface Overview

┌─────────────────────────────────────────────────────────────────────┐
│ Lighthouse TUI [?] Help │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────┐ ┌─────────────────────────────────────┐ │
│ │ Navigation │ │ Content Panel │ │
│ │ │ │ │ │
│ │ > Docs & API │ │ Process Status │ │
│ │ Search │ │ ─────────────── │ │
│ │ Dashboards │ │ ● my-service Running │ │
│ │ Processes │ │ ○ other-service Stopped │ │
│ │ │ │ │ │
│ └─────────────────────┘ └─────────────────────────────────────┘ │
│ │
│ [Tab] Switch Panel [/] Search [?] Help [q] Quit │
└─────────────────────────────────────────────────────────────────────┘

Main Sections

1. Documentation & API

Browse and execute Bruno requests organized by collection and core.

Quick fuzzy search across all endpoints and documentation.

3. Dashboards

  • Status Dashboard: Overview of all services
  • Logs Dashboard: Real-time log streaming
  • SQS Dashboard: Queue monitoring
  • Metrics Dashboard: Performance metrics

4. Process Manager

Control all configured processes:

  • Start individual or all processes
  • Stop and restart services
  • View process logs
  • Check health status

Configuration Options

Process Configuration

OptionTypeRequiredDescription
idstringUnique identifier
namestringDisplay name
commandstringCommand to run
argsstring[]Command arguments
cwdstringWorking directory
modestringmanaged, external, or auto
healthCheckobjectHealth check config
autoStartbooleanStart on launch
envobjectEnvironment variables

Health Check Configuration

The healthCheck field is required for all processes:

OptionTypeRequiredDescription
urlstringURL to check health
intervalnumberCheck interval in ms
timeoutnumberTimeout per check (default: 5000)

Next Steps