Skip to content

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.

  • Docker and Docker Compose v2, or Node.js 20+ and pnpm 9+
  • A PostgreSQL 16 database (provided automatically by Docker Compose)
  1. Clone the repository:

    Terminal window
    git clone https://github.com/Ablebase/ablebase.git
    cd ablebase
  2. Create environment files (see Configuration):

    Terminal window
    cp packages/api/.env.example packages/api/.env
    # edit packages/api/.env with your values
  3. Start all services:

    Terminal window
    docker compose up

    This starts:

    • PostgreSQL 16 on port 5432
    • API on port 3001
    • Web (Caddy) on port 80
  4. Open http://localhost in your browser.

  1. Install dependencies:

    Terminal window
    pnpm install
  2. Start a local PostgreSQL instance (or point DATABASE_URL at an existing one).

  3. Create packages/api/.env with at minimum:

    Terminal window
    DATABASE_URL=postgresql://user:password@localhost:5432/ablebase
    BETTER_AUTH_SECRET=<output of: openssl rand -base64 32>
    BETTER_AUTH_URL=http://localhost:5173
    ALLOW_SIGNUP=true
  4. Run database migrations:

    Terminal window
    pnpm --filter @ablebase/api db:migrate
  5. Start the API and web app in separate terminals:

    Terminal window
    # terminal 1
    pnpm --filter @ablebase/api dev
    # terminal 2
    pnpm --filter @ablebase/web dev
  6. Open http://localhost:5173 in your browser.

On first startup, navigate to /signup to create the initial account. Your first organization is created automatically after sign-up.

Database migrations run automatically at API startup. To skip this (e.g. in CI) set SKIP_MIGRATIONS=1. To run migrations manually:

Terminal window
pnpm --filter @ablebase/api db:migrate