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: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:Production Builds
The backend build type-checks the source and creates a tree-shaken esbuild bundle atbackend/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 port5000. The frontend service is present but commented out, because the frontend can be deployed separately as an Nginx static image.