Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

03 — User Journey (Dashboard Module)

End-to-end journeys for the dashboard. Routes/endpoints per 12_API_Mapping.md; states per 06_Screen_Specifications.md; WS behaviour per 13_State_Management.md. Steps marked (planned) / (forward-looking) are not implemented today.


J1 — Admin morning check ("the day at a glance") — primary

StepActor actionSystem / screenSource
1Opens app → lands on Dashboard HomeSession valid; OverviewCubit loads12_API_Mapping.md E1
2(implicit)GET /api/v1/dashboard/overview → skeleton → KPI cardsdashboard.controller.ts:13-17
3Reads KPI row: students 812, teachers 34, staff 21, attendance 93%, dues ₹4.2LNumbers + trend (planned) + stale badgedashboard.service.ts:50-70
4Sees attendance 93% (summary present: …)Taps attendance card → Attendance module (daily view)link only; attendance data owned by Attendance module
5Notices pending invoices countTaps finance card → Fees module invoices list (filtered issued/partial/overduedashboard.service.ts:36-37)link only
6Pulls-to-refresh mid-morningAppRefreshIndicator → cache-bypassing refetch10_Interaction_Specification.md §2
7Leaves tab open; worker marks attendance elsewhereWS event AttendanceMarked (Dashboard.md:34) arrives on tenant:{id} room (ws.gateway.ts:50) → cubit invalidates overview → silent refresh13_State_Management.md §5

Happy path time: ~30 s glance; failures degrade to AppEmptyState / AppErrorState with retry (06_Screen_Specifications.md §4).

J2 — Month-end finance review (admin / accountant (planned))

StepActor actionSystem / screen
1Opens dashboard, reads finance.pendingInvoices + totalDueAmountKPI cards (dashboard.service.ts:66-69)
2Clicks finance cardFees module (list) — filter mirrors service statuses issued/partial/overdue
3Returns → dashboard refreshes on focus (didChangeDependencies re-fetch)cache TTL 60 s (Dashboard.md:41)
4(Accountant persona) (planned): dashboard shows finance-only layoutneeds dashboard.read on accountant role (02_User_Personas.md P2)

J3 — Attention-driven refresh (live events)

StepActor actionSystem / screen
1Dashboard open while cashier records a paymentPaymentRecorded/InvoiceGenerated broadcast (Dashboard.md:34; ws-bridge.service.ts:16-22)
2Cubit receives event → invalidates overview key → refetches13_State_Management.md §5
3Finance card updates without manual pullin-place animation Mo-m-base

J4 — Widget customization (planned)

StepActor actionSystem / screen
1Opens "Customize" (only if permission dashboard.widget.managepermissions.constants.ts:38)Widget palette sheet (planned)
2Toggles attendance chart off, reorders finance cardGET /dashboard/widgets + PATCH /dashboard/widgets/:id (planned) (Dashboard.md:26-27)
3Saves → overview refetches with new ordercache invalidated server-side (planned)
4(No permission)"Customize" hidden — never a 403 dead-end (00-shared/06 §5)

J5 — Empty / first day of tenancy

StepActor actionSystem / screen
1Fresh tenant, no datacounts 0, attendance rate 0 (dashboard.service.ts:64 returns 0 when no records), no invoices
2Screen shows zero-state cards + AppEmptyState hint "Invite your first student"06_Screen_Specifications.md §4

J6 — Offline / degraded

StepActor actionSystem / screen
1No network on openAppOfflineBanner + last-good cached KPI payload rendered (TTL-flagged)
2Tap retrybanner persists until success (00-shared/05, offline baseline)

Journey map (mermaid)

flowchart LR
    A[Login] --> B[Dashboard Home]
    B -->|tap KPI| C[Students / Fees / Attendance module]
    B -->|pull-to-refresh| D[Refetch overview, bypass cache]
    B -->|WS event| E[Invalidate + silent refetch]
    B -->|Customize (planned)| F[Widget palette]
    B -->|no data| G[Zero-state]
    B -->|offline| H[Last-good + banner]

Failure points (tracked in 14_QA_Checklist.md)

  1. Cache staleness beyond 60 s (no worker yet — live scans today; 01_Product_Overview.md §3 gap).
  2. WS event storms on tenant:{id} room (all events broadcast — ws-bridge.service.ts:16-22) → debounce refetch.
  3. Role without dashboard.read sees nothing → (planned) role views.