Service Layer high complexity backend
2
Dependencies
2
Dependents
3
Entities
0
Integrations

Description

Backend service that aggregates a peer mentor's activity, contact, event, and expense data across a calendar year into a structured annual summary payload. Triggered server-side on a schedule (late December) and caches results per user so the mobile app fetches pre-computed data without real-time calculation overhead. Includes geographic reach computation and milestone detection.

Feature: Annual Summary (Wrapped)

summary-generation-service

Responsibilities

  • Aggregate yearly activity counts, hours, and contact stats per user
  • Compute geographic reach from activity location data
  • Detect and rank top milestones and personal bests
  • Cache generated summary per user for fast mobile retrieval
  • Expose endpoint for on-demand regeneration by admins

Interfaces

generateSummary(userId: string, year: number): Promise<AnnualSummary>
getSummary(userId: string, year: number): Promise<AnnualSummary | null>
triggerBatchGeneration(year: number): Promise<BatchJobResult>

Relationships

Dependencies (2)

Components this component depends on

Dependents (2)

Components that depend on this component

Related Data Entities (3)

Data entities managed by this component