---
title: "Running locally"
description: "Start Postgres, push the schema, seed a dev admin, and run the API and web apps."
canonical_url: "https://vinicunca.dev/taman/getting-started/running-locally"
---
# Running locally

> Start Postgres, push the schema, seed a dev admin, and run the API and web apps.

From the generated project root (or a clone of `vinicunca/taman`).

## 1. Postgres

```bash
docker compose up -d
```

This starts `postgres:18` as `taman-postgres` (or `<name>-postgres` after generate):

- User / password: `postgres` / `postgres`
- Database: `taman_db` (or the snake_case project name)
- Host port: **5437** → container 5432
- Healthcheck: `pg_isready -U postgres -d taman_db`

## 2. Schema

```bash
pnpm db-pg:migrate:dev
```

That runs `drizzle-kit push` against `packages/server/db-pg/.env`. There is **no** `migrations/` directory in the repo yet — local dev uses push, not migrate. UAT/prod nx targets run `drizzle-kit migrate` and expect generated SQL under `packages/server/db-pg/migrations`.

## 3. Seed a dev admin (optional)

```bash
pnpm nx run api:seed
```

> [!WARNING]
> 
> This target runs `bun run ./scripts/seed-admin.ts`. **Bun is not declared** in `package.json` engines or workspace dependencies. Install Bun locally, or run the file with `tsx` the way `seed:todos` does.

Creates or updates:

|  |  |
| --- | --- |
| Email | `admin@taman.local` |
| Password | `Admin123!` |
| Role | `admin` |
| Email verified | yes |
| Organization | `demo`, with the admin as `owner` |

The todo pages need that membership: the admin role alone does not pass the service's organization check. If you were signed in before seeding, sign out and back in so the session picks up the organization.

**Dev and e2e only.** Do not use these credentials in production.

Todos:

```bash
pnpm nx run api:seed:todos
```

That uses `tsx`, not Bun. It fills the oldest organization (the seeded `demo` on a fresh database); set `SEED_ORG_SLUG` to choose another.

## 4. Dev servers

Two terminals:

```bash
pnpm dev:api    # Nitro on http://localhost:8788
pnpm dev:web    # Vite on http://localhost:5556
```

`pnpm dev:api` is `nx run api:dev` (`nitro dev`, `NODE_OPTIONS=--no-deprecation`). `pnpm dev:web` is `nx run web:dev` (`vite --mode development`).

Open [http://localhost:5556](http://localhost:5556). Sign in with the seeded admin. The app home is `/todos/manage` (overridden in `apps/web/src/preferences.ts`). taman-core's published default home is still `/dashboard`, which has **no page** in this template.

## Ports

| Service | Port |
| --- | --- |
| Web (Vite) | 5556 |
| API (Nitro) | 8788 |
| Postgres | 5437 |

## Health

```bash
curl http://localhost:8788/healthz    # { "status": "ok" } — process is up
curl http://localhost:8788/readyz     # database reachable
```

## Studio

```bash
pnpm dev:db-pg:studio
```

Opens Drizzle Studio using `packages/server/db-pg/.env`.


## Sitemap

See the full [sitemap](https://vinicunca.dev/sitemap.md) for all pages.
