Summary Generation Service
Component Detail
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.
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
Related Data Entities (4)
Data entities managed by this component