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

# Installation and Setup

> Install AquaOps locally and seed a usable demo environment.

This page explains how to install AquaOps locally and seed a usable demo environment.

## Prerequisites

You need:

* Node.js
* npm
* a Supabase project
* the database schema already provisioned in that Supabase project

## Environment variables

Create a `.env.local` file in the project root with:

```bash theme={null}
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=
SUPABASE_SERVICE_ROLE_KEY=
```

### What each variable does

* `NEXT_PUBLIC_SUPABASE_URL`
  The URL of your Supabase project.
* `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY`
  The browser-safe key used by the web app.
* `SUPABASE_SERVICE_ROLE_KEY`
  A server-only key used for privileged actions such as seeding and admin operations.

<Warning>
  Never expose the service role key to the client.
</Warning>

## Install dependencies

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

## Seed demo data

Run:

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

The seed script creates:

* one demo organization
* one demo location
* two demo pools
* default Illinois-based chemical profiles for the demo pools
* several demo roles
* several demo users

## Seeded demo accounts

The script prints the seeded emails when it runs. By default it creates:

* `admin@example.test`
* `manager@example.test`
* `operator@example.test`

Each run also generates and prints a fresh temporary password per user. The seed no longer relies on a shared fixed demo password.

## Run the app

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

Then open:

```text theme={null}
http://localhost:3000
```

## First login

After login, the app opens to the dashboard. From there you can:

* add chemical records
* add maintenance logs
* open settings to manage your organization data

## Troubleshooting

### Seed fails

Check:

* the Supabase URL is correct
* the service role key is present
* the database schema already exists

### Login fails

Check:

* the seeded user exists in Supabase Auth
* you are using the latest temporary password printed by the seed run
* the user account is still active

### No data appears

Check:

* the seed script completed successfully
* you are logged into one of the seeded accounts
* the users table and tenant data were created correctly
