make:controller
Generate a new controller for handling HTTP requests.Examples
Generated File
What It Does
- Creates
src/controllers/<name>.rs - Updates
src/controllers/mod.rsto export the controller
make:action
Generate a new action for encapsulating business logic.Examples
Generated File
What It Does
- Creates
src/actions/<name>.rs - Updates
src/actions/mod.rsto export the action - Action is automatically registered in the DI container
make:middleware
Generate a new middleware for request/response processing.Examples
Generated File
What It Does
- Creates
src/middleware/<name>.rs - Updates
src/middleware/mod.rsto export the middleware
make:error
Generate a custom domain error with HTTP response conversion.Examples
Generated File
What It Does
- Creates
src/errors/<name>.rs - Creates or updates
src/errors/mod.rs - Generates a domain error with automatic HTTP response conversion
Usage
make:inertia
Generate an Inertia.js page component.Examples
Generated Files
Creates a React component infrontend/src/pages/:
generate-types
Generate TypeScript types from RustInertiaProps structs.
Options
| Option | Description |
|---|---|
-o, --output <PATH> | Output file path (default: frontend/src/types/inertia-props.ts) |
-w, --watch | Watch for changes and regenerate |
Examples
How It Works
Scans your Rust code for structs implementingInertiaProps and generates TypeScript interfaces:
Summary
| Command | Creates | Location |
|---|---|---|
make:controller <name> | Controller | src/controllers/ |
make:action <name> | Action | src/actions/ |
make:middleware <name> | Middleware | src/middleware/ |
make:error <name> | Domain Error | src/errors/ |
make:inertia <name> | Page Component | frontend/src/pages/ |
make:migration <name> | Migration | migrations/ |
generate-types | TypeScript Types | frontend/src/types/ |