The Weather Man is a multi-station environmental sensor project with a Next.js web app under codebase/web-app.
The active web app uses:
- Next.js App Router
- shadcn UI components
- Better Auth for email/password auth, Google OAuth, email verification, and password reset
- admin account management for profile edits and verified email changes
- Prisma with PostgreSQL
/api/readingsfor station-authenticated reading ingestion and monitor data- public/private station visibility with private reads protected by admin auth or station API keys
- per-station Live Station Monitor refresh intervals
- ntfy alerts for rain and fire events when configured
Mermaid diagrams for the web app, API, database, and firmware flow are in docs/diagrams.md.
Fresh Arduino/ESP8266 firmware lives under codebase/iot-firmware.
- Arduino Mega 2560 reads sensors, writes SD logs, displays values on OLED, and
sends camelCase JSON over
Serial1. - NodeMCU V3 receives that JSON and posts it to
POST /api/readingswithX-Station-IdandX-Station-Keyheaders. config.his gitignored; copyconfig.example.hbefore uploading the NodeMCU sketch.
cd codebase/web-app
bun install
bun run prisma:generate
bun run devCreate codebase/web-app/.env from codebase/web-app/.env.example before
running with a real database.
Useful checks:
bun run lint
bun run knip
bun run build