bun create cratebaseA backend in one crate.
Collections, auth, files and realtime in one self-hostable Rust binary. SQLite today, Postgres when you need it.
curl -fsSL https://cratebase.dev/install.sh | sh- One binary, dashboard included
- SQLite or Postgres
- Works with the official PocketBase SDKs
- MIT licensed
Access rules run inside the query.
Write one expression per action. Cratebase compiles it into SQL, so a row a user can't see never leaves the database. Try it: change the rule, or who's asking.
GET /api/collections/posts/records200 3 of 3 rows- Shipping the places search featurepublishednot returned
- Why we moved off three servicespublishednot returned
- Draft: nearest-place notesdraftnot returned
SELECT * FROM posts WHERE published = TRUE OR author = :auth_id:auth_id = "u_nico"From schema to typed client in one command.
cratebase dev writes the types and keeps them current. No codegen package, no Node toolchain.
Starting from scratch? bun create cratebase scaffolds a whole app — Next.js, Vite + React, or Expo — already wired up to it. See starter kits →
$ curl -fsSL https://cratebase.dev/install.sh | sh
Downloading Cratebase 0.6.0 for x86_64-unknown-linux-musl...
Cratebase 0.6.0 installed to ~/.local/bin/cratebase
$ cratebase dev
cratebase dev
------------------------------------------------------------
API: http://127.0.0.1:8090/api/
Dashboard: http://127.0.0.1:8090/_/
Superuser: admin@localhost / •••••••••• (generated; change it)
Schema: applied (3 collection(s))
Types: ./cratebase-types.d.ts
Mail inbox: http://127.0.0.1:8090/api/dev/mails// Generated by `cratebase typegen`. Do not edit by hand.
export type PostsRecord = {
id: string;
title: string;
body?: string;
published?: boolean;
author?: string;
expand?: { author?: UsersRecord };
};
export type PostsCreate = { title: string; body?: string; published?: boolean; author?: string };
export type Schema = { users: UsersRecord; places: PlacesRecord; posts: PostsRecord };import { createClient } from "@cratebase/client";
import type { Schema, SchemaCreate } from "./cratebase-types";
const cb = createClient<Schema, SchemaCreate>("http://localhost:8090");
const { items } = await cb.collection("posts").list({ sort: "-published" });
items[0].title; // (property) title: string
await cb.collection("posts").create({ published: true });
Property 'title' is missing in type '{ published: true; }' but required in type 'PostsCreate'.Everything else is already in the crate.
No second vendor for mail, storage, search or auth.
- AuthPassword, email OTP, magic links, TOTP 2FA, 12 OAuth2 presets and generic OIDC.
- RealtimeLive subscriptions, presence and in-app notifications. Cross-node on Postgres.
- FilesLocal disk or any S3 bucket, presigned uploads, image transforms on the fly.
- Search?search= on any collection. FTS5 on SQLite, tsvector on Postgres.
- EmailVisual templates your frontend can send with cb.mails.send().
- SQLCustom RPC endpoints, geo queries and Postgres extensions.
- HooksJavaScript hooks, custom routes and cron jobs, hot-reloaded in dev.
- DefaultsRate limits, a one-time setup token and security headers, on from the first run.
A dashboard for every setting.
Embedded in the binary. Real screens from a running instance.






10× PocketBase's search throughput, on the same machine.
22 of 24 benchmark cells faster in the latest idle-host run, measured over HTTP, back to back.
Methodology and every resultView as a data table
| Category | Concurrency | Cratebase req/s | PocketBase req/s | Ratio |
|---|---|---|---|---|
| search | 50 | 49,986 | 4,774 | 10.47x |
| search-auth | 100 | 38,768 | 3,989 | 9.72x |
| search-wide | 100 | 16,414 | 1,924 | 8.53x |
| create | 100 | 11,960 | 6,606 | 1.81x |
| delete | 100 | 11,321 | 5,030 | 2.25x |
Coming from PocketBase? Your SDK already works.
Same wire protocol: 180 of 181 conformance tests pass against the official SDK. Your data moves in one command, and passwords keep working.
Migration guide$ cratebase migrate-from-pocketbase pb_data \
--dir cratebase_data
- new PocketBase("https://pocketbase.example.com")
+ new PocketBase("https://cratebase.example.com")Ship the next one in one binary.
MIT licensed. Self-host it, fork it, ship it.