Introduction

OverviewArchitectureAgent Experience

The product

This repository

Structure

Usage

Other

Setup

Quickstart

Clone the OPB Brain monorepo and get the applications running locally

Two things are needed to boot: Cloudflare D1 (local via Wrangler) and Clerk credentials. Everything else degrades on its own — each integration reads its own environment variables and skips itself when they are missing.

Clone and install

Terminal
git clone https://github.com/reativatecnologia/opb-brain.git
cd opb-brain
bun install

The documentation site is not part of this workspace. It installs from its own directory:

Terminal
cd docs && bun install

Set up the database

Apply D1 migrations locally (Wrangler creates a local SQLite-backed D1 instance):

Terminal
bun run migrate

Optional: set DATABASE_URL in packages/database/.env only if you need Prisma CLI tooling against a file SQLite database. Runtime apps use the DB binding, not a connection string.

Workspace and webhook receipts are the tables that exist today; the rest of the domain model is still unbuilt.

Set up Clerk

Create an application at clerk.com and copy the publishable key and the secret key from API Keys. Add both to apps/app/.env.local and apps/web/.env.local:

apps/app/.env.local
CLERK_SECRET_KEY="sk_test_REPLACE_ME"
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_REPLACE_ME"

The NEXT_PUBLIC_CLERK_*_URL route values are already present in the .env.example files. Only the two keys above need adding.

Start the applications

Terminal
bun run dev

This documentation site runs separately, on port 3004:

Terminal
cd docs && bun run dev

Checks

The same commands that gate a pull request run locally:

Terminal
bun run build      # every workspace application
bun run test       # workspace suites plus the repository-wide guards
bun run check      # Ultracite, which wraps Biome
bun run design:lint -- . --baseline   # every visual value against DESIGN.md

Next

On this page

GitHubEdit this page on GitHub