https://github.com/levkk/rwf
Comprehensive framework for building web applications in Rust.
https://github.com/levkk/rwf
apps framework models mvc orm rust templates web
Last synced: about 1 month ago
JSON representation
Comprehensive framework for building web applications in Rust.
- Host: GitHub
- URL: https://github.com/levkk/rwf
- Owner: levkk
- License: mit
- Created: 2024-06-28T04:50:35.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-01-02T14:00:54.000Z (4 months ago)
- Last Synced: 2025-04-03T02:04:33.992Z (about 1 month ago)
- Topics: apps, framework, models, mvc, orm, rust, templates, web
- Language: Rust
- Homepage: https://rustwebframework.org/
- Size: 2.24 MB
- Stars: 1,025
- Watchers: 11
- Forks: 19
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Roadmap: ROADMAP.md
Awesome Lists containing this project
- awesome - levkk/rwf - Comprehensive framework for building web applications in Rust. (Rust)
README
# Rwf ‐ Rust Web Framework
[](https://levkk.github.io/rwf/)
[](https://crates.io/crates/rwf)
[](https://docs.rs/rwf/latest/rwf/)
[](https://discord.gg/Q62HmJegPY)Rwf is a comprehensive framework for building web applications in Rust. Written using the classic MVC pattern (model-view-controller), Rwf comes standard with everything you need to easily build fast and secure web apps.
## Documentation
📘 The documentation **[is available here](https://levkk.github.io/rwf/)**.
## Features overview
- ✔ [HTTP server](https://github.com/levkk/rwf/tree/main/examples/quick-start)
- ✔ User-friendly [ORM](https://github.com/levkk/rwf/tree/main/examples/orm) to build PostgreSQL queries easily
- ✔ [Dynamic templates](https://github.com/levkk/rwf/tree/main/examples/dynamic-templates)
- ✔ [Authentication](https://github.com/levkk/rwf/tree/main/examples/auth) & built-in user sessions
- ✔ [Middleware](https://github.com/levkk/rwf/tree/main/examples/middleware)
- ✔ [Background jobs](https://github.com/levkk/rwf/tree/main/examples/background-jobs) and [scheduled jobs](https://github.com/levkk/rwf/tree/main/examples/scheduled-jobs)
- ✔ Database migrations
- ✔ Built-in [REST framework](https://github.com/levkk/rwf/tree/main/examples/rest) with JSON serialization
- ✔ WebSockets support
- ✔ [Static files](https://github.com/levkk/rwf/tree/main/examples/static-files) hosting
- ✔ Tight integration with [Hotwired Turbo](https://turbo.hotwired.dev/) for building [backend-driven SPAs](https://github.com/levkk/rwf/tree/main/examples/turbo)
- ✔ Environment-specific configuration
- ✔ Logging and metrics
- ✔ [CLI](https://github.com/levkk/rwf/tree/main/rwf-cli)
- ✔ WSGI server for [migrating](https://github.com/levkk/rwf/tree/main/examples/django) from Django/Flask apps
- ✔ Rack server for [migrating](https://github.com/levkk/rwf/tree/main/examples/rails) from Rails## Quick start
To add Rwf to your stack, create a Rust binary application and add `rwf` to your dependencies:
```bash
cargo add rwf
```Building an app is then as simple as:
```rust
use rwf::prelude::*;
use rwf::http::Server;#[controller]
async fn index() -> Response {
Response::new().html("Welcome to Rwf!
")
}#[tokio::main]
async fn main() {
Server::new(vec![
route!("/" => index),
])
.launch()
.await
.unwrap();
}
```## Examples
See [examples](https://github.com/levkk/rwf/tree/main/examples) for common use cases.
## 🚦 Status 🚦
Rwf is in beta and looking for early adopters. Most features are in a good state and documentation is usable.
### 🔧 Contributions
Contributions are welcome. Please see [CONTRIBUTING](https://github.com/levkk/rwf/tree/main/CONTRIBUTING.md) for guidelines, [ARCHITECTURE](https://github.com/levkk/rwf/tree/main/ARCHITECTURE.md) for a tour of the code, and [ROADMAP](https://github.com/levkk/rwf/tree/main/ROADMAP.md) for a non-exhaustive list of desired features.