The Hard Fork
Technical details of the OpenClaw → BrainstormRouter transition.
What changed
BrainstormRouter is a hard fork of OpenClaw. The consumer-facing product was removed. The infrastructure was kept and hardened for multi-tenant SaaS deployment.
Directories removed permanently
ui/ → Local gateway dashboard (Lit web components)
apps/ → Mobile apps (iOS, Android, macOS)
src/channels/ → Unified messaging abstraction layer
src/slack/ → Slack channel implementation
src/web/ → Web channel implementation
src/telegram/ → Already removed prior to fork
src/discord/ → Already removed prior to fork
src/signal/ → Already removed prior to fork
src/imessage/ → Already removed prior to fork
These directories do not exist in the repository and will not be recreated. BrainstormRouter is a headless API-first platform.
What replaced the local dashboard
The local Lit web components dashboard (ui/) was replaced by a SaaS dashboard at site/dashboard/, hosted on Vercel at brainstormrouter.com/dashboard. It's a vanilla TypeScript/Vite app that authenticates via Supabase and calls the production API at api.brainstormrouter.com.
Backward compatibility
Environment variables
The envVar() utility in src/infra/env.ts reads BRAINSTORMROUTER_ first, then falls back to OPENCLAW_:
// Reads BRAINSTORMROUTER_DATA_DIR first, falls back to OPENCLAW_DATA_DIR
const dataDir = envVar("DATA_DIR");
Roughly 700 files still contain OPENCLAW_* references. This is intentional — they're operational identifiers (filesystem paths, container names, systemd units) that would break existing deployments if renamed wholesale.
CLI binary name
The CLI binary remains openclaw for package compatibility. The npm package name is unchanged. Only the product name, documentation, and API surface use the BrainstormRouter name.
Package paths
Internal package paths under src/ retain their original structure. The rename was applied to:
- All TypeScript types (
BRConfig,BRPlugin*,BRVersion) - All public-facing function names
- All documentation and display strings
- All file names that appeared in imports
Infrastructure changes
| Component | Before (OpenClaw) | After (BrainstormRouter) |
|---|---|---|
| Hosting | Self-hosted (single node) | AWS ECS Fargate (us-east-1) |
| Database | SQLite (local) | Postgres 16 (RDS) + pgvector |
| Cache | In-memory | ElastiCache Serverless (Redis) |
| Storage | Local filesystem | EFS persistent volume |
| Auth | Local config file | Supabase JWT + API keys |
| Dashboard | Local Lit app (port 3000) | Vercel SaaS (brainstormrouter.com/dashboard) |
| Memory | SQLite (local) | Postgres pgvector + durable extraction queue |
| Secrets | .env files | AWS Secrets Manager + 1Password |
Multi-tenancy
The most significant architectural addition. OpenClaw was single-tenant by design. BrainstormRouter introduces:
- Row-Level Security on tenant-scoped tables via Drizzle
pgPolicy(src/db/schema/tenants.ts:76-92) - AsyncLocalStorage for implicit tenant propagation (
src/db/tenant-als.ts) - ltree hierarchy for MSP sub-tenant relationships
- System tables (api_keys, extraction queue) that intentionally skip RLS for cross-tenant worker operations
See Tenant Isolation for the full architecture.