Dashboard / Telemetry — Overview
Dashboard / Telemetry is the operations-statistics domain (operations analytics): the Analytics Dashboard for Staff/Admin, the Customer Dashboard for customers, and username attribution in Application Insights telemetry for tracing.
Dashboard is a read-only query aggregate — no state, no domain events, no state transitions. Every figure is computed from the data of other domains (Booking, Attendance, Master Data) via aggregate query + cache TTL.
At a glance
What the dashboard covers
| Area | One line |
|---|---|
| Analytics Dashboard | Staff/Admin analytics scoped by BusinessUnit: attendance, booking, revenue, account/attendee. |
| Customer Dashboard | Customer-facing page: account info, active bookings, unpaid invoices, booking calendar. |
| Cache TTL/refresh | Every endpoint serves through cache with its own TTL; refresh/invalidate/status APIs exist, while consistency remains eventual and there is no event invalidation. |
| Validation | BU must be active, fromDate ≤ toDate, site belongs to BU, groupBy whitelist, JWT required. |
| User telemetry | Sets AuthenticatedUserId + custom property userName on requests in Application Insights. |
Suggested reading order
- End-user view — what Staff/Admin and customers see.
- Core concepts — sub-aggregates, metric formulas, invariants.
- Architecture & data — the Topi → Tuke → Tux chain, cache, timezone, telemetry.
- Data & read/write tables — tables the dashboard reads from other domains.
- Common cases — lagging figures, timezone, site filter, telemetry.
Related
- Booking — source of
TermBooking/TermBookingOrder(StatusId) and attendance. - Shared platform → Timezone — BU local time and DST.
- Master Data — BusinessUnit, Org/Site, Account, Attendee, Program/Category for scoping.
Current implementation
/api/Statistics/*and Dashboard useIStatisticsServiceas the shared statistics source; Booking Manager does not recalculate booking statistics from page rows.- Operators can refresh a statistic type, invalidate a pattern and inspect cache status through
/api/Statistics/refresh,/invalidateand/cache/status. TTL/stale-data semantics remain; proactive background refresh is not an implemented behavior.
Real-world example: After an import, invalidate the booking cache or refresh the scoped statistic. → The next read recalculates from SQL without mutating Booking.