Your entire backend,
in one binary.

bebox ("Backend-in-a-Box") collapses your reverse proxy, API gateway, auth, rate limits, exact-invalidation HTTP cache, embedded databases (dimedb + rodedb), background queues, and polyglot handlers into one zero-glue executable configured by a single bebox.toml.

curl -fsSL https://bebox.run/install.sh | sh
Serving This Page bebox
Uncached Native + DB Read 395k req/s · 8.8 µs
ReadSetCache Hit 539k req/s · 6.2 µs
Live Hot-Swap 154 ms

          
Architecture

Replace 9 networked services with zero-IPC execution

Traditional backends split gateway, cache, queues, search, and databases across network hops. bebox unbundles the OS process into composable tiers inside one binary.

Traditional Stack 9+ services · multi-ms IPC
  • NGINX / Caddy — reverse proxy, TLS, static files
  • API Gateway — JWT/JWKS, schema validation, CORS
  • Redis — response cache (TTL guessing), rate limits, BullMQ
  • PostgreSQL — relational data & connection pooler
  • Elasticsearch / Pinecone — BM25 keyword & vector search
  • Temporal / Cron — durable workflows & scheduled jobs
  • Kafka / Pusher — live change feeds & SSE fan-out
  • Node / Go / Python pods — separate deploys & glue SDKs
  • Litestream / Backup cron — sidecar WAL shipping
Single bebox Binary 1 binary · sub-µs in-process
Ingress, TLS & Policy (unsworn)
Native ACME TLS 1.3 HTTP/3 QUIC 308 Redirect Auth / JWKS Rate Limits 64-Shard ReadSetCache Static SPA
Polyglot Execution Tiers (Zero IPC · Unified BoxHost)
Tier 0 Fused TOML Tier 1A Wasmtime Tier 1B QuickJS-NG + oxc Tier 2 Native Rust + PKU Tier 3 Workers
Embedded Storage & Durability (Single-Cluster Raft)
[state] dimedb Ledger [sql] rodedb SQL + BM25 + Vector [[stream]] SSE [[job]] / [[cron]] / [[workflow]] [backup] S3/R2 PITR
What Developers Can Build

Everything modern backends need, built in

Use just one piece or combine all of them inside the same bebox.toml—verified statically by bebox check and bebox plan before traffic ever arrives.

unsworn

Config-First Security & Routing

Declare API keys, Clerk/Auth0/Supabase JWKS JWT auth, parameter bounds, JSON schemas, CORS, IP rules, and durable rate limits in TOML. Invalid requests fail before handler code runs.

dimedb + rodedb

Dual Embedded Databases

Pair microsecond in-memory transactional [state] (dimedb) with disk-paged [sql] (rodedb) featuring SSI transactions, BM25 full-text, Int8 vector indexes, [[sql.mirror]], and atomic ctx.multiCommit.

Zero Stale Reads

Exact Read-Set Cache & Live SSE

Every cached GET records the exact keys and SQL ranges it read. The instant a matching row commits, ReadSetCache evicts only affected responses while [[stream]] pushes live SSE deltas.

SystemDb

Queues, Crons & Durable Workflows

Stage jobs atomically inside SQL transactions with tx.enqueue, run leader-guarded UTC [[cron]] schedules, and write replay-safe [[workflow]]s with ctx.journal, sleep, and waitEvent.

bebox sim

Deterministic Whole-Backend Testing

Run your entire app—routing, auth, both databases, torn-write crash recovery, crons, workflows, and mocked outbound HTTP—under one u64 seed and virtual clock for bit-for-bit reproducible tests.

Production Ready

Encrypted Raft, ACME HTTPS & PITR

Scale to 3–5 HA nodes with automatic X25519 + ChaCha20-Poly1305 encryption, deploy live .cartridge bundles in 154 ms, enable native Let's Encrypt HTTPS + HTTP/3, and stream encrypted WAL backups to S3/R2.

Polyglot Execution Tiers

Write endpoints in the languages you already use

Mix TypeScript, Rust, Go, Python, C, and Zig freely inside one project. Every handler shares the exact same BoxHost capability ABI with zero external glue.

TypeScript / JavaScript — Built-In QuickJS-NG + oxc

Zero Node or Bun install required. bebox transpiles TypeScript natively with oxc and executes warm pre-evaluated QuickJS-NG isolates in-process at 90.4k req/s.

~39 µs p50 Hot-Swappable Deterministic

            
Dogfooded Live on This Server

Try bebox live right now

Every button below sends real HTTP & SSE requests to the bebox binary currently serving bebox.run—backed by live dimedb, rodedb, ReadSetCache, and [[stream]].

Live dimedb Balance $—

Try this: Click GET twice in a row—notice the second read returns the exact same execution_token straight from ReadSetCache (handler skipped!). Then click Deposit +$25 and watch the live SSE feed fire AND the next GET immediately return fresh data with a new token—despite the 60s TTL.

HTTP Request & Cache Telemetry
Click "GET /api/demo/accounts/{id}" to start…
Live [[stream]] SSE Feed (/events/accounts)
Waiting for live dimedb commits…

Durable Per-IP Rate Limiter (5 requests / 15s)

Configured in one line of bebox.toml: rate_limit = { requests = 5, per = "15s" }. Backed by embedded SystemDb—zero Redis needed. Click rapidly to trigger a real 429 Too Many Requests!

Live Rate-Limit Responses
Click "Send GET /api/demo/limited" 6 times within 15 seconds…
Reproducible Benchmarks

Sub-millisecond reads, linearizable Raft writes

Measured on 4 vCPUs (AMD EPYC 9354P, Linux x86_64, hardware PKU enabled) via cargo run --release -p bebox-bench.

Throughput (req/s) & p50 latency
154 ms
Live Cartridge v1 → v2 hot-swap without restarting databases
WRPKRU
Hardware Intel/AMD PKU locks outbound credentials during Tier 2 Rust execution
6.5×
Group-commit fsync WAL scaling under concurrency (2.1k → 13.8k durable writes/s)
Ship Anywhere

From single-host ACME HTTPS to encrypted Raft clusters

Run directly on a Linux VPS with automatic Let's Encrypt HTTPS & HTTP/3, build a single stripped executable with boxc, or deploy a generated container image to Fly.io, Railway, or Render.


          
Documentation & Reference

Explore the complete bebox platform

Click a category below to browse topics served live from this server's embedded rodedb database, copy any snippet directly, or jump into the repository docs.