Skip to main content

High-level shape

AquaOps is a server-first Next.js application using the App Router. The authenticated application shell sits under src/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

PathPurpose
src/app/(app)Authenticated application routes
src/componentsReusable UI building blocks
src/lib/actionsServer actions by domain
src/lib/servicesShared business logic and calculations
src/lib/supabaseSupabase server/client helpers
scripts/seed.tsDemo 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