Status Summary
The analytics feature is partially built. Backend API endpoints exist and work. The frontend hooks that are supposed to call them are mostly hardcoded stubs. Do not expect the analytics dashboard to reflect real data.
Working: Backend Endpoints
These endpoints exist and return real data from the database.
Repository Analytics
GET /api/[org]/repository/analytics?repositorySlug=owner/repo&from=ISO&to=ISOrepositorySlugis required (format:owner/repo)fromandtoare optional ISO 8601 date strings- Reads from the
signalstable
Response:
{
"days": [{ "date": "2025-01-01", "commits": 12, "additions": 340, "deletions": 18 }]
}Organization Summary
GET /api/[org]/organization/summaryResponse:
{ "repositories": 42, "teams": 7, "members": 130 }Teams and Members
GET /api/[org]/teams/membersResponse:
[{ "teamSlug": "frontend", "memberCount": 8 }]Stubbed: Frontend Hooks
These hooks exist in hooks/queries/ but return hardcoded values. They do not call any backend endpoint.
| Hook | Returns |
|---|---|
useOrganizationSummaryQuery | { pendingInvitations: 0, totalTeams: 0 } always |
useAnalyticsOverviewQuery | { activeContributors: 0, pullRequestsOpened: 0 } always |
useActivityTimelineQuery | Empty array always |
useContributionHeatmapQuery | Empty array always |
useContributorProfileQuery | Hardcoded profile data |
useTeamMembershipsQuery | Empty array always |
The analytics dashboard shows zeros and empty charts because of these stubs, not because of missing data. The backend endpoints above would serve real data if the hooks were wired up.
Broken: Sync Status Hook
useSyncStatusQuery calls GET /api/sync/status. This route does not exist. The hook will always return a 404.
The actual sync endpoint is POST /api/[org]/leaderboard/sync. They are not equivalent — the sync endpoint is org-scoped and requires a POST.
Not Implemented: Analytics Rollups
lib/analytics/rollups.ts contains TypeScript type definitions only. There are no queries or aggregate computations implemented in it.