Admin Workspace Skill
Use this skill when changing the staff-only admin workspace, model overrides, admin CRUD behavior, or generic admin templates.
Workflow
- Read Admin and User Site Separation.
- Inspect current registry overrides in
app/gojang/admin/models.go. - Remember that generated Ent models are discovered from
*models.Client. - Prefer registry configuration over model-specific admin handlers.
- Change admin templates only for generic behavior shared by resources.
- Run
go test ./app/gojang/admin, thengo test ./....
Registry Capabilities
Use model registrations for:
ListFieldsHiddenFieldsReadonlyFieldsOptionalFieldsCustomFieldsBeforeSave,BeforeCreate, andBeforeUpdateQueryModifier
Architecture Rules
- Admin routes are mounted under
/admin. - Canonical resource workspaces use
/admin/t/{resource}. - Admin routes must stay authenticated, staff-only, and audited.
- Public handlers should not branch on admin paths or render admin templates.