Skip to content

Complete Analytics Service Aggregation Logic #1692

Description

@RUKAYAT-CODER

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.tsn- Implement analytics snapshot job in �nalytics.processor.tsn- Add integration tests

Impacted Files:

  • BackEnd/src/modules/analytics/analytics.service.tsn- BackEnd/src/modules/analytics/services/platform-analytics.service.tsn

Acceptance Criteria:

  • /analytics/platform returns real aggregated data
  • Snapshots stored daily by scheduler

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignStellar WaveIssues in the Stellar wave programbackendenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions