Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:
  • Node.js (v16 or higher)
  • npm or yarn
  • PostgreSQL (v12 or higher)
  • Redis (v6 or higher)
  • Docker (optional, for containerized development)

Environment Variables

Create a .env file in the root directory with the following required variables:

Installation

  1. Clone the repository:
  1. Install dependencies:
  1. Set up the database:
  1. Start the development server:

Development Commands

Project Structure

Service Architecture

Each service follows a consistent pattern:

Testing API Endpoints

We use Bruno for API testing. The specifications are located in the spec/ directory:

Service Modes

The API supports different deployment modes:

Single Service Mode

Aggregated Mode (Development)

Worker Mode

Debugging

Enable debug logging by setting the DEBUG environment variable:

Common Issues

  • Ensure PostgreSQL is running on the correct port
  • Check your DATABASE_URL environment variable
  • Verify database credentials and permissions
  • Make sure the database exists
  • Ensure Redis is running on the correct port - Check your REDIS_URL environment variable - Verify Redis is accessible from your application
  • Change the PORT environment variable
  • Kill the process using the port: lsof -ti:3000 | xargs kill -9
  • Use a different port for development

Next Steps

Architecture Overview

Learn about our platform architecture

Code Style Guide

Follow our coding conventions

API Testing

Test APIs with Bruno collections

Authentication

Implement authentication in your app