Enviro Station is an air quality monitoring platform with three services:
device: Raspberry Pi runtime that reads sensors and ingests readingsbackend: Go API for ingest, storage, streaming, and AI insightsdashboard-v2: React dashboard for live and historical visibility
- Device reads Enviro+ sensors and publishes live readings to the backend stream.
- Device batches durable uploads so the backend writes to Postgres less often.
- Dashboard uses the live stream for realtime updates and Postgres for longer-range history.
- If Postgres is down, the backend can still boot in live-only mode and retry durable storage later.
backend: Go API + Postgres migrationsdevice: Python runtime with queue-based retrydashboard-v2: Vite/React UI
Each service tracks a single template file: .env.example.
Create a local runtime file by copying it to .env.
cd backend
cp .env.example .env
docker compose up --buildBackend runs on http://localhost:8080.
cd dashboard-v2
cp .env.example .env
npm install
npm run devcd device
./install.sh
cp .env.example .env
uv run python main.pyPOST /api/live(requiresX-API-Key; live stream only, no Postgres write)POST /api/ingest(requiresX-API-Key)POST /api/ingest/batch(requiresX-API-Key)GET /api/stream(SSE live stream)GET /api/readings?limit=...GET /api/readings?from=...&to=...&max_points=...GET /api/readings?limit=...&source=liveGET /api/insights?limit=...GET /api/ops/events?limit=...GET /healthGET /ready