B2B SaaS Analytics Dashboard
A PRD focusing on data visualization, multi-tenant architecture, and Role-Based Access Control (RBAC) for a B2B application.
1. Metadata
Project Name
Analytics Dashboard V1
Product Manager
Sarah Lee
Target Release
Q4 2024
2. User Personas
Workspace Admin
Can view all organization data, invite users, and manage billing. Needs a high-level summary of active users and revenue.
Analyst (Viewer)
Can only view specific projects assigned to them. Cannot see billing or invite new users.
3. Technical Constraints
Multi-Tenancy Security
All database queries MUST include the
tenant_idto prevent cross-workspace data leaks. This is a P0 security requirement.Performance (NFR)
Dashboard widgets must load within 800ms at the 95th percentile. Aggregation queries should be cached using Redis.
Out-of-Scope (V1)
- Custom widget builder / drag-and-drop dashboard editing.
- PDF / CSV Export functionality (Deferred to V2).
- Real-time websocket updates (Data refreshes on page load only).
4. Functional Requirements
| ID | Requirement | Acceptance Criteria |
|---|---|---|
| REQ-01 | MRR Line Chart Display Monthly Recurring Revenue over the last 12 months. | - Chart library: Recharts or Chart.js. - X-axis: Month (e.g., Jan 2024). - Hover tooltip shows exact MRR value. |
| REQ-02 | Role-Based Navigation Hide restricted features from Viewers. | - "Settings" and "Billing" tabs are hidden for the Analyst role. - Server-side redirect (403) if an Analyst tries to access /billing directly. |
5. Data Architecture Notes
id: uuid (PK)
tenant_id: uuid (FK - Tenants)
email: varchar
role: enum('ADMIN', 'VIEWER')
6. API Contracts (Endpoints)
| Method | Endpoint | Description | Response |
|---|---|---|---|
| GET | /api/v1/workspaces/:id/mrr | Fetches monthly recurring revenue aggregated by month. | [{ month: 'Jan', value: 5000 }] |
| POST | /api/v1/workspaces/:id/invites | Invites a new user. Admin only. | { status: 'success' } |
7. System Architecture
8. Success Metrics (KPIs)
- <500
Query Latency (ms)
The 95th percentile (P95) load time for the dashboard must be under 500 milliseconds.
- 80%
Daily Active Users (DAU) Engagement
80% of active admins should interact with the new MRR chart at least once a week.