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)Account, sign-in and RS256 JWT issuance, teams, billing
AI Servicesb-ai-worker (Cloudflare Worker, reachable only through the API worker’s AI_ORIGIN binding) + multi-provider adapters; local inference via studiobrain-model-manager (GGUF)AI generation, model catalog, BrainBits metering. Embeddings use EmbeddingGemma 2 on Workers AI

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 sb-server). Enterprise/on-prem (sb-enterprise*) is a future offeringOptional (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-SQLiteYes

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

The desktop app supports these storage providers (fs, gdrive, s3, dropbox, onedrive):

ProviderUse Case
Local filesystemDefault, desktop mode
Google DrivePersonal cloud backup and sync
S3-compatible (your own bucket)Own S3 or R2 bucket
Dropbox, OneDrivePersonal cloud backup and sync

Bring-your-own cloud storage (cloud_storage) is included on Free.

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