derive_form 1.1.0

Procedural macros for Runique web framework - automatic form generation from models
Documentation
derive_form-1.1.0 has been yanked.

πŸš€ Runique - Django-inspired Rust Web Framework

Rust Tests License

A modern and comprehensive Rust web framework inspired by Django, for building robust and performant web applications.

🌍 Languages : English | πŸ‡«πŸ‡· FranΓ§ais

πŸ“š Table of Contents


πŸš€ Installation

Full Documentation : Installation Guide

Quick start:

git clone https://github.com/seb-alliot/runique

cd runique

cargo build

cargo test --all

πŸ‘‰ Read : docs/en/01-installation.md for complete details


πŸ—οΈ Architecture

Full Documentation : Architecture Guide

Overview of Runique's architecture:

Runique Framework
β”œβ”€β”€ Forms System      # Type-safe forms
β”œβ”€β”€ Routing Engine    # URL pattern routing
β”œβ”€β”€ Template Engine   # Tera templates
β”œβ”€β”€ Middleware Stack  # Security & headers
β”œβ”€β”€ ORM Layer         # SeaORM integration
└── Utils             # Helpers and utilities

πŸ‘‰ Read : docs/en/02-architecture.md for internal structure


βš™οΈ Configuration

Full Documentation : Configuration Guide

Configure your server and application:

let settings = Settings {
    server: ServerConfig { ... },
    database: DatabaseConfig { ... },
    security: SecurityConfig { ... },
};

πŸ‘‰ Read : docs/en/03-configuration.md for all options


πŸ›£οΈ Routing

Full Documentation : Routing Guide

Define your routes with urlpatterns! macro:

#[urlpatterns]
pub fn routes() -> Vec<Route> {
    vec![
        Route::get("/", views::home),
        Route::post("/api/users", views::create_user),
    ]
}

πŸ‘‰ Read : docs/en/04-routing.md for patterns and options


πŸ“ Forms

Full Documentation : Forms Guide

Create forms easily:

let mut form = Forms::new("csrf_token");

form.field(&TextField::text("username")
    .label("Username")
    .required("Required"));

form.field(&TextField::email("email")
    .label("Email"));

πŸ‘‰ Read : docs/en/05-forms.md for all field types


🎨 Templates

Full Documentation : Templates Guide

Use Tera templates:

<h1>{{ title }}</h1>
{% for item in items %}
  <p>{{ item }}</p>
{% endfor %}

πŸ‘‰ Read : docs/en/06-templates.md for complete syntax


πŸ—„οΈ ORM

Full Documentation : ORM Guide

Use SeaORM with Django-like pattern:

impl_objects!(User);

let users = User::objects
    .filter(active.eq(true))
    .all(&db)
    .await?;

πŸ‘‰ Read : docs/en/07-orm.md for advanced queries


πŸ”’ Middleware

Full Documentation : Middleware Guide

Integrated security middleware:

  • CSRF Protection
  • Content-Security-Policy (CSP)
  • Allowed Hosts
  • Security Headers
  • XSS Sanitizer

πŸ‘‰ Read : docs/en/08-middleware.md for configuration


πŸ’¬ Flash Messages

Full Documentation : Flash Messages Guide

Temporary messages for users:

success!("Operation successful!");
error!("An error occurred");
warning!("Warning!");

πŸ‘‰ Read : docs/en/09-flash-messages.md for details


πŸŽ“ Examples

Full Documentation : Examples Guide

Complete usage examples:

  • Complete blog application
  • User authentication
  • File upload
  • REST API

πŸ‘‰ Read : docs/en/10-examples.md for complete examples


πŸ§ͺ Tests

# Unit tests

cargo test --lib


# Integration tests

cargo test --test integration_tests


# All tests

cargo test --all

Results: 36/36 tests passing βœ…


πŸ“– Full Documentation

English (EN)

FranΓ§ais (FR)


🎯 Quick Start

  1. Read Installation
  2. Understand Architecture
  3. Check Examples
  4. Start coding your application

πŸ“Š Project Status

  • βœ… Compilation : No errors
  • βœ… Tests : 36/36 passing (100%)
  • βœ… Documentation : Complete (EN & FR)
  • βœ… Production : Ready

See PROJECT_STATUS.md for more details.


πŸ”— Resources


πŸ“ License

MIT License - see SECURITY.md


πŸš€ Production Ready

The Runique framework is stable, tested and documented, ready for production use.

Score : 4.6/5.0 ⭐

Start now β†’ Installation


🌍 Available in: English | πŸ‡«πŸ‡· FranΓ§ais