First public release. The shape of the API and on-disk layout is stable enough
to commit to, but everything is 0.x — breaking changes are still possible
between minors until v1.0.
Added
- Three-level tenancy:
System → Realm → App. Master admins manage realms;
realm admins manage apps in their realm; app admins are scoped to one app. - End-user pool per app. Users, OAuth provider config, refresh tokens, and
every auxiliary auth table (email verifications, password resets, OTPs,
TOTP, MFA challenges) live in each app'sdata.db. A user registered in
acme/mobileis a different identity than the same email inacme/web. - Auth flows: email + password, email OTP (passwordless), TOTP second
factor, OAuth2 / OIDC (Google, GitHub, Microsoft presets shipped). All
flows under/api/realms/:realm/apps/:app/auth/.... - Auto-seeded master admin. First boot inserts an
adminmaster-admin
row with a NULL password; the setup wizard (POST /_/setupwith
{password}) finalizes initialization. Login is{username, password}. - JWT tokens with explicit scope claims. Master admin tokens carry no
scope. Realm-admin tokens carryrealm. App-admin and end-user tokens
carry bothrealmandapp. 15-min default access TTL, 30-day refresh
with rotation-on-use. - Collections engine.
base,auth, and (planned)viewkinds. Field
types: text, number, bool, json, datetime, email, url, file, relation. - Filter parser. Boolean expressions with
&&,||,!, comparison
operators,~LIKE,?=IN, and template placeholders. Compiles to
parameterized SQL — every literal is bound. - Access rules per collection action.
list,get,create,update,
delete, each with its own template or filter expression. - Realtime broker. SSE and (planned) WebSocket subscriptions per
collection. Post-mutation hooks publish to the broker. - File storage. Local disk or any S3-compatible bucket via
object_store.
Metadata indata.db, blobs instorage/. - JS/TS hooks. Embedded QuickJS runtime via
rquickjs. Lifecycle hooks
(onRecord{Before,After}{Create,Update,Delete}), user-lifecycle hooks
(onUser{BeforeLogin,AfterLogin,AfterRegister}, app-scoped), custom HTTP
routes ($app.routerAdd), cron jobs ($app.cron), mailer hooks. Sandboxed
with hierarchical CPU / memory / network / FS policies. - Hierarchical policy engine. Master sets bounds; realm tightens; app
picks a value inside both. Auto-clamp when a parent narrows, with an audit
entry written to every affected scope. - Audit log per scope. Append-only
audit_logtable in each*.db. - Embedded SvelteKit dashboard at
/_/. Master-admin setup wizard,
realm / app / collection / record CRUD, hooks editor, files browser,
per-scope audit and policies, users + OAuth tabs per app. - VitePress documentation at https://pjonaszik.github.io/rustbase/.
- CI:
cargo fmt --check,cargo clippy -- -D warnings,cargo test,
cargo auditon every PR. Release build job on every push tomain.
Crates published
rustbase-core— IO-free domain types + filter parser.rustbase-db— SQLite layer (system / realm / app pools, migrations).rustbase-auth— JWT, argon2, AES-GCM KEK, TOTP, OAuth2.rustbase-realtime— in-process pub/sub broker.rustbase-storage— local + S3 viaobject_store.rustbase-runtime— QuickJS-based hook runtime.rustbase-api— axum handlers (REST, SSE).rustbase-server— the binary.