Skip to content

Getting Started

Prerequisites

Setup

  1. Clone the repository

    bash
    git clone https://github.com/niklas-jacobsen/licenseplate-checker.git
    cd licenseplate-checker
  2. Start local services

    bash
    docker compose up -d

    This starts a PostgreSQL 17 instance on port 5432 with default credentials (postgres/admin, database mydb).

  3. Configure environment

    Backend (apps/api/.env):

    bash
    cp apps/api/.env.example apps/api/.env
    VariableDescription
    PORTServer port (default: 8080)
    DATABASE_URLPostgreSQL connection string (default in docker-compose.yml)
    JWT_SECRETSecret for signing JWT tokens
    ALLOWED_ORIGINSComma-separated frontend URLs for CORS
    API_BASE_URLBase URL of the API for Trigger.dev callbacks (default: http://localhost:8080)

    Frontend (apps/web/.env.local):

    VariableDescription
    NEXT_PUBLIC_BACKEND_URLBackend API URL (default: http://localhost:8080)

    For more info on environment variables, see Environment Variables

  4. Install dependencies

    bash
    bun install
  5. Run database migrations

    bash
    bun db:migrate
  6. Set up Trigger.dev (required for workflow execution)

    Create a free account at trigger.dev and create a new project. Then add the following to your apps/api/.env:

    VariableDescription
    TRIGGER_SECRET_KEYDev API key from your Trigger.dev dashboard (tr_dev_...)
    TRIGGER_WEBHOOK_SECRETA secret string used to authenticate webhook callbacks (defaults to dev-webhook-secret)
    API_BASE_URLBase URL of your local API for Trigger.dev callbacks (default: http://localhost:8080)

    Start the Trigger.dev dev CLI in a separate terminal:

    bash
    cd apps/api
    bunx trigger dev

    This connects your local machine to Trigger.dev's cloud, allowing it to discover tasks and send webhook callbacks to your local API.

  7. Start development servers

    bash
    bun turbo run dev

    This starts both the API (port 8080) and the frontend (port 3000) in parallel.

Project Structure

licenseplate-checker/
├── apps/
│   ├── api/          # Hono + Bun backend
│   ├── web/          # Next.js frontend
│   └── docs/         # VitePress documentation
├── packages/
│   └── shared/       # Shared validators, types, utilities
├── turbo.json        # Turborepo task config
└── package.json      # Workspace root

Available Scripts

CommandDescription
bun devStart all apps in development mode
bun buildBuild all apps
bun lintLint all packages with Biome
bun formatFormat all packages with Biome
bun testRun unit and integration tests
bun typecheckTypeScript type checking