| name | tenant-admin-crud |
| description | Use when building tenant-admin CRUD flows for branches, staff, services, clients, schedules, and other salon-owned operational resources. |
Tenant Admin CRUD
Use this skill for the internal panel of each salon.
Read first
docs/memory/active-context.md
docs/blueprints/development-roadmap.md
docs/decisions/ADR-0002-multi-tenancy-and-panels.md
docs/engineering/development-best-practices.md
Workflow
- Decide whether the record is tenant-owned or branch-owned.
- Scope the resource query to the authenticated tenant.
- Keep
tenant_id off the form unless there is a compelling internal reason.
- Set tenant ownership server-side.
- Add branch filters and status filters where they help operation.
- Add positive and negative tests for panel access and data isolation.
Rules
- no unscoped
Model::query() for tenant-owned resources
- no trusting route parameters alone for ownership
- no resource callback with hidden business logic if an action class is clearer
- every destructive action should be authorization-aware