Monolith Generator Workflows
Use this skill when
- •You need to scaffold features quickly and safely.
- •You need to know all supported generator subcommands.
Generator surface
make generator <command> [args]
Supported commands:
- •
model - •
controller - •
resource - •
authentication - •
job - •
admin
Behavior summary
- •
model: creates model + model test; updatesdb/db.goAutoMigrate. - •
controller: creates controller + controller test + views; optionally injects routes. - •
resource: combinesmodel+ pluralized controller with full CRUD actions. - •
authentication: scaffolds user model, session helpers, auth middleware/controller/templates/routes. - •
job: creates job file + test, updates job enum and queue registration. - •
admin: scaffolds dashboard/middleware/routes, and auto-runs auth generation ifUsermodel is missing.
Safe scaffolding checklist
- •Run generator command.
- •Inspect modified files for route collisions/import order.
- •Fill TODO placeholders in generated handlers/jobs.
- •Run
gofmtif needed andgo test ./.... - •Start app and manually hit generated routes.
Practical patterns
- •Greenfield CRUD:
make generator resource post title:string body:string - •Existing model + UI:
make generator controller posts index show new create edit update destroy - •Async task:
make generator job SendDigest - •Auth bootstrap:
make generator authentication - •Admin/profiling:
make generator admin