Skip to main content

Prerequisites

  • Bun (recommended) or Node.js
  • Docker and Docker Compose
  • API keys for the AI providers you want to use (Anthropic, OpenAI, or Google)

Setup

1

Clone the repository

git clone https://github.com/baptistecolle/bap.git
cd bap/app
2

Install dependencies

bun install
3

Start local services

This starts PostgreSQL, Redis, and MinIO (S3-compatible storage):
docker compose up -d
4

Configure environment variables

cp .env.example .env
Edit .env and fill in your API keys and configuration. At minimum you need:
  • DATABASE_URL — PostgreSQL connection string
  • REDIS_URL — Redis connection string
  • ANTHROPIC_API_KEY — For Claude
  • BETTER_AUTH_SECRET — Authentication secret
5

Set up the database

Push the schema to your database:
bun db:push
Optionally seed with initial data:
bun db:seed
6

Start the app

bun dev
The app will be available at http://localhost:3000.

Background worker

Bap uses BullMQ for background jobs (e.g., processing integrations). Start the worker in a separate terminal:
bun worker

Useful commands

CommandDescription
bun devStart the dev server
bun buildProduction build
bun workerStart the background job worker
bun db:pushPush schema changes to the database
bun db:studioOpen Drizzle Studio (database browser)
bun db:seedSeed the database
bun lint:fixFix linting issues
bun typecheckRun the TypeScript type checker
bun testRun unit tests
bun test:e2eRun end-to-end tests

Tech stack

LayerTechnology
WebNext.js 16, React 19, Tailwind CSS 4
APIORPC, Better Auth
DatabasePostgreSQL, Drizzle ORM
AIAnthropic Claude, OpenAI, Google Gemini
QueueBullMQ, Redis
StorageS3 / MinIO
SandboxE2B