Service Layer medium complexity backend
0
Dependencies
1
Dependents
13
Entities
0
Integrations

Description

Backend service that powers the activity feed by querying activities with cursor-based pagination on created_at for stable ordering under concurrent inserts. Joins activities, users, contacts, and activity_approvals tables, applying parameterized WHERE clauses for filtering. Enforces role-based data scoping so coordinators see only their local association and org admins see the full organization.

Feature: Activity Feed

activity-feed-service

Responsibilities

  • Execute paginated activity queries with cursor-based pagination on created_at
  • Apply parameterized filter clauses for date range, peer mentor, activity type, and status
  • Enforce role-based data scoping (coordinator sees local association, org admin sees full organization)
  • Join activities with users, contacts, and activity_approvals for complete feed items
  • Provide activity count and filter option metadata for the UI

Interfaces

getActivityFeed(organizationId: string, filters: ActivityFilters, cursor?: string, limit?: number): PaginatedFeedResponse
getFilterOptions(organizationId: string): FilterOptions
getActivityCount(organizationId: string, filters: ActivityFilters): number
getFeedItemDetail(activityId: string): FeedItemDetail

Relationships

Dependents (1)

Components that depend on this component