Activity Feed
Feature Detail
Description
The Activity Feed feature presents a chronological stream of recent activity events across the organization, giving administrators and coordinators live visibility into what peer mentors are doing. Each feed item shows the activity type, the peer mentor, the associated contact, timestamp, and current status (pending, approved, flagged). The feed supports filtering by date range, peer mentor, activity type, and status, allowing coordinators to quickly locate specific records that require attention or follow-up.
User Flow
Analysis
Without a live activity feed, coordinators must proactively search for new activity submissions, leading to delayed approvals, missed flags, and poor oversight of the peer mentor program. This feature transforms the admin portal from a passive reporting tool into an active operational dashboard, enabling coordinators to respond quickly to new registrations and flag anomalies before they propagate into Bufdir reports. For organization administrators, the feed provides accountability and transparency across the entire program. The ability to filter and scan recent activity also reduces the time spent on manual audits, directly lowering administrative costs and improving the quality of submitted data.
The activity feed is implemented as a paginated, filterable list component in the Next.js admin portal, backed by a `/api/v1/activities?organizationId=&page=&filters=` REST endpoint. PostgreSQL queries use cursor-based pagination on `activities.created_at` for stable ordering under concurrent inserts. Feed items join `activities`, `users` (peer mentor), `contacts`, and `activity_approvals` tables. Filters are applied as parameterized WHERE clauses to prevent SQL injection. The component uses React Query or SWR for client-side data fetching with optimistic UI for approval actions. Real-time updates can be layered via polling or WebSocket in a later phase. Role scoping mirrors the KPI dashboard: coordinators see their local association, org admins see the full organization.
Components (114)
Shared Components
These components are reused across multiple features
User Interface (12)
Service Layer (34)
Data Layer (22)
Infrastructure (38)
User Stories
No user stories have been generated for this feature yet.