Installation
Ablebase is distributed as a monorepo with a Docker Compose configuration that starts all required services. You can also run each service manually for local development.
Prerequisites
Section titled “Prerequisites”- Docker and Docker Compose v2, or Node.js 20+ and pnpm 9+
- A PostgreSQL 16 database (provided automatically by Docker Compose)
Option 1 — Docker Compose (recommended)
Section titled “Option 1 — Docker Compose (recommended)”-
Clone the repository:
Terminal window git clone https://github.com/Ablebase/ablebase.gitcd ablebase -
Create environment files (see Configuration):
Terminal window cp packages/api/.env.example packages/api/.env# edit packages/api/.env with your values -
Start all services:
Terminal window docker compose upThis starts:
- PostgreSQL 16 on port 5432
- API on port 3001
- Web (Caddy) on port 80
-
Open http://localhost in your browser.
| Service | Port | Description |
|---|---|---|
db | 5432 | PostgreSQL 16 |
api | 3001 | Hono REST API |
web | 80 | React SPA behind Caddy reverse proxy |
All /api/* requests from the web are proxied to the API by Caddy.
Option 2 — Manual (local development)
Section titled “Option 2 — Manual (local development)”-
Install dependencies:
Terminal window pnpm install -
Start a local PostgreSQL instance (or point
DATABASE_URLat an existing one). -
Create
packages/api/.envwith at minimum:Terminal window DATABASE_URL=postgresql://user:password@localhost:5432/ablebaseBETTER_AUTH_SECRET=<output of: openssl rand -base64 32>BETTER_AUTH_URL=http://localhost:5173ALLOW_SIGNUP=true -
Run database migrations:
Terminal window pnpm --filter @ablebase/api db:migrate -
Start the API and web app in separate terminals:
Terminal window # terminal 1pnpm --filter @ablebase/api dev# terminal 2pnpm --filter @ablebase/web dev -
Open http://localhost:5173 in your browser.
First sign-in
Section titled “First sign-in”On first startup, navigate to /signup to create the initial account. Your first organization is created automatically after sign-up.
Migrations
Section titled “Migrations”Database migrations run automatically at API startup. To skip this (e.g. in CI) set SKIP_MIGRATIONS=1. To run migrations manually:
pnpm --filter @ablebase/api db:migrate