Skip to content

Quick Start

import { Steps } from ‘@astrojs/starlight/components’;

This guide gets Quibble running locally with a real Postgres database and Redis. Auth0 is bypassed using a dev token.

  1. Clone the repo

    Terminal window
    git clone https://github.com/play-quibble/trivia.git
    cd trivia
  2. Start Postgres and Redis

    Terminal window
    docker compose up -d

    This starts Postgres on 5432 and Redis on 6379.

  3. Set up the API

    Terminal window
    cd apps/api
    cp .env.example .env

    Edit .env and set:

    DATABASE_URL=postgres://postgres:postgres@localhost:5432/quibble?sslmode=disable
    REDIS_ADDR=localhost:6379
    DEV_AUTH_TOKEN=devtoken123
    # Leave AUTH0_DOMAIN and AUTH0_AUDIENCE empty for local dev

    Run migrations and start:

    Terminal window
    make migrate-up
    make run

    The API is now at http://localhost:8080. Health check: curl http://localhost:8080/healthz

  4. Set up the web frontend

    In a new terminal:

    Terminal window
    cd apps/web
    cp .env.local.example .env.local

    Edit .env.local:

    API_URL=http://localhost:8080
    DEV_AUTH_TOKEN=devtoken123
    Terminal window
    npm install
    npm run dev

    The app is now at http://localhost:3000.

  5. Log in

    Open http://localhost:3000. With DEV_AUTH_TOKEN set, the app bypasses Auth0 and logs you in automatically as a dev host.

  6. (Optional) Seed questions

    Terminal window
    cd apps/api
    ./seed_questions.sh

The docker-compose.yml at the repo root starts:

ServiceImagePort
postgrespostgres:16-alpine5432
redisredis:7-alpine6379

The application services themselves are not in Docker Compose for local dev — you run them directly with make run and npm run dev.