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
2
Install dependencies
3
Start local services
This starts PostgreSQL, Redis, and MinIO (S3-compatible storage):
4
Configure environment variables
.env and fill in your API keys and configuration. At minimum you need:DATABASE_URL— PostgreSQL connection stringREDIS_URL— Redis connection stringANTHROPIC_API_KEY— For ClaudeBETTER_AUTH_SECRET— Authentication secret
5
Set up the database
Push the schema to your database:Optionally seed with initial data:
6
Start the app
http://localhost:3000.Background worker
Bap uses BullMQ for background jobs (e.g., processing integrations). Start the worker in a separate terminal:Useful commands
| Command | Description |
|---|---|
bun dev | Start the dev server |
bun build | Production build |
bun worker | Start the background job worker |
bun db:push | Push schema changes to the database |
bun db:studio | Open Drizzle Studio (database browser) |
bun db:seed | Seed the database |
bun lint:fix | Fix linting issues |
bun typecheck | Run the TypeScript type checker |
bun test | Run unit tests |
bun test:e2e | Run end-to-end tests |
Tech stack
| Layer | Technology |
|---|---|
| Web | Next.js 16, React 19, Tailwind CSS 4 |
| API | ORPC, Better Auth |
| Database | PostgreSQL, Drizzle ORM |
| AI | Anthropic Claude, OpenAI, Google Gemini |
| Queue | BullMQ, Redis |
| Storage | S3 / MinIO |
| Sandbox | E2B |
