Architecture

Gize is a Cargo workspace of focused crates. The CLI orchestrates a codegen engine that writes idiomatic Rust into a conventional project layout.

The workspace

gize-coreShipped

Domain model, manifest (gize.toml), naming conventions

gize-generatorShipped

Codegen engine: safe file writer + plans

gize-templatesShipped

The templates for generated code

gizeShipped

The gize binary (CLI)

gize-dbShipped

Migrations via SQLx (PostgreSQL, SQLite and MySQL)

gize-macrosIn progress

Procedural macros, kept intentionally small (ADR-007)

gize-authShipped

Auth shipped in Alpha: Argon2 + JWT, generated inline into projects (ADR-013)

gize-openapiShipped

OpenAPI spec generation from the manifest (ADR-010)

gize-adminShipped

Admin UI generator: a React SPA from the manifest (ADR-006)

gize-testingShipped

Test utilities for generated apps

Generated project layout

gize new produces a conventional, production-shaped structure:

shop/
├── src/
│   ├── app/
│   │   ├── products/
│   │   │   ├── mod.rs
│   │   │   ├── model.rs
│   │   │   ├── dto.rs
│   │   │   ├── repository.rs
│   │   │   ├── service.rs
│   │   │   ├── handler.rs
│   │   │   ├── routes.rs
│   │   │   └── tests.rs
│   │   └── mod.rs
│   ├── config/
│   ├── database/
│   ├── middleware/
│   ├── router.rs
│   ├── state.rs
│   ├── lib.rs
│   └── main.rs
├── migrations/
├── gize.toml
└── Cargo.toml

Safe by default

Every generator supports --dry-run (preview, writes nothing) and --force (overwrite), and never clobbers your files without asking. Registry files like app/mod.rs and the router are updated idempotently.

Decisions on record

Every significant decision is captured as an ADR before implementation. ADRs 000–012 cover the workspace, Axum, SQLx, templates, module layout, macros, config, OpenAPI, migrations and CLI design.