Summary Aggregation Service
Component Detail
Service Layer
high complexity
backend
0
Dependencies
0
Dependents
6
Entities
0
Integrations
Description
Server-side backend service that computes per-user yearly statistics from the activities, contacts, events, and achievements tables. Runs as a scheduled or on-demand job that writes aggregated results to the annual_summaries table. Designed to run server-side to avoid heavy client computation and prevent privacy leakage in shared content.
summary-aggregation-service
Responsibilities
- Aggregate activity counts, hours, and contact interactions per user per year
- Pull achievement and milestone data for the year
- Write computed summary record to annual_summaries table
- Support on-demand recomputation for a specific user
- Enforce privacy rules — exclude contact-identifiable data from stored summary
Interfaces
computeAnnualSummary(String userId, int year)
computeAllSummaries(int year)
getSummaryForUser(String userId, int year)
invalidateSummary(String userId, int year)
scheduleYearEndComputation()
Related Data Entities (6)
Data entities managed by this component