Skip to main content

Prerequisites

Before you begin, make sure you have the following installed:
  • Node.js v20+ (LTS recommended, see .nvmrc)
  • PostgreSQL 16+ with PostGIS extension
  • Redis 6+ (or Valkey)
  • Docker (optional, for containerized services)

Environment Setup

Step 1: Clone the Repository

Step 2: Install Dependencies

Step 3: Configure Environment Variables

Copy the example file and fill in your values:
Key variables:
Never commit your .env file. Use .env.example as a template.

Step 4: Set Up the Database

Run database migrations:
Seed the database with initial data (optional):

Step 5: Start the Server

For development with auto-reload:
For production build:
Your API should now be running at http://localhost:3000

Docker Setup (Alternative)

Run the entire stack with Docker Compose:
This starts:
  • API server on port 3000
  • PostgreSQL on port 5432
  • Redis on port 6379

Testing the API

Health Check (Liveness)

Expected response:

Readiness Check (DB + Redis)

Expected response:
If any dependency is down, returns 503 with "status": "degraded".

Run Tests

Project Structure

Common Tasks

Logs are output to console in development with pretty formatting via pino-pretty. In production, logs are structured JSON (Pino).

Next Steps

Quickstart

Make your first authenticated API request

API Reference

Explore all 56 endpoints