Overview
�nalytics.service.ts is 977 bytes with no aggregation logic. The analytics controller exposes 14 KB of endpoints (platform stats, quest analytics, user analytics, reports) but they all call sub-services that return empty data.
Background
Aggregator classes exist in �ggregators/ but are not called from the main service. The analytics processor in BullMQ runs scheduled jobs but the computed data is never materialised.
Specifications
Features:
- getQuestAnalytics(questId) returning completion rate, avg time, submission count
- getPlatformStats() returning total quests, total payouts, active users
- Scheduled snapshot job writing to AnalyticsSnapshot entity
Tasks:
- Wire aggregators into �nalytics.service.ts
n- Implement analytics snapshot job in �nalytics.processor.tsn- Add integration tests
Impacted Files:
- BackEnd/src/modules/analytics/analytics.service.ts
n- BackEnd/src/modules/analytics/services/platform-analytics.service.tsn
Acceptance Criteria:
- /analytics/platform returns real aggregated data
- Snapshots stored daily by scheduler
Overview
�nalytics.service.ts is 977 bytes with no aggregation logic. The analytics controller exposes 14 KB of endpoints (platform stats, quest analytics, user analytics, reports) but they all call sub-services that return empty data.
Background
Aggregator classes exist in �ggregators/ but are not called from the main service. The analytics processor in BullMQ runs scheduled jobs but the computed data is never materialised.
Specifications
Features:
Tasks:
n- Implement analytics snapshot job in �nalytics.processor.tsn- Add integration testsImpacted Files:
n- BackEnd/src/modules/analytics/services/platform-analytics.service.tsnAcceptance Criteria: