Companies (Multi-Tenant)
WorkForce is a multi-tenant SaaS platform. Each company is an independent tenant with isolated data.
Available to: Platform Admins (SaaS-level)
Tenant Architecture
Each company (tenant) has:
- Its own set of employees, departments, shifts, and workflows
- Completely isolated data — no cross-tenant access
- Independent subscription and billing
- Separate configuration and settings
Viewing Companies
- Log in as a Platform Admin
- Go to Platform → Companies
- See all registered companies with status and subscription info
Company Details
| Field | Description |
|---|---|
| Company Name | Organization name |
| Subdomain | Unique identifier for the tenant |
| Admin Email | Primary admin contact |
| Subscription Plan | Current plan (Free, Professional, Enterprise) |
| Status | Active, Suspended, Trial |
| Created | Registration date |
| Employee Count | Number of active employees |
Managing a Company
Activating / Suspending
- Suspend — Blocks all user logins for the company
- Activate — Restores access
Resetting Admin Password
If a company admin is locked out:
- Open the company details
- Click Reset Admin Password
- A new temporary password is generated and sent to the admin email
Data Isolation
All database queries are automatically scoped by tenantId:
- API middleware injects the tenant context from the authenticated session
- Prisma queries include
where: { tenantId }at every level - No direct database access bypasses tenant scoping
- File uploads are stored in tenant-specific directories