Service Layer high complexity backend
3
Dependencies
1
Dependents
4
Entities
0
Integrations

Description

Backend service that aggregates yearly activity metrics per peer mentor by querying activities, event_participants, and activity_statistics tables. Runs aggregation as a background job or materialised view to avoid slow on-demand queries, and exposes a REST endpoint accepting a year parameter returning pre-aggregated totals.

Feature: Annual Summary (Wrapped)

summary-generation-service

Sources & reasoning

Server-side aggregation service required by the implementation notes: heavy aggregation runs as a background job or materialised view; exposes a dedicated summary endpoint accepting a year parameter and returning pre-aggregated totals.

No source references — this artifact was included based on reasoning alone (see above).

Responsibilities

  • Aggregate yearly totals from activities, event_participants, and activity_statistics
  • Run heavy aggregation as background job or materialised view
  • Expose REST endpoint with year parameter for individual and team summaries
  • Persist computed summaries to annual_summaries table

Interfaces

generateSummary(userId: String, year: int): AnnualSummary
generateTeamSummary(organizationId: String, year: int): TeamAnnualSummary
GET /api/v1/annual-summary?year={year}
triggerBackgroundAggregation(year: int)

Relationships

Dependencies (3)

Components this component depends on

Dependents (1)

Components that depend on this component