A lightweight, self-hosted Backend-as-a-Service inspired by Firebase and Supabase. Built with Rust + Axum + SQLite. Zero external services required.
| Module | Status | Description |
|---|---|---|
| Admin | β | Create / list / delete projects via X-Admin-Key |
| Auth | β | Per-project JWT auth β register, login, /me |
| Files | β | S3-style multipart upload, list, download, delete |
| DB | π§ | Collection scaffolding ready; document CRUD coming soon |
- Rust β₯ 1.80 (
rustup update stable) - SQLite shared lib (
libsqlite3-devon Ubuntu)
./firerust# 1. Clone / enter the directory
cd firerust-api
# 2. Edit config (at minimum change the keys)
cp config.json config.local.json
$EDITOR config.local.json
# 3. Build and run
cargo run --release -- config.local.jsonThe server starts on http://0.0.0.0:4000 by default.
cd firerust-client
npx run dev{
"db_path": "./data/firerust.db",
"secret_key": "change-this-secret-key-in-production-min-32-chars",
"admin_key": "change-this-admin-key-in-production",
"uploads_folder": "./uploads",
"jwt_expiry_hours": 24,
"host": "0.0.0.0",
"port": 4000
}| Field | Description |
|---|---|
db_path |
Path to SQLite file. Use :memory: for tests. |
secret_key |
HMAC-SHA256 secret used to sign JWTs. Min 32 chars. |
admin_key |
Value that must be sent in X-Admin-Key header for admin routes. |
uploads_folder |
Root directory for uploaded files. Project sub-folders are created automatically. |
jwt_expiry_hours |
How long issued tokens remain valid. Default: 24. |
host / port |
Bind address. Default: 0.0.0.0:3000. |
# Unit tests (no network, in-memory DB)
cargo test
# With log output
RUST_LOG=debug cargo test -- --nocapturefirerust/
βββ config.json # Default config
βββ Cargo.toml
βββ src/
βββ main.rs # Router assembly + server startup
βββ config.rs # Config loading + validation
βββ db.rs # Pool creation + schema migrations
βββ error.rs # Unified AppError β HTTP response
βββ state.rs # Shared AppState (pool + config)
βββ middleware/
β βββ admin.rs # X-Admin-Key extractor
β βββ jwt.rs # Bearer JWT extractor
βββ models/
β βββ project.rs # Project CRUD
β βββ auth_user.rs # User CRUD + JWT generation/validation
β βββ file_record.rs # File metadata CRUD
βββ routes/
βββ admin.rs # Admin project endpoints
βββ auth.rs # Auth endpoints
βββ files.rs # File upload/download endpoints
βββ db_model.rs # DB collection endpoints (stub)