Difficulty: Hard
Type: Refactor
Summary
Refactor dashboard overview statistics so they are derived from typed services rather than hard-coded or directly imported mock arrays.
Current Behaviour
The dashboard relies on mock data for passes, guilds, members, and activity. Statistics can drift from source data if each page computes values independently.
Expected Behaviour
Dashboard stats should come from a shared service that computes totals, active counts, recent activity, and trend-ready values consistently.
Suggested Implementation
Add a dashboard metrics service that consumes pass, guild, member, and activity repositories. Use it on the overview page and add tests for edge cases such as empty data, draft passes, inactive members, and failed activity fetches.
Files or Areas Likely Affected
apps/dashboard/app/dashboard/page.tsx
apps/dashboard/lib/data/
apps/dashboard/lib/metrics/
apps/dashboard/lib/mock-data.ts
apps/dashboard/test/
Acceptance Criteria
Additional Notes
Assumption: current mock data remains the source for local development until live storage is introduced.
Difficulty: Hard
Type: Refactor
Summary
Refactor dashboard overview statistics so they are derived from typed services rather than hard-coded or directly imported mock arrays.
Current Behaviour
The dashboard relies on mock data for passes, guilds, members, and activity. Statistics can drift from source data if each page computes values independently.
Expected Behaviour
Dashboard stats should come from a shared service that computes totals, active counts, recent activity, and trend-ready values consistently.
Suggested Implementation
Add a dashboard metrics service that consumes pass, guild, member, and activity repositories. Use it on the overview page and add tests for edge cases such as empty data, draft passes, inactive members, and failed activity fetches.
Files or Areas Likely Affected
apps/dashboard/app/dashboard/page.tsxapps/dashboard/lib/data/apps/dashboard/lib/metrics/apps/dashboard/lib/mock-data.tsapps/dashboard/test/Acceptance Criteria
Additional Notes
Assumption: current mock data remains the source for local development until live storage is introduced.