UsersInfrastructure Overview

Infrastructure Overview

This page provides a high-level summary of the StudioBrain service architecture.

Service Stack

StudioBrain is built as a Rust-backed API core with TypeScript edge services:

ServiceTechnologyPurpose
Web FrontendNext.js 15, React 19, TypeScript (Cloudflare Workers)User interface, real-time collaboration
Desktop & Mobile ClientsTauri 2.0 (Rust shell + embedded Rust backend)Native apps with local-first editing and offline support
API BackendRust (sb-server, Axum) — Cloudflare Workers on the SaaS (api.studiobrain.ai), native binary when self-hosted or embedded in the desktop appEntity CRUD, storage, sync, file server
Auth & AccountsTypeScript Cloudflare Worker (sb-accounts-worker, auth.studiobrain.ai)Sign-in, RS256 JWT issuance, teams, billing
AI Servicesb-ai-worker (Cloudflare Workers) + multi-provider adapters; local inference via studiobrain-model-manager (GGUF)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

ModeStorageMulti-tenant
DesktopSQLite + local filesNo (single user)
Self-HostedSQLite (Rust server; Litestream replication in the enterprise edition)Optional (local accounts)
Cloud (SaaS)Cloudflare Workers data plane: identity in the CONTROL_PLANE D1 (accounts worker), content in the ProjectStore Durable Object + R2 object storage, RAG in DO-SQLite; YugabyteDB is retained infrastructure, not the SaaS storeYes

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 the desktop studiobrain-model-manager gateway (GGUF), or any LAN endpoint (Ollama, LM Studio, and other OpenAI-compatible servers)

Provider selection is per-request based on model preference, BrainBits balance, and availability.

Cloud Storage Providers

ProviderTierUse Case
Local filesystemAllDefault, desktop mode
Google DriveIndie+Personal cloud backup and sync
S3 / Azure BlobTeam+Team storage, enterprise

Internal infrastructure topology, network configuration, database schemas, and security hardening are documented in the internal architecture guide (requires authentication).