Weather station web app

The Weather Man

A fresh Next.js live monitor and API for storing and viewing environmental sensor readings from multiple stations. The app records temperature, humidity, soil moisture, rain detection, fire detection, station identity, public/private visibility, station polling intervals, and reading timestamps in a Prisma-backed database.

Live Station MonitorRead demo APIAdmin
Data model
Station + readings

Prisma stores managed stations, hashed station API keys, admin users, and each sample as a station-linked `WeatherReading` row.

Active demo read endpoint
GET /api/demo/readings

Returns randomly generated readings with the same response shape the Live Station Monitor is using now. Pass `limit` to control the number of rows.

/api/demo/readings?limit=24
Write endpoint
POST /api/readings

Stores a new sensor sample when station headers match an active station API key. Private station reads also require admin auth or the station API key.

X-Station-Id: main-station X-Station-Key: generated-key Content-Type: application/json
Database read endpoint
GET /api/readings

This is the Prisma-backed read endpoint. Set `NEXT_PUBLIC_DEMO_API=false` to make the Live Station Monitor read from it.

NEXT_PUBLIC_DEMO_API=true
Payload shape
JSON body
{
  "temperature": 25,
  "humidity": 50,
  "soilMoisture": 42,
  "soilRaw": 600,
  "rain": false,
  "rainRaw": 700,
  "fire": false
}
Demo private access
Private playground keys

Use these only in demo mode when the Live Station Monitor is switched to Private station.

Lab Station station=lab-station key=wm_demo_lab_station_key interval=2500ms
Storage Station station=storage-station key=wm_demo_storage_station_key interval=12000ms
Demo auth
Sign-in accounts

Demo sign-in accounts

Demo Admin
email=admin@weather-man.demo
password=DemoAdmin123!
Demo Viewer
email=viewer@weather-man.demo
password=DemoViewer123!