Local-first collaboration workspace you can self-host
A privacy-focused alternative to Notion that works offline. Own your data, collaborate in real-time, and keep everything in sync across devices.
- Rich text editor - Notion-like pages with blocks, formatting, and embeds
- Databases - Custom fields, multiple views (table, kanban, calendar)
- Real-time chat - Instant messaging for teams
- File storage - Upload and manage files in secure workspaces
- Offline-first - Work without internet, sync when reconnected
- CRDT collaboration - Multiple users editing simultaneously
- Self-hosted - Your data, your server, your control
Try it online: brainbox.3pe1x.com
Early preview - expect some bugs
Self-host with Docker:
git clone https://github.com/brainbox/brainbox.git
cd brainbox
docker compose -f hosting/docker/docker-compose.yaml up -dAccess at http://localhost:3000
Local-first sync:
- Each client has a local SQLite database
- Changes save locally first (works offline)
- Background sync to server when connected
- CRDTs handle conflict resolution via Yjs
Tech stack:
- Frontend: React + TypeScript + TailwindCSS v4
- Backend: Fastify + PostgreSQL + Redis + S3
- Desktop: Electron
- Build: Turbo monorepo
Prerequisites:
- Node.js 18+, npm 10+
- Docker & Docker Compose
Setup:
git clone https://github.com/brainbox/brainbox.git
cd brainbox
npm install
# Start infrastructure (postgres, redis, minio)
docker compose -f hosting/docker/docker-compose.yaml up -d
# Configure environment
cd apps/server
cp .env.example .env
# Start all dev servers
npm run devRun individual services:
cd apps/server && npm run dev # API (port 3000)
cd apps/web && npm run dev # Web (port 4000)
cd apps/desktop && npm run dev # DesktopProject structure:
brainbox/
├── apps/
│ ├── server/ # Fastify API
│ ├── web/ # React web app
│ └── desktop/ # Electron app
├── packages/
│ ├── core/ # Shared types & utils
│ ├── crdt/ # Yjs CRDT implementation
│ ├── client/ # Sync engine
│ └── ui/ # Component library
└── hosting/ # Docker & K8s configs
Commands:
npm run dev # Start dev servers
npm run build # Build all packages
npm run test # Run tests (Vitest)
npm run lint # Lint & format
npm run compile # Type checkRequirements:
- PostgreSQL with pgvector extension
- Redis (or Valkey)
- S3-compatible storage
Docker Compose:
docker compose -f hosting/docker/docker-compose.yaml up -dKubernetes:
helm repo add brainbox https://charts.brainbox.dev
helm install brainbox brainbox/brainbox \
--set postgresql.auth.password=your-passwordSee hosting/kubernetes/README.md for details.
Key environment variables:
DATABASE_URL=postgresql://user:pass@host:5432/brainbox
REDIS_URL=redis://host:6379
S3_ENDPOINT=https://your-s3.com
S3_ACCESS_KEY=key
S3_SECRET_KEY=secret
JWT_SECRET=your-secretDatabase connection issues:
docker exec -it brainbox-postgres psql -U brainbox -d brainboxBuild failures:
npm run clean
rm -rf node_modules package-lock.json
npm installNeed help?
- Check docs/ folder
- Report bugs: GitHub Issues
Contributions welcome!
Workflow:
- Fork and clone
- Create feature branch:
git checkout -b feature/name - Make changes, write tests
- Use conventional commits:
feat: add thing - Submit PR
Before submitting:
npm run lint
npm run test
npm run buildCommit types: feat:, fix:, docs:, refactor:, test:, chore:
CodeRabbit
Apache 2.0 - see LICENSE
