Skip to content
BunBase BunBase BunBase Docs Alpha v0.1.0

BunBase

The backend you actually own.

BunBase is a self-hosted backend that ships everything a mobile or web app needs — auth, a live database, real-time push, file storage — in a single lightweight process. No vendor, no per-seat pricing, no data leaving your servers.


Auth

Email/password, magic link, OAuth, TOTP 2FA, API keys, refresh tokens, account lockout, role-based access.

Collections

Schema-less records on SQLite. Dynamic columns, relations, soft delete, full-text search, cursor pagination.

Realtime

WebSocket subscriptions scoped to collection, record, or user. Filters, presence, heartbeat, auto-reconnect.

Storage

Upload to local disk or any S3-compatible bucket. Streaming uploads, signed URLs, image transforms.

Rate Limiting

Sliding-window limits per IP and per user. Redis-backed for multi-instance clusters.

Observability

Structured JSON logs, Prometheus /metrics, p50/p95/p99 histograms, hot backups via VACUUM INTO.



A single Bun process handles all traffic. A dedicated worker owns SQLite — no ORM, no connection pool. Scale horizontally by adding Redis.

┌─────────────────────────────────────────────┐
│ BunBase │
│ │
│ App Worker 1 App Worker N │
│ ┌───────────┐ ┌───────────┐ │
│ │ REST API │ ... │ WS / RT │ │
│ │ Admin API │ │ Auth │ │
│ └─────┬─────┘ └─────┬─────┘ │
│ └────────┬────────────┘ │
│ MessagePort RPC │
│ ┌────────────────┐ │
│ │ DB Worker │ │
│ │ SQLite WAL │ │
│ └────────────────┘ │
└─────────────────────────────────────────────┘
↕ Redis (optional, clusters)

Runs on a $5 VPS. Scales with Redis when you need it.