ActivityFeedService
Component Detail
Service Layer
medium complexity
backend
0
Dependencies
0
Dependents
4
Entities
0
Integrations
Description
A backend service that aggregates and prioritizes recent platform events scoped to the authenticated admin's organization. It queries activity logs, expense submissions, assignment status changes, and user invitations, then sorts and groups results for consumption by the dashboard widget.
activity-feed-service
Sources & reasoning
Lines 325-327 place "Aktivitetsoversikt" explicitly in Admin Web Portal MVP scope (Fase 1). Line 116 surfaces the oversight gap - 40% dissatisfied with follow-up - motivating a real-time feed that gives admins immediate visibility into peer mentor activity. Both signals point to MVP, normalized from Fase 1 ordinal position.
-
docs/source/likeperson.md · line 325-327Admin Web Portal (MVP scope): Aktivitetsoversikt og grunnleggende statistikk 2 innloggede brukerroller: Organisasjonsadministrator, Global Administrator
-
docs/source/likeperson.md · line 116Oppfølging av likepersoner: 40 % var ikke fornøyd med oppfølgingen i spørreundersøkelse. Scenariobaserte push-meldinger og kalendersynkronisering.
Responsibilities
- Fetch recent events from activity logs, expenses, assignments, and invitations tables
- Filter all results to the authenticated admin's organization scope
- Sort and group items by recency bucket (today, yesterday, this week)
- Elevate actionable items (pending approvals, overdue follow-ups) to the top of the feed
- Return paginated feed results with direct deep-link URLs per item
Interfaces
getFeedItems(adminId: string, orgId: string, limit?: number): Promise<ActivityFeedItem[]>
getGroupedFeed(adminId: string, orgId: string): Promise<GroupedFeedResult>
markItemSeen(adminId: string, itemId: string): Promise<void>
Related Data Entities (4)
Data entities managed by this component