This repository contains a working skeleton for a remote camera monitoring system. It provides a CLI agent for screen/camera/input/mic capture, a Node.js server with REST + WebSocket signaling, frame processing, event handling, and a Next.js dashboard.
- Node.js 18/20+
- FFmpeg in PATH for camera capture (optional if using
--no-camera) - macOS: allow Screen Recording / Microphone / Camera permissions when prompted
-
Install dependencies:
npm install
-
Start the server:
npm run server
-
Start the dashboard (Next.js on 3001):
npm run dashboard
-
Start the agent (example):
node agent/cli.js start --device cam-001 --server http://localhost:3000 --screen --input --no-camera
Basic:
node agent/cli.js start --device cam-001 --server http://<server-host>:3000 --screen --input --mic --camera-frames
Disable camera (no FFmpeg):
node agent/cli.js start --device cam-001 --server http://<server-host>:3000 --screen --input --no-camera
PowerShell tip (pass args through npm):
npm run agent:start --% --device cam-001 --server http://localhost:3000 --screen --input --no-camera
This project includes Docker support for the core server and dashboard.
-
Build and start containers:
docker compose up -d --build
-
Open services:
- Server:
http://localhost:3000 - Dashboard:
http://localhost:3001
- Server:
-
View logs (optional):
docker compose logs -f
-
Stop containers:
docker compose down
Notes:
-
storage_datais mounted to the host (./storage_data) for persistence. -
The CLI agent should run on the host machine (not in Docker), because it needs local screen/input/mic/camera access.
-
Example host agent command (connects to Dockerized server):
node agent/cli.js start --device cam-001 --server http://localhost:3000 --screen --input --no-camera
Common flags:
--screenscreen capture--inputkeyboard/mouse monitoring--micmicrophone recording (continuous, segmented)--camera-framescamera frame capture for dashboard--no-cameradisable camera capture- Device ID is persisted per machine in
~/.remote-camera-device-id. Pass--deviceonce to bind.
macOS/Linux/Git Bash:
curl -fsSL https://raw.githubusercontent.com/GeKaixing/management/main/install.sh | bash -s -- --install-method git
Windows PowerShell:
powershell -NoProfile -ExecutionPolicy Bypass -Command "iwr -useb https://raw.githubusercontent.com/GeKaixing/management/main/install.ps1 | iex"
Both scripts prompt for:
- server host
- device id
- which monitors to enable
- Server:
http://localhost:3000 - Dashboard:
http://localhost:3001
- WebRTC media transport is stubbed; RTSP is used for camera stream. The dashboard uses frame snapshots.
- Event storage is file-based and can be replaced by PostgreSQL later.
- Use only with explicit authorization from the monitored user.
- agent/: CLI camera agent
- server/: Node.js core server
- stream/: signaling and frame pipeline
- ai/: fall detection stubs
- recorder/: ring buffer, snapshot, video clip recorder
- events/: event engine and alerts
- storage/: storage and database helpers
- dashboard/: Next.js app (App Router, TS)
- nocobase/: local NocoBase subproject
- frappe-hr/: local Frappe HR subproject
- outline/: local Outline knowledge base subproject
This repo now includes a PostgreSQL-based AI control plane for cross-subsystem management:
- path:
server/controlPlane/ - docs:
docs/ai-control-plane.md - base API:
/control/* - tables:
cp_subsystems,cp_tasks,cp_audit_logs
Start with PostgreSQL:
docker compose up -d --build