High-level shape
AquaOps is a server-first Next.js application using the App Router. The authenticated application shell sits undersrc/app/(app), while domain logic
is implemented through server actions and shared service modules.
Application layers
UI layer
- route segments and layouts in
src/app - reusable components in
src/components - responsive shell and navigation for desktop and mobile
Action layer
- server actions under
src/lib/actions - module-specific mutations and fetch orchestration
- permission-aware entry points for writes
Domain/service layer
- calculation and workflow helpers in
src/lib/services - chemistry status logic
- LSI and compliance-related interpretation
Infrastructure layer
- Supabase auth and data access helpers in
src/lib/supabase - Postgres schema and RLS in
supabase/ - seeded demo data via
scripts/seed.ts
Key directories
| Path | Purpose |
|---|---|
src/app/(app) | Authenticated application routes |
src/components | Reusable UI building blocks |
src/lib/actions | Server actions by domain |
src/lib/services | Shared business logic and calculations |
src/lib/supabase | Supabase server/client helpers |
scripts/seed.ts | Demo org and baseline data seeding |
supabase/ | Database migrations and related setup |
Architectural posture
- server components are the default rendering model
- domain logic is kept out of route files where practical
- tenant scoping and permissions are enforced on the server side
- mobile support currently means responsive web UI, not a native app runtime