From c8cd95361ab196f81403dba1af5ab1f3ed374921 Mon Sep 17 00:00:00 2001 From: salirezav Date: Mon, 2 Feb 2026 12:34:59 -0500 Subject: [PATCH] Update README.md to reflect new services and development setup - Added descriptions for new services: media-api, video-remote, vision-system-remote, and scheduling-remote. - Updated development instructions to use docker-compose for starting the stack. - Changed web port from 5173 to 8080 and clarified development commands. - Removed MQTT broker details and updated service sections accordingly. --- README.md | 74 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 8ae816f..a7a2b06 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,13 @@ A unified monorepo combining the camera API service and the web dashboard for US - `camera-management-api/` - Python API service for camera management (USDA-Vision-Cameras) - `management-dashboard-web-app/` - React web dashboard for experiment management (pecan_experiments) - `supabase/` - Database configuration, migrations, and seed data (shared infrastructure) +- `media-api/` - Python service for video/thumbnail serving (port 8090) +- `video-remote/` - Frontend for video browsing (port 3001) +- `vision-system-remote/` - Camera/vision UI (port 3002) +- `scheduling-remote/` - Scheduling/availability UI (port 3003) +- `scripts/` - Host IP, RTSP checks, env helpers (see [scripts/README.md](scripts/README.md)) +- `docs/` - Setup, Supabase, RTSP, design docs +- `mediamtx.yml` - RTSP/WebRTC config for MediaMTX streaming ## Quick Start @@ -28,15 +35,15 @@ The wrapper script automatically: For more details, see [Docker Compose Environment Setup](docs/DOCKER_COMPOSE_ENV_SETUP.md). -- Web: +- Web: - API: -- MQTT broker: localhost:1883 +- MQTT is optional; configure in API config if used (see `.env.example`). To stop: `docker compose down` ### Development Mode (Recommended for Development) -For development with live logging, debugging, and hot reloading: +For development, use the same Docker Compose stack as production. The web app runs with the Vite dev server on port 8080 (hot reload); the API runs on port 8000. 1) Copy env template and set values (for web/Supabase): @@ -45,36 +52,25 @@ cp .env.example .env # set VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY in .env ``` -2) Start the development environment: +2) Start the stack (with logs in the foreground, or add `-d` for detached): ```bash -./dev-start.sh +./docker-compose.sh up --build ``` -This will: -- Start containers with debug logging enabled -- Enable hot reloading for both API and web services -- Show all logs in real-time -- Keep containers running for debugging - **Development URLs:** -- Web: (with hot reloading) -- API: (with debug logging) +- Web: (Vite dev server with hot reload) +- API: **Development Commands:** -- `./dev-start.sh` - Start development environment -- `./dev-stop.sh` - Stop development environment -- `./dev-logs.sh` - View logs (use `-f` to follow, `-t N` for last N lines) -- `./dev-logs.sh -f api` - Follow API logs only -- `./dev-logs.sh -f web` - Follow web logs only -- `./dev-shell.sh` - Open shell in API container -- `./dev-shell.sh web` - Open shell in web container - -**Debug Features:** -- API runs with `--debug --verbose` flags for maximum logging -- Web runs with Vite dev server for hot reloading -- All containers have `stdin_open: true` and `tty: true` for debugging -- Environment variables set for development mode +- `./docker-compose.sh up --build` - Start stack (omit `-d` to see logs) +- `./docker-compose.sh up --build -d` - Start stack in background +- `docker compose down` - Stop all services +- `docker compose logs -f` - Follow all logs +- `docker compose logs -f api` - Follow API logs only +- `docker compose logs -f web` - Follow web logs only +- `docker compose exec api sh` - Open shell in API container +- `docker compose exec web sh` - Open shell in web container ## Services @@ -84,16 +80,34 @@ This will: - Video recording controls - File management -### Web Dashboard (Port 5173) +### Web Dashboard (Port 8080) - User authentication via Supabase - Experiment definition and management - Camera control interface - Video playback and analysis -### MQTT Broker (Port 1883) +### Media API (Port 8090) -- Local Mosquitto broker for development and integration testing +- Video listing, thumbnails, transcoding + +### Video Remote (Port 3001) + +- Video browser UI + +### Vision System Remote (Port 3002) + +- Camera/vision control UI + +### Scheduling Remote (Port 3003) + +- Scheduling/availability UI + +### MediaMTX (Ports 8554, 8889, 8189) + +- RTSP and WebRTC streaming (config: [mediamtx.yml](mediamtx.yml)) + +Supabase services are currently commented out in `docker-compose.yml` and can be run via Supabase CLI (e.g. from `management-dashboard-web-app`). See [docs](docs/) for setup. ## Git Subtree Workflow @@ -138,7 +152,7 @@ Notes: - Storage (recordings) is mapped to `camera-management-api/storage/` and ignored by git. - Web - - Code lives under `management-dashboard-web-app/` with a Vite dev server on port 5173. + - Code lives under `management-dashboard-web-app/` with a Vite dev server on port 8080 when run via Docker. - Environment: set `VITE_SUPABASE_URL` and `VITE_SUPABASE_ANON_KEY` in `.env` (not committed). - Common scripts: `npm run dev`, `npm run build` (executed inside the container by compose).