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-coreShippedDomain model, manifest (gize.toml), naming conventions
gize-generatorShippedCodegen engine: safe file writer + plans
gize-templatesShippedThe templates for generated code
gizeShippedThe gize binary (CLI)
gize-dbShippedMigrations via SQLx (PostgreSQL, SQLite and MySQL)
gize-macrosIn progressProcedural macros, kept intentionally small (ADR-007)
gize-authShippedAuth shipped in Alpha: Argon2 + JWT, generated inline into projects (ADR-013)
gize-openapiShippedOpenAPI spec generation from the manifest (ADR-010)
gize-adminShippedAdmin UI generator: a React SPA from the manifest (ADR-006)
gize-testingShippedTest 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.