Skip to main content

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​

  1. Log in as a Platform Admin
  2. Go to Platform → Companies
  3. See all registered companies with status and subscription info

Company Details​

FieldDescription
Company NameOrganization name
SubdomainUnique identifier for the tenant
Admin EmailPrimary admin contact
Subscription PlanCurrent plan (Free, Professional, Enterprise)
StatusActive, Suspended, Trial
CreatedRegistration date
Employee CountNumber 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:

  1. Open the company details
  2. Click Reset Admin Password
  3. 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