Customer Portal - Workspace¶
- Status: Implemented
- Prefix:
CUST - Module:
libs/web/customer(@bizos/web-customer) - Shell App:
apps/web - Architecture: Domain-driven Feature-based Architecture (ADR-0010)
- Related: Admin Portal, IAM
Purpose¶
Provides a modern, business-oriented customer workspace (apps/web) where tenant owners, administrators, and team members can monitor business KPIs, manage CRM customers and deals, track contracts and renewals, collaborate on tasks, check billing invoices, and use the AI Copilot.
Users and permissions¶
Workspace menu, mapped to the permission codes in the admin access-control matrix. Super admin and admin see the same screens.
| Screen | Group | Super admin | Admin | Support | Tenant owner | User |
|---|---|---|---|---|---|---|
| Dashboard, CRM, Contracts, Tasks | WORKSPACE | Yes | Yes | Yes | Yes | Yes |
| Billing, Staff, Settings, Activity Log | BUSINESS MANAGEMENT | Yes | Yes | Yes | Yes | No |
The Business Management group is accessible to the Operator group (super admin, admin, support) and tenant owners. A standard user does not see that group, and opening those URLs returns them to the workspace home. Customer group accounts (tenant owner, user) cannot access the admin portal.
Requirements¶
| ID | Priority | Requirement |
|---|---|---|
| CUST-01 | Must | Responsive customer workspace layout with brand sidebar, header search, a notification panel under the bell, user chip, and a labeled Sign out control at the top right of the header. |
| CUST-02 | Must | Executive KPI dashboard with monthly revenue (MRR), active customers, contract count, and task completion metrics. |
| CUST-03 | Must | Revenue performance visual chart (6-month trend) and sales conversion funnel. |
| CUST-04 | Must | Interactive B2B customer CRM suite with 4 dedicated functional tabs: Customer Directory (search, segment filter, industry filter, CSV export, and Customer 360 profile view with contacts, linked deals, and interaction timeline), 5-stage Sales Pipeline Board (New, Discovery, Proposal, Negotiation, Closed Won) with deal creation and stage progression, Activity Stream (calls, meetings, emails, memos), and Products & Price Book catalog with unit pricing. Ships with at least 20 realistic sample accounts covering all segments. |
| CUST-05 | Must | Contract lifecycle view with expiration warning banner, contract value stats, and renewal actions. |
| CUST-06 | Must | Kanban task board with status stages (To Do, In Progress, Review, Done) and priority tags. |
| CUST-07 | Must | Subscription & billing view with resource consumption meters and downloadable VAT invoices. |
| CUST-08 | Must | BizOS AI Copilot assistant with quick business suggestions and interactive query answering. |
| CUST-09 | Must | A tenant owner has full access to the customer portal including the Business Management group (Billing, Staff, Settings, Activity Log). They cannot access the admin portal. |
| CUST-10 | Must | A user sees WORKSPACE screens only (Dashboard, CRM, Contracts, and Tasks). They do not see the Business Management group (billing, staff, settings, activity log); navigating directly to those URLs returns to the workspace home. They cannot access the admin portal. Published notices are read from the header bell. The sidebar has no Notifications item. |
| CUST-11 | Should | The header has a "Change theme" button that opens a menu to choose the theme (Twitter, AstroVista) and the colour mode (Light, Dark, System). The change applies at once and is remembered in the browser for the next visit. One choice applies to both the customer portal and the admin portal. Default: AstroVista, Dark. Dynamic transitions and micro-animations accompany navigation, card elevations, buttons, and modals. |
| CUST-12 | Must | All user interface labels, tables, navigation, charts, modals, and error messages are displayed in English. |
Screens¶
- Dashboard (
/): Welcome banner, 4 KPI metric cards, revenue growth chart, sales conversion funnel, priority tasks checklist, and recent activity log. - CRM (
/crm): 4 tabs: Customer Directory (20+ sample records, CSV export, Customer 360 dialog with tabs for overview, contacts, deals, and activity timeline), Sales Pipeline (Kanban stages, deal progression, add deal modal), Activity Stream (timeline of meetings, calls, notes), and Products & Price Book (catalog of offerings with pricing). Add Customer dialog with validation. - Contracts (
/contracts): Active contract catalog with expiration warning banner, renewal status badges, and PDF download action. - Tasks (
/tasks): 4-column Kanban board for team project tracking with quick drag/stage transfer and create task modal. - Billing (
/billing): Active plan details (BizOS Enterprise Pro), seat and storage consumption meters, and invoice history table. - Settings (
/settings): Legal company profile, tax code, address, hotline, and regional localization. Typed name, tax, email, and phone fields use the same character masks as CRM add/edit forms. - Team (
/users): Connected directly to tenant IAM user management. - My profile (
/profile): Signed-in user edits their own full name and email (see IAM - My profile). The header profile control opens this screen.
Acceptance criteria¶
- CUST-01: When an authenticated tenant user accesses
/, the portal renders the sidebar navigation, header profile, and active workspace title. - CUST-02: Dashboard renders MRR, customer count, active contracts, and tasks completion with positive growth trends.
- CUST-08: Clicking the "AI Copilot" button opens the interactive BizOS AI modal with contextual business suggestions.
- CUST-09: A tenant owner sees WORKSPACE and BUSINESS MANAGEMENT (Billing, Staff, Settings, Activity Log). They cannot access the admin portal.
- CUST-10: A user sees the daily workspace menu only. Opening billing returns to the workspace home with an authorization warning and hides BUSINESS MANAGEMENT.
- CUST-11: When the user chooses AstroVista and Dark in the theme menu, then the workspace switches to AstroVista dark at once.
- CUST-11: When the user chooses Twitter and Light, then
<html>isdata-theme="twitter"without thedarkclass, so Twitter light tokens apply (not the AstroVista:rootfallback).