Skip to main content

Overview

:::info Source Sourced from services/analytics-service/SERVICE_OVERVIEW.md in the documentation repo. :::

1. Purpose

Learning analytics, business intelligence, dashboards, reports, exports. Consumes events from every service into ClickHouse; powers tenant-facing dashboards and platform metrics.

2. Bounded Context

Analytics (Supporting). UL: Event, MetricDefinition, Dashboard, Report, ExportJob, CohortDefinition.

3. Responsibilities

  • Firehose consumer: ingests ALL domain events (tenant-tagged Kafka).
  • Stores in ClickHouse (OLAP, per-tenant materialized views).
  • Serves: dashboards, canned reports, ad-hoc queries, exports.
  • AI insights (M5+): natural-language queries, anomaly detection, predictive analytics.
  • Compliance exports (GDPR access, audit).

4. Non-Responsibilities

  • Does not own business state (other services do).
  • Does not replace LRS (progress-service is authoritative).
  • Does not invent new facts (reads, aggregates, projects).

5. Dependencies

  • Upstream: every service (firehose).
  • Downstream: platform admin UI, tenant dashboards, compliance officer exports.
  • External: (optional) BI tools via read-replica (Looker, Metabase).

6. Slices

  • S0 (M0): Event pipeline skeleton.
  • S1 (M1): Basic learner dashboards.
  • S4 (M3): Compliance reports.
  • S6 (M5): AI insights v2; predictive analytics.

7. Architectural Freeze Points

  • F27 — Analytics event envelope (subset of platform envelope): M0 end.
  • F29 — Metric definitions registry: M3 start.

8. Key Invariants

  • Events pipeline is append-only (source-of-truth is domain event log).
  • Tenant isolation at every ClickHouse layer.
  • PII redacted before ingest unless audit-restricted access.
  • AI insights carry provenance + confidence.