| name | superadmin-tenant-onboarding |
| description | Use when implementing or changing superadmin flows for tenant creation, owner assignment, tenant lifecycle, status changes, and initial customer onboarding. |
Superadmin Tenant Onboarding
Use this skill for the first lifecycle of a salon inside the platform.
Read first
docs/memory/active-context.md
docs/blueprints/development-roadmap.md
docs/decisions/ADR-0002-multi-tenancy-and-panels.md
docs/engineering/commit-and-github-workflow.md
Workflow
- Confirm the workflow belongs to
superadmin.
- Treat tenant creation as a cross-model operation, not a simple CRUD callback.
- Create or update explicit action classes for:
- tenant creation
- initial owner creation
- role assignment
- tenant suspension/reactivation if applicable
- Keep the UI in Filament and the business rule in Laravel actions.
- Add tests for:
- superadmin access
- tenant user denied access
- owner role assignment
- correct tenant ownership on created records
Rules
- do not trust tenant ids from forms
- do not create owner users without role assignment
- do not couple onboarding logic to table/resource classes more than necessary
- keep onboarding auditable and easy to extend later with plans or billing