Infrastructure Overview
This page provides a high-level summary of the StudioBrain service architecture.
Three-Service Stack
StudioBrain is built as three cooperating services:
| Service | Technology | Purpose |
|---|---|---|
| Frontend | Next.js 15, React 19, TypeScript | User interface, real-time collaboration |
| Backend | FastAPI, SQLAlchemy, Python 3.12 | Entity storage, auth, file sync, billing |
| AI Service | FastAPI, PyTorch, multi-provider | AI generation, RAG, embeddings |
Data Architecture
StudioBrain follows a markdown-first principle: all entity data is stored as markdown files with YAML frontmatter. The database is a cache that can be rebuilt from files at any time.
Deployment Modes
| Mode | Storage | Multi-tenant |
|---|---|---|
| Desktop | SQLite + local files | No (single user) |
| Self-Hosted | PostgreSQL + NFS/local | Optional |
| Cloud | PostgreSQL (auth) + PostgreSQL (content) + Qdrant + Redis | Yes (full RLS) |
AI Providers
The AI service supports multiple providers with automatic routing:
- OpenAI (GPT-4o, o1, etc.)
- Anthropic (Claude)
- Google (Gemini)
- Grok (xAI)
- Local models via Ollama
Provider selection is per-request based on model preference, BrainBits balance, and availability.
Cloud Storage Providers
| Provider | Tier | Use Case |
|---|---|---|
| Local filesystem | All | Default, desktop mode |
| Google Drive | Indie+ | Personal cloud backup and sync |
| S3 / Azure Blob | Team+ | Team storage, enterprise |
Internal infrastructure topology, network configuration, database schemas, and security hardening are documented in the internal architecture guide (requires authentication).
Related Guides
- Self-Hosting — Deploy StudioBrain on your own infrastructure
- Sync and Collaboration — Cloud sync and team workflows
- Developer Reference — REST API documentation