What is Brainbox?
Brainbox is a privacy-focused alternative to Notion that works offline. It features:- Rich text editor with blocks, formatting, and embeds
- Custom databases with multiple views (table, kanban, calendar)
- Real-time chat and collaboration
- File storage and management
- Offline-first architecture with automatic sync
- CRDT-based collaboration using Yjs
Architecture
Local-first sync model:- Each client maintains a local SQLite database
- Changes are saved locally first (works offline)
- Background sync to server when connected
- Conflict resolution handled by CRDTs via Yjs
- Frontend: React + TypeScript + TailwindCSS v4
- Backend: Fastify + WebSocket for real-time sync
- Database: PostgreSQL with pgvector extension
- Cache: Redis (or Valkey)
- Storage: S3-compatible object storage (MinIO)
- Desktop: Electron with better-sqlite3
System Requirements
Minimum Requirements
- CPU: 2 cores
- RAM: 4 GB
- Storage: 20 GB (plus space for user data)
- OS: Linux, macOS, or Windows with Docker support
Recommended Requirements
- CPU: 4+ cores
- RAM: 8+ GB
- Storage: 50+ GB SSD
- Network: Stable internet connection for multi-user sync
Required Services
Brainbox requires the following infrastructure components:All required services are included in the Docker Compose and Kubernetes
configurations. You don’t need to set them up separately.
| Service | Purpose | Version |
|---|---|---|
| PostgreSQL with pgvector | Primary database | 17+ |
| Redis/Valkey | Message queue and cache | 8.1+ |
| S3-compatible storage (MinIO) | File and avatar storage | Latest |
Deployment Options
Docker Compose (Recommended)
Best for small to medium deployments on a single server. Pros:- Quick setup (5 minutes)
- All services bundled together
- Easy to maintain and update
- Built-in PostgreSQL, Redis, and MinIO
- Personal use or small teams (1-50 users)
- Testing and development
- Single-server deployments
Kubernetes/Helm
Best for production deployments requiring scalability and high availability. Pros:- Horizontal scaling
- High availability
- Advanced deployment strategies
- Resource management
- Large teams (50+ users)
- Production environments
- Multi-region deployments
- Organizations with existing Kubernetes infrastructure
Server Modes
Brainbox server supports two operational modes:Standalone Mode
Cluster Mode
- Running multiple replicas in Kubernetes
- Load balancing across multiple servers
- Requiring high availability
Security Considerations
Required Security Steps
-
Change default passwords for:
- PostgreSQL database
- Redis/Valkey
- MinIO root credentials
-
Configure HTTPS using:
- Reverse proxy (nginx, Caddy, Traefik)
- Let’s Encrypt for SSL certificates
-
Set secure environment variables:
- Generate strong
JWT_SECRET - Use environment-specific secrets
- Never commit
.envfiles to version control
- Generate strong
-
Network security:
- Restrict database ports to internal network only
- Use firewall rules to limit access
- Enable PostgreSQL SSL in production
Account Verification
Brainbox supports three account verification modes:- automatic: New accounts are verified immediately (good for private instances)
- manual: Admin must manually verify each account
- email: Email verification required (requires SMTP configuration)
Storage Limits
Configure storage limits to prevent abuse:Next Steps
Choose your deployment method:Docker Compose
Quick setup for single-server deployments
Kubernetes
Scalable deployment for production environments