Service Layer medium complexity backend
0
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Backend service that aggregates activity data for the coordinator's team. Computes totals, distributions, trends, and per-mentor activity rollups scoped to organization and team membership, drawing on the same activity records produced by activity registration flows.

Feature: Coordinator Team Reports

team-stats-service

Sources & reasoning

§5 MVP scope names 'enkel statistikkvisning per likeperson og per koordinator' as Phase 1, and the Coordinator role in §4 is explicitly responsible for overseeing peer mentors from the mobile app - making a team-scoped stats view the natural mobile counterpart to the personal view, distinct from admin-portal Team Reports.

  • Enkel statistikkvisning per likeperson og per koordinator
  • Coordinator: Oversees peer mentors within their local association, dispatches assignments, approves expenses, registers on behalf of others. Logs in to the Mobile App only.
  • Oppfølging av likepersoner: 40 % var ikke fornøyd med oppfølgingen i spørreundersøkelse.

Responsibilities

  • Resolve the coordinator's team membership and enforce organization scoping
  • Aggregate activity totals and trends over the requested time range
  • Compute distributions by contact type and activity type
  • Produce per-mentor activity summaries including last-active timestamps
  • Apply role-based access checks before returning team data

Interfaces

getTeamReport(coordinatorId, timeRange): TeamReport
getMentorActivitySummaries(coordinatorId, timeRange): MentorActivitySummary[]
getActivityDistribution(coordinatorId, timeRange): DistributionBreakdown
getActivityTrend(coordinatorId, timeRange, bucket): TrendSeries

Related Data Entities (2)

Data entities managed by this component