Login
POST /api/loginEntry point for all users. The app directs to the correct dashboard after login based on the user_type field in the response. Platform admins (super_admin) land on the Platform Dashboard.
Wireframe
Post-login routing
| user_type in response | Redirects to |
|---|---|
| super_admin | /platform/dashboard |
| admin / staff | /admin/dashboard |
| employee | /employee/dashboard |
| contractor | /contractor/dashboard |
| client | /client/dashboard |
Platform Dashboard
GET /api/platform/dashboardThe first screen after login for super_admin. Shows live KPI cards, plan utilization breakdown, and recent tenant activity.
Wireframe
| Plan | Tenants | Price / mo | Status |
|---|---|---|---|
| Starter Tier | 1 | PKR 49 | Active |
| Pro | 2 | PKR 299 | Active |
| Business | Plan | Status | Joined |
|---|---|---|---|
| BuildCorp Pakistan | Pro | Active | 20 Jun 2026 |
| AlphaStruct Ltd | Pro | Active | 18 Jun 2026 |
| Pak Engineering Service | Starter Tier | Suspended | 15 Jun 2026 |
GET /api/platform/notifications?is_read=false count.Tenant List
GET /api/platform/tenantsPaginated table of all tenant businesses. Supports search, plan filter, and active/inactive toggle. Each row links to tenant detail and exposes quick-action buttons.
Wireframe
| # | Business Name | Owner | Plan | Status | Active | Actions |
|---|---|---|---|---|---|---|
| 1 | Pak Engineering Service admin@engineering.test |
Seed Owner | Starter Tier | Suspended | ✗ | |
| 2 | AlphaStruct Ltd alpha@struct.test |
Ali Hassan | Pro | Active | ✓ | |
| 3 | BuildCorp Pakistan jk@buildcorp.test |
Jahanzaib Khan | Pro | Active | ✓ |
PUT /api/platform/tenants/{id} with is_active: false. The "Delete" button calls DELETE /api/platform/tenants/{id} — but both result in suspension (no hard-delete). Show a confirm dialog before either action.Invite Tenant
POST /api/platform/tenantsModal or full-page form to onboard a new business tenant. On success, shows the one-time admin password in a copyable alert.
Wireframe
Invite New Tenant
buildcorppakistan_adminxK9#mP2vQwLn Tenant Detail / Edit
GET + PUT /api/platform/tenants/{id}View full tenant record and edit any field inline. Changing is_active to false triggers a suspension confirmation dialog.
Wireframe
Subscription Plans
GET /api/platform/subscription-plansManage pricing tiers. Cards show key limits at a glance. Inline edit opens the plan form.
Wireframe
| Max Projects | 5 |
| Max Locations | 1 |
| Max Employees | 10 |
| Client Portal | ✗ |
| Tenants on plan | 1 |
| Max Projects | ∞ |
| Max Locations | ∞ |
| Max Employees | ∞ |
| Client Portal | ✓ |
| Tenants on plan | 2 |
tenants_assigned — display as informational, not an error.Create / Edit Plan
POST · PUT /api/platform/subscription-plansForm for creating or editing a subscription plan. The -1 = unlimited convention is hidden from the user — show a "Unlimited" checkbox that sets the value to -1 behind the scenes.
Wireframe
New Subscription Plan
-1 to the API. Display ∞ symbol in read-only views where API returns -1.Audit Log
GET /api/platform/notificationsChronological feed of platform events. Unread events are highlighted. Supports filter by category and text search across event code, title, and body.
Wireframe
GET /api/platform/notifications?is_read=false&per_page=1 and reading pagination.total. Poll every 60 seconds.