🚀 rapid-rs
Zero-config, batteries-included web framework for Rust
FastAPI meets Spring Boot - Build production-ready APIs in minutes, not days
✨ What's New in v0.5.0
🎉 Phase 4 Complete - Full-Stack Features!
- 🔷 GraphQL - First-class GraphQL support with async-graphql + interactive playground
- 📧 Email/SMS - SMTP email and Twilio SMS notifications out of the box
- 📁 File Uploads - Multipart uploads with local storage backend
- 🖥️ Admin Dashboard - Embedded web UI with real-time stats and health monitoring
- 🗄️ More Databases - SQLite and MySQL backends in addition to PostgreSQL
🎯 Why rapid-rs?
Stop wasting time on boilerplate. Get a production-ready API with authentication, database, validation, and more - all configured automatically.
use rapid;
async
Visit: http://localhost:8080/swagger-ui for interactive API docs!
🚀 Quick Start
Installation
[]
= "0.5"
= { = "1", = ["full"] }
Your First API
use ;
use ;
async
async
🎨 Features
Core Features (Always Available)
- ✅ REST API - Built on Axum for blazing-fast performance
- ✅ OpenAPI/Swagger - Auto-generated interactive documentation
- ✅ Database - SQLx integration with migrations
- ✅ Validation - Request/response validation with
validator - ✅ Error Handling - Consistent, user-friendly error responses
- ✅ Logging - Structured logging with
tracing - ✅ Configuration - Environment-based config management
Authentication (auth feature)
use ;
async
async
Background Jobs (jobs feature) 🆕
use ;
let queue = new;
// Submit job
queue.enqueue.await?;
// Schedule for later
queue.schedule.await?;
WebSocket (websocket feature) 🆕
use ;
let ws_server = new;
ws_server.set_handler.await;
app.merge;
// WebSocket ready at ws://localhost:8080/ws
Caching (cache feature) 🆕
use ;
let cache = new;
// Cache with TTL
cache.set.await?;
// Get or compute
let user = cache.get_or_compute.await?;
Rate Limiting (rate-limit feature) 🆕
use ;
let limiter = new;
// Apply to routes
app.layer;
Metrics (observability feature) 🆕
use MetricsExporter;
let metrics = new;
// Prometheus metrics at /metrics
app.merge;
Feature Flags (feature-flags feature) 🆕
use ;
let mut flags = new;
flags.add_flag;
if flags.is_enabled
Multi-Tenancy (multi-tenancy feature) 🆕
use ;
async
GraphQL (graphql feature) 🆕
use ;
;
let schema = build.finish;
// Playground at http://localhost:3000/graphql/playground
app.merge;
Email/SMS Notifications (notifications feature) 🆕
use ;
let service = new
.with_email;
service.send_email.await?;
File Uploads (file-uploads feature) 🆕
use ;
use Arc;
let service = new;
// POST /upload - accepts multipart/form-data
app.merge;
Admin Dashboard (admin feature) 🆕
use ;
// Embedded dashboard at /admin
app.merge;
📦 Feature Flags
Choose the features you need:
[]
= { = "0.5", = ["full"] }
# Or pick specific features:
= { = "0.5", = [
"auth", # JWT authentication
"jobs", # Background jobs
"websocket", # WebSocket support
"cache", # In-memory caching
"cache-redis", # Redis caching
"rate-limit", # Rate limiting
"observability", # Prometheus metrics
"feature-flags", # Feature flags
"multi-tenancy", # Multi-tenant support
"graphql", # GraphQL API support
"notifications", # Email notifications
"notifications-sms", # SMS via Twilio
"file-uploads", # Multipart file uploads
"admin", # Admin dashboard
"db-sqlite", # SQLite backend
"db-mysql", # MySQL backend
]}
🏗️ Architecture
rapid-rs
├── Core Framework (Axum + Tower)
├── Database (SQLx + Migrations + SQLite + MySQL)
├── Auth (JWT + Argon2)
├── Validation (validator crate)
├── Jobs (Async Queue + Scheduler)
├── WebSocket (Real-time Communication)
├── Cache (Memory + Redis)
├── Rate Limiting (Token Bucket)
├── Metrics (Prometheus)
├── Feature Flags (A/B Testing)
├── Multi-Tenancy (SaaS Ready)
├── GraphQL (async-graphql + Playground)
├── Notifications (SMTP Email + Twilio SMS)
├── File Uploads (Multipart + Local Storage)
└── Admin Dashboard (Embedded UI + Stats API)
📚 Documentation
🤝 Contributing
Contributions welcome! Please read our Contributing Guide first.
📜 License
MIT License - see LICENSE-MIT or LICENSE-APACHE file for details
🙏 Credits
Built with:
- Axum - Web framework
- SQLx - Database toolkit
- Tower - Middleware
- Utoipa - OpenAPI generation
- And many more amazing Rust crates!
🎯 Roadmap
Phase 1 ✅ (v0.1.0)
- Core REST API framework
- Database integration
- OpenAPI documentation
Phase 2 ✅ (v0.2.0 - v0.3.0)
- JWT Authentication
- Password hashing
- Role-based access control
- Testing utilities
Phase 3 ✅ (v0.4.0)
- Background jobs
- WebSocket support
- Caching layer
- Rate limiting
- Prometheus metrics
- Feature flags
- Multi-tenancy
Phase 4 ✅ (v0.5.0)
- GraphQL support
- Email/SMS notifications
- File uploads
- Admin dashboard
- More database backends (SQLite + MySQL)
Phase 5 📋 (Future)
- Serverless deployment
- CLI code generation
- Plugin system
- Real-time subscriptions
⭐ Star History
If rapid-rs helps you build faster, give us a star! ⭐
Made with ❤️ for the Rust community