> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aquaops.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup and Development

> Local setup requirements, environment variables, seed data, and common development commands for AquaOps.

## 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:

```bash theme={null}
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

```bash theme={null}
npm install
```

## Seed demo data

```bash theme={null}
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

```bash theme={null}
npm run dev
```

Then open `http://localhost:3000`.

## Scripts

| Command              | Purpose                     |
| -------------------- | --------------------------- |
| `npm run dev`        | Start local development     |
| `npm run build`      | Build production assets     |
| `npm run start`      | Start the production server |
| `npm run lint`       | Run ESLint                  |
| `npm run test`       | Run Vitest once             |
| `npm run test:watch` | Run Vitest in watch mode    |
| `npm run seed`       | Seed 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
