Onboard Tenant
Walks through the full tenant onboarding workflow for TenantFlow.
When to use
- Setting up a new freelancer workspace during development
- Testing the full registration flow
- Debugging tenant creation issues
Workflow
- Create Clerk organization — set up the organization in Clerk with the tenant's name and admin user
- Create Stripe customer — create a Stripe Customer record linked to the tenant, set default subscription to Free tier
- Create database records — insert Tenant row in Prisma with
clerkOrgIdandstripeCustomerId - Seed initial data — create default invoice template, default time entry categories, and sample client (optional)
- Verify — confirm tenant can log in, sees their empty dashboard, and subscription shows as Free
Project specifics
- Clerk org ID maps to
tenant.clerkOrgIdin Prisma - Stripe customer ID maps to
tenant.stripeCustomerIdin Prisma - Free tier limits: 3 clients, 1 user, basic invoice template
- All seed data must include the correct
tenantIdforeign key