Why Choose Ferrox?
Built from the ground up for massive scalability, zero-trust security, and instant developer productivity.
🛡️ Zero-Trust Security
Built-in PASETO & JWT token engines, dual-token refresh, declarative role guards (RequireRole), and HMAC webhook verification.
⚡ Cache Stampede Protection
Integrated Singleflight pattern powered by Tokio broadcast channels to prevent dogpile effects on high-concurrency endpoints.
🔄 Resilience & Fault Tolerance
Redis-backed rate limiters, circuit breakers (Closed/Open/HalfOpen state machine), and distributed synchronization out of the box.
🧠 Enterprise Architectures
Decoupled CommandBus and QueryBus CQRS dispatchers, Saga orchestrators for distributed transactions, and background jobs.
🛠️ Code Factory & AutoZod
Automated generic CRUD routing macros (crud_router!) and strongly-typed ValidatedJson<T> payload validation.
🌐 Multi-Transport Engine
Unified application lifecycle manager supporting HTTP (Axum), gRPC, WebSockets, Server-Sent Events (SSE), and GraphQL schema generators.
Quick Start in 20 Seconds
Ferrox combines modularity, speed, and safety. Initialize your multi-transport server with minimal boilerplate.
Need support or have questions? Email us directly at info@ferrox-rust.dev.
use axum::{routing::get, Json, Router};
use ferrox_app::FerroxApp;
use ferrox_transports::http::HttpTransport;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let router = Router::new().route(
"/api/v1/ping",
get(|| async { Json(json!({ "status": "ok", "framework": "Ferrox" })) }),
);
let transport = HttpTransport::new(router, 3000);
FerroxApp::new()
.add_transport(transport)
.start()
.await?;
Ok(())
}