Skip to main content

Stack

  • Next.js 16 App Router
  • React 19
  • TypeScript
  • Tailwind CSS v4
  • shadcn/ui
  • React Hook Form + Zod
  • Supabase for Postgres, Auth, and RLS
  • Vitest for unit tests

Requirements

  • Node.js compatible with the current Next.js toolchain
  • a Supabase project with the expected schema provisioned
  • environment variables in .env.local

Environment variables

Create .env.local with:
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=
SUPABASE_SERVICE_ROLE_KEY=
Notes:
  • the publishable key is used by the app client
  • the service role key is server-only
  • the seed script and admin-only server actions rely on the service role key

Installation

npm install

Seed demo data

npm run seed
The seed script creates a demo organization, base locations, pools, users, roles, and chemical profiles. The seeded user emails and fresh temporary passwords are printed to stdout.

Development server

npm run dev
Then open http://localhost:3000.

Scripts

CommandPurpose
npm run devStart local development
npm run buildBuild production assets
npm run startStart the production server
npm run lintRun ESLint
npm run testRun Vitest once
npm run test:watchRun Vitest in watch mode
npm run seedSeed demo data

Development notes

  • authenticated app routes live under src/app/(app)
  • server-side business logic lives in src/lib/actions
  • chemistry calculations live in src/lib/services
  • Supabase helpers live in src/lib/supabase
  • forms are still placeholder routes today; alerts, compliance, exports, and scheduled closures are implemented product areas