Skip to content

Enviro Station captures and processes environmental data from edge devices and presents it in real-time

Notifications You must be signed in to change notification settings

wiigg/enviro-station

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enviro Station

Enviro Station is an air quality monitoring platform with three services:

  • device: Raspberry Pi runtime that reads sensors and ingests readings
  • backend: Go API for ingest, storage, streaming, and AI insights
  • dashboard-v2: React dashboard for live and historical visibility

Architecture

  1. Device reads Enviro+ sensors and posts to backend ingest endpoints.
  2. Backend validates readings, stores data in Postgres, and emits SSE updates.
  3. Dashboard reads history and subscribes to stream updates.

Repository Layout

  • backend: Go API + Postgres migrations
  • device: Python runtime with queue-based retry
  • dashboard-v2: Vite/React UI

Environment Files

Each service tracks a single template file: .env.example. Create a local runtime file by copying it to .env.

Quick Start

Backend + Postgres (Docker Compose)

cd backend
cp .env.example .env
docker compose up --build

Backend runs on http://localhost:8080.

Dashboard

cd dashboard-v2
cp .env.example .env
npm install
npm run dev

Device

cd device
./install.sh
cp .env.example .env
uv run python main.py

Backend API

  • POST /api/ingest (requires X-API-Key)
  • POST /api/ingest/batch (requires X-API-Key)
  • GET /api/stream (SSE)
  • GET /api/readings?limit=...
  • GET /api/insights?analysis_limit=...&limit=...
  • GET /health
  • GET /ready

About

Enviro Station captures and processes environmental data from edge devices and presents it in real-time

Topics

Resources

Stars

Watchers

Forks