Introduction to AltBase
AltBase is a backend platform built in Rust — REST APIs, auth, storage, realtime, workflows, vector search, GraphQL, and more in a single binary.
What is AltBase?
AltBase is a Backend-as-a-Service platform built around a Rust server, a React dashboard, client SDKs, and a CLI. It brings together control-plane APIs, authentication, object storage, realtime subscriptions, workflows, integrations, vector search, and GraphQL into one workspace.
The project compiles into a single Rust binary containing 23 crates. You deploy it alongside four infrastructure containers (Postgres, Redis, NATS, and object storage) and get a fully functional backend platform accessible via one URL and one API key.
Project status: alpha. APIs, docs, setup flows, and contributor tooling are under active development. Expect breaking changes.
Why AltBase Exists
AltBase provides the building blocks you would normally stitch together across several separate systems:
- Project and organization management — multi-tenant platform with API key provisioning
- REST and SQL APIs — auto-generated CRUD endpoints from your database schema
- End-user auth and SSO — email/password, OAuth, OIDC, SAML, magic links, OTP, and B2B customer orgs
- Object storage — buckets, signed URLs, image transforms, and TUS resumable uploads
- Realtime subscriptions — WebSocket connections driven by Postgres CDC
- Jobs, events, and cron — background job queue, NATS pub/sub, and scheduled tasks
- Workflows, triggers, and server-side functions — DAG workflow engine, CDC/auth/storage triggers, QuickJS and Wasmtime function runtimes
- Integrations and webhooks — 500+ SaaS connectors via Nango with circuit-breaker patterns
- Vector search, RAG, and GraphQL — embeddings from four providers, hybrid search, auto-generated GraphQL schema
- MCP server — Model Context Protocol for AI agents, auto-generated from your schema
If you want one place to explore all of these concerns together, AltBase is the implementation surface.
What You Get
The repository is organized into these major components:
Server and Crates
| Component | Path | Description |
|---|---|---|
| Server binary | crates/atlas-server | Main HTTP assembly point — imports all crates, builds the Axum router, spawns background workers |
| Common | crates/atlas-common | Shared config, error types, and telemetry |
| Database | crates/atlas-db | Connection pool creation, migrations |
| Gateway | crates/atlas-gateway | API key auth, rate limiting, tenant context middleware |
| Control Plane | crates/atlas-control-plane | Organizations, projects, API keys, provisioning, logs |
| API Engine | crates/atlas-api-engine | REST CRUD, SQL endpoint, schema introspection, index advisor |
| Auth | crates/atlas-auth | Signup, login, OAuth, OIDC, SAML, SSO, B2B, RLS, setup wizard |
| Storage | crates/atlas-storage | Buckets, objects, TUS resumable uploads, signed URLs, transforms |
| Realtime | crates/atlas-realtime | WebSocket, CDC delivery, broadcast, presence, cron jobs |
| CDC Fan-out | crates/atlas-cdc-fanout | Postgres WAL listener to NATS JetStream fan-out |
| Events | crates/atlas-events | NATS pub/sub, JetStream stream management |
| Jobs | crates/atlas-jobs | Background job queue and worker |
| Search | crates/atlas-search | Tantivy full-text indexing |
| Analytics | crates/atlas-analytics | Materialized views and background refresh |
| Billing | crates/atlas-billing | Stripe checkout, subscriptions, usage tracking |
| Integrations | crates/atlas-integrations | Nango OAuth, connector templates, webhooks, circuit breaker |
| Functions | crates/atlas-functions | QuickJS + Wasmtime function engines |
| Triggers | crates/atlas-triggers | Unified event trigger system (CDC, auth, storage, cron) |
| Workflows | crates/atlas-workflows | DAG workflow engine with steps and approvals |
| Vector | crates/atlas-vector | Embeddings, vector search, RAG, LLM generation |
| GraphQL | crates/atlas-graphql | Auto-generated schema, queries, mutations, subscriptions |
| MCP | crates/atlas-mcp | Model Context Protocol server for AI agents |
| Replication | crates/atlas-replication | Data replication support |
Frontend and Client Libraries
| Component | Path | Description |
|---|---|---|
| Dashboard | apps/dashboard | React 19 + Vite + TypeScript platform admin UI |
| JavaScript SDK | sdk/js | TypeScript SDK (@altbasedb/sdk) — auth, queries, storage, realtime, vector, functions, and more |
| React SDK | sdk/react | React hooks (@altbase/react) — useQuery, useRealtime, useAuth, useStorage |
| Python SDK | sdk/python | Python client (altbasedb) — async-first with httpx and websockets |
| Dart SDK | sdk/dart | Flutter/Dart client (altbasedb) — Streams, resilience pipeline |
| Workflows SDK | sdk/workflows | Workflow definition types and client (@altbase/workflows) |
| CLI | cli | Command-line interface (@altbasedb/cli) — orgs, projects, keys, db, types |
Infrastructure and Testing
| Component | Path | Description |
|---|---|---|
| Docker setup | docker/ | Docker Compose stack and container configuration |
| E2E tests | tests/e2e | API end-to-end coverage |
| Test catalogs | docs/testing/ | Feature inventory and test-planning catalogs |
Current Capabilities
Major capabilities already present in the repository:
- Platform users, organizations, projects, API keys, settings, and request logs
- SQL endpoint and auto-generated REST APIs with filtering, pagination, and ordering
- Authentication with email/password, magic link, OTP, OAuth, OIDC, and SAML
- Enterprise SSO with two-layer model (org + project), B2B customer organizations, and guided setup wizard
- Storage buckets with objects, signed URLs, resumable uploads (TUS protocol), and image transforms
- Realtime WebSocket subscriptions driven by Postgres change data capture
- Cron jobs, background job queue, and NATS-based event pub/sub
- Functions runtime with QuickJS (JavaScript) and Wasmtime (WebAssembly)
- Triggers that fire on CDC events, auth events, storage events, and cron schedules
- DAG-based workflow engine with step execution and approval gates
- 500+ SaaS integrations via Nango with circuit breaker and webhook delivery
- Tantivy full-text search and pgvector-based vector search with hybrid ranking (RRF)
- Embeddings from four providers, knowledge collections, RAG pipeline, and LLM generation
- Auto-generated GraphQL schema with queries, mutations, and subscriptions
- MCP server for AI agent access — auto-generated from your database schema
- Stripe-based billing with checkout, subscriptions, and usage tracking
Who Is AltBase For?
| Audience | Use Case | What They Need |
|---|---|---|
| Startup developers | SaaS products | REST/GraphQL API, auth, storage — fast |
| Enterprise teams | Internal tools, B2B platforms | SSO (Okta/Azure AD), customer orgs, RLS |
| AI developers | LLM-powered apps and agents | Vector search, embeddings, RAG, MCP |
| Platform builders | Multi-tenant SaaS | Per-customer auth scoping, workflows, integrations |
Quick Links
- Quickstart — go from zero to running in five minutes with Docker Compose
- Local Development Setup — full contributor setup with Rust toolchain, Node.js, and bootstrap scripts
- Architecture Overview — single binary design, dual-context database, event-driven core, security layers