Expand description
§modo
A Rust web framework for small monolithic apps. Single crate, zero proc
macros, built on axum 0.8 with libsql
(SQLite) for persistence. Handlers are plain async fn, routes use
axum::Router directly, services are wired explicitly in main(), and
database queries use raw libsql.
§Quick start
[dependencies]
modo = { package = "modo-rs", version = "0.7" }
[dev-dependencies]
modo = { package = "modo-rs", version = "0.7", features = ["test-helpers"] }Inside a handler module, pull in the common handler-time types with:
use modo::prelude::*;§Virtual flat-index modules
Three virtual modules re-export items across the crate so you don’t have to remember which source module they live in:
middlewares— every public middleware constructorextractors— every public request extractorguards— every route-level gating layer applied via.route_layer()
prelude bundles the extras a typical handler signature needs on top of
those (Error, Result, Json, State, etc.).
§Features
Every module is always compiled — no cargo features gate production code.
The only feature flag is test-helpers, which exposes in-memory backends
and test harnesses ([testing]); enable it in your [dev-dependencies].
§Dependency re-exports
modo re-exports the four crates that appear in nearly every handler signature, so you don’t need to pin matching versions yourself:
axum— router, extractors, responsesserde—Serialize/Deserializederivesserde_json— JSON values and macrostokio— runtime, tasks, sync primitives
Re-exports§
pub use config::Config;pub use error::Error;pub use error::Result;pub use axum;pub use serde;pub use serde_json;pub use tokio;
Modules§
- audit
- modo::audit
- auth
- modo::auth
- cache
- modo::cache
- config
- modo::config
- cookie
- modo::cookie
- cron
- modo::cron
- db
- modo::db
- dns
- modo::dns
- modo::email
- embed
- modo::embed
- encoding
- modo::encoding
- error
- modo::error
- extractor
- modo::extractor
- extractors
- Flat index of every axum extractor modo ships.
- flash
- modo::flash
- geolocation
- modo::geolocation
- guards
- Flat index of every route-level gating layer.
- health
- Health check endpoints for liveness and readiness probes.
- id
- modo::id
- ip
- modo::ip
- job
- modo::job
- middleware
- modo::middleware
- middlewares
- Flat index of every Tower Layer modo ships.
- prelude
- Handler-time prelude.
- qrcode
- QR code generation with customizable SVG output.
- runtime
- Graceful shutdown runtime for the modo framework.
- sanitize
- modo::sanitize
- server
- HTTP server startup and graceful shutdown.
- service
- modo::service
- sse
- Server-Sent Events (SSE) support for modo.
- storage
- modo::storage
- template
- modo::template
- tenant
- modo::tenant
- tier
- modo::tier
- tracing
- modo::tracing
- validate
- modo::validate
- webhook
- Outbound webhook delivery following the Standard Webhooks specification.
Macros§
- run
- Waits for a shutdown signal and then shuts down each task in order.