← All Open-Source Tools
Rust Monolith MIT License
fondasi-rust
Single-binary Rust monolith with security wired upfront
Axum + bundled SQLite + Askama templates + HTMX. Auth, CSRF on every form, rate-limited endpoints, HttpOnly sessions, and compile-checked HTML in one compact binary.
Overview
fondasi-rust is the Rust port of fondasi. Instead of leaving authentication, CSRF, rate limiting, and tests as post-scaffold TODOs, it builds those guardrails into a single compiled binary and a single SQLite file.
Templates (Askama) are compile-checked so renaming a field or breaking a route fails at build time rather than in front of users, while AGENTS.md encodes repository conventions so AI coding agents can extend and deploy safely.
Key Highlights
- Zero runtime dependencies on the server — bundled SQLite (WAL) inside one compact Rust binary.
- Cross-compiled locally with hash-verified upload and measured ~0.27s binary swap deploys.
- 99% line coverage test suite covering auth flows, production CSRF, FTS5 search, and CRUD.
Architecture & Stack
HTTP Router Axum 0.8 Typed extractors, graceful shutdown, and clean middleware layering.
Database rusqlite (bundled) + r2d2 No system SQLite libs required; embedded migrations via rusqlite_migration.
Templates Askama + HTMX / Alpine Compile-checked HTML templates with progressive enhancement.
Assets Tailwind CLI + esbuild Auto-downloaded into .tools/ for dev; hashed manifest.json for immutable prod caching.
Security & Operational Defaults
- Argon2id password hashing (PHC format) with SHA-256 hashed 1-hour single-use reset tokens.
- Double-Submit-Cookie CSRF middleware active in production plus x-csrf-token header support.
- HttpOnly, SameSite sessions backed by SQLite, with Secure enforced in production behind TLS.
- Per-IP rate limiting on auth routes and baseline CSP, nosniff, framing, and referrer headers.
Quick Start
cargo install --git https://github.com/maulanashalihin/fondasi-rust fondasi-new
fondasi-new my-app
cd my-app && just dev # http://localhost:8081