01 The problem
A seasonal visitor attraction with many part-time workers tracked attendance on paper and in chat messages. Payroll, advances and shift checklists took manual work every month, and nobody had a reliable audit trail.
02 What it does
- Check-in and check-out via QR code, with an ESP32 device that shows a rotating QR code on site.
- Shift checklists, manual corrections with an audit log, announcements and wage advances.
- Monthly exports for payroll; installable as a PWA on staff phones.
- SaaS fork: tenant isolation through Postgres row-level security, per-tenant onboarding, backup and restore scripts.
03 Architecture
- 01 DeviceESP32 firmware rendering the check-in QR code
- 02 WebNext.js 16 + React 19, PWA
- 03 BackendSupabase: Postgres, auth, RLS policies scoped by tenant_id in the JWT
- 04 Data90+ SQL migrations, audit log tables
- 05 OpsDocker, Caddy per tenant, scripted onboarding and restores
04 Stack
Next.jsReactTypeScriptSupabasePostgreSQL RLSPWAESP32 / ArduinoDockerCaddy
05 How I worked with AI
The single-tenant version grew feature by feature with agents, driven by real feedback from staff. The move to multi-tenancy was planned up front: I wrote the tenancy model and the RLS rules, then agents migrated the queries in batches while CI and tests checked that no query could cross tenants.
06 What is verified
- Single-tenant version runs in production for a client (confirmed from the production deployment copy).
- SaaS fork: GitHub Actions CI, 12 test files, 94 migrations.
- ESP32 QR display firmware is part of the repository.
07 Honest notes
- The SaaS variant does not serve the original client yet; it is a parallel fork in active development.