How beavoice2021/padt-eoir works
Purpose and deployment shape
EOIR WSP Commander is a full-stack operator console for an EOIR camera. A Node/TypeScript backend bridges browser control and telemetry to physical camera interfaces; a Vue/Vuetify frontend provides the commander UI. Production serves the built frontend from the backend, while Vite supports proxied frontend development.
Paths: backend/src/server.ts, frontend/src/main.ts, frontend/vite.config.ts.
Backend bootstrap and public boundary
The HTTP server initializes Express and Socket.io, hosts the browser application, and exposes REST plus realtime communication on one configurable port. This is the browser/backend trust boundary; hardware connections remain backend-only.
Paths: backend/src/server.ts, backend/src/routes.ts, backend/src/realtime.ts.
Camera protocol and hardware adapter
The camera module is the core EOIR integration boundary. It manages TCP control-port communication, constructs/parses protocol packets, maintains heartbeat behavior, receives camera telemetry, and coordinates video ingestion/transcoding. Hardware addressing, ports, heartbeat, and FFmpeg location are environment-driven.
Path: backend/src/camera.ts.
Control-command flow
Operator actions in the Vue UI call the REST client, which sends commands to backend /control routes. Routes translate those requests into camera-protocol operations through the hardware adapter. UI controls cover camera-oriented functions such as LOS, pan/tilt, zoom, sensors, AGC, cooler, effects, modes, and port toggles.
Paths: frontend/src/api.ts, backend/src/routes.ts, backend/src/camera.ts.
Telemetry and realtime flow
Camera status/telemetry enters through the backend camera integration, then Socket.io broadcasts status events to connected browsers. The frontend socket client subscribes and makes that live state available to display panels rather than relying solely on REST polling.
Paths: backend/src/camera.ts, backend/src/realtime.ts, frontend/src/socket.ts.
Video pipeline
The backend receives the EOIR UDP video stream locally and uses FFmpeg to produce an HLS/browser-consumable stream. The frontend video panel renders that resulting stream; raw UDP and FFmpeg process management do not cross into the browser.
Paths: backend/src/camera.ts, frontend/src/components/VideoPanel.vue, backend/src/server.ts.
Frontend composition
App.vue assembles a command-console shell from focused panels. CommanderShell and header establish the layout, while central/control/status/video panels consume REST actions and live status to present and operate the camera system.
Paths: frontend/src/App.vue, frontend/src/components/CommanderShell.vue, frontend/src/components/ControlSection.vue.
Material runtime dependencies
Runtime components are Node.js with Express and Socket.io, a Vue 3/TypeScript browser client, TCP access to the EOIR control endpoint, UDP access for video, and an installed/configurable FFmpeg executable. External dependencies are the EOIR hardware device and its network video/control services.
Paths: backend/package.json, frontend/package.json, backend/src/camera.ts.
Main entry points: camera.ts Camera adapter · server.ts HTTP server · CommanderShell.vue Commander shell · App.vue Console composition
Components 16
Browser Console
- Vue entry
frontend/src/main.ts - Console composition · Assembles the commander interface.
frontend/src/App.vue - Commander shell
frontend/src/components/CommanderShell.vue - Control section
frontend/src/components/ControlSection.vue - REST client
frontend/src/api.ts - Status subscriber
frontend/src/socket.ts - Video panel
frontend/src/components/VideoPanel.vue - Vite development proxy
frontend/vite.config.ts
Node Backend
- HTTP server · Serves the production frontend and browser API boundary.
backend/src/server.ts - Control routes · Handles /control commands.
backend/src/routes.ts - Realtime broadcaster · Broadcasts status to browsers.
backend/src/realtime.ts - Camera adapter · Owns control TCP, telemetry, heartbeat, UDP ingestion, and FFmpeg orchestration.
backend/src/camera.ts - HLS stream
backend/src/server.ts
Camera Environment
- EOIR control endpoint
- EOIR video stream
- FFmpeg · Converts UDP camera video into browser-consumable HLS.
Connections 19
- Vue entry → Console composition: mounts
- Console composition → Commander shell: composes
- Commander shell → Control section: hosts
- Commander shell → Video panel: hosts
- Control section → REST client: issues commands
- Status subscriber → Console composition: live status
- REST client → Control routes: REST /control
- Vite development proxy → HTTP server: proxies development requests
- HTTP server → Control routes: mounts
- HTTP server → Realtime broadcaster: hosts Socket.io
- HTTP server → HLS stream: serves
- Control routes → Camera adapter: protocol operations
- Camera adapter → Realtime broadcaster: telemetry status
- Realtime broadcaster → Status subscriber: status events
- Camera adapter → EOIR control endpoint: TCP control and telemetry
- EOIR video stream → Camera adapter: UDP video
- Camera adapter → FFmpeg: manages transcoding
- FFmpeg → HLS stream: produces HLS
- HLS stream → Video panel: renders