Case study
CRM app — multi-tenant SaaS
Landlord console to create and govern tenants; each tenant runs CRM workflows on its own subdomain behind dedicated middleware.
What it is
Central admin routes manage tenants (suspend, activate, recreate database). Tenant-facing CRM lives behind tenant middleware so requests resolve the correct database and branding. Livewire speeds interactive grids and forms for operators.
Architecture
Request-path split: landlord UI never runs tenant middleware; tenant hostnames always do. Persistence is isolated per tenant (database recreation is an explicit admin action). Auth flows extend Breeze patterns for both sides.
*.saas.app / admin domain
→ Landlord routes (no tenant middleware)
→ central DB (tenants registry)
tenant123.saas.app
→ Tenant middleware (resolve tenant + connection)
→ tenant DB
→ Livewire CRM modules
Highlights
- Strong isolation aids compliance and noisy-neighbour control.
- Livewire keeps UX responsive without maintaining a separate SPA.
- Landlord tooling makes tenant lifecycle an explicit product surface.
- Fits classic B2B SaaS pricing and onboarding flows.