Skip to main content
Follow this guide to set up the GoBetter backend and frontend applications locally.

Prerequisites

Ensure you have the following installed on your system:
  • Node.js 22 LTS
  • pnpm 10.33.0 or Corepack
  • Docker (recommended for PostgreSQL and Redis)
  • An AI provider API key (e.g. OpenAI, OpenRouter) or access to platform models

1. Clone the Repository


2. Start Infrastructure (PostgreSQL & Redis)

GoBetter uses PostgreSQL for primary data storage and Redis for BullMQ task queues and user sessions.

3. Configure Environment Variables

Backend Configuration

Install the backend dependencies and generate the local environment file from the checked-in template:
This creates backend/src/.env from backend/src/.env.example. Fill in the database, Redis, AI provider, GitHub, encryption, authentication, and email values before starting the server. The backend loads this file from src/config/env.ts.

Client Configuration

Create the client environment file from the checked-in template:
client/.env

4. Install Dependencies & Run Migrations

Install dependencies in both directories and apply the database schema using Drizzle:

5. Launch the Development Servers

Start both services in development mode:
Open http://localhost:3000 in your browser to start reviewing pull requests with GoBetter.

Production Builds

The backend build type-checks the source and creates a tree-shaken esbuild bundle at backend/dist/server.js. The frontend uses Vite production bundling with tree shaking and writes static assets to client/dist.

Docker Compose

The current Compose file starts the backend service on port 5000. The frontend service is present but commented out, because the frontend can be deployed separately as an Nginx static image.
To build the frontend image directly:
The backend image uses Node 22 and the frontend image uses a Node 22 build stage with Nginx as the runtime server.