Generated Rust code

Find your Axum handlers, request types, business logic and SQLx queries in the generated project.

▶ Watch the demo
On this page

One directory per resource

project tree
src/
├── main.rs                  # Server startup
├── lib.rs                   # Shared state and route assembly
├── config.rs                # Environment configuration
├── database.rs              # SQL pool and migrations
├── error.rs                 # Error responses
├── patch.rs                 # Omitted / NULL / value
└── resources/
    ├── mod.rs               # Registry managed by Miblo
    └── user/
        ├── mod.rs           # User routes
        ├── handlers.rs      # HTTP extraction and responses
        ├── model.rs         # Data structures
        ├── requests.rs      # Request types and validation
        ├── service.rs       # Business rules
        └── repository.rs    # SQL and transactions

SQL migrations live in migrations/. Additional routes live in src/resources/custom_routes/. The generated French README explains configuration, files and requests.

Where to write your logic

ChangeFile
Business ruleservice.rs
Request validationrequests.rs
SQL queryrepository.rs
HTTP extraction and responsehandlers.rs
Manually registered routessrc/lib.rs, outside managed registries

A write follows handler → service → repository. Code is formatted with rustfmt and includes focused comments.

An independent project

shell
cargo check
cargo test
cargo run

The API runs without Miblo. SQLx queries run at runtime: building does not need a live database or .sqlx directory. A lockfile pins dependencies.

The scaffold includes health, PATCH deserialization and request-validation tests in the current architecture. Add tests for your own business logic.

Files managed by Miblo

Commit miblo.yaml and .miblo/state.json alongside your source. They retain definitions, pinned templates and merge baselines.

src/resources/mod.rs and custom_routes/mod.rs are managed registries. Business code there can block additions. Customize resource files or route assembly in src/lib.rs.

Search for a feature or command.

↑ ↓ browse Enter to open