Summary
Define a consistent caching and invalidation strategy for dashboard data so pages do not show stale members, passes, guilds, or activity after mutations.
Current Behaviour
Static mock data is imported directly and there is no cache lifecycle. Once live mode or mock persistence is added, the dashboard needs predictable invalidation behaviour.
Expected Behaviour
Data reads and mutations should use a shared cache strategy that refreshes affected entities after create, edit, role assignment, verification, or webhook updates.
Suggested Implementation
Introduce a query/cache layer using the project's chosen client-side state approach. Define stable query keys for guilds, passes, members, activity, and settings. Invalidate or update relevant keys after mutations.
Files or Areas Likely Affected
apps/dashboard/lib/data/
apps/dashboard/lib/cache/
apps/dashboard/app/passes/page.tsx
apps/dashboard/app/members/page.tsx
apps/dashboard/app/activity/page.tsx
apps/dashboard/components/
Acceptance Criteria
Additional Notes
Assumption: this can be implemented with React Query, SWR, or a project-approved equivalent.
Summary
Define a consistent caching and invalidation strategy for dashboard data so pages do not show stale members, passes, guilds, or activity after mutations.
Current Behaviour
Static mock data is imported directly and there is no cache lifecycle. Once live mode or mock persistence is added, the dashboard needs predictable invalidation behaviour.
Expected Behaviour
Data reads and mutations should use a shared cache strategy that refreshes affected entities after create, edit, role assignment, verification, or webhook updates.
Suggested Implementation
Introduce a query/cache layer using the project's chosen client-side state approach. Define stable query keys for guilds, passes, members, activity, and settings. Invalidate or update relevant keys after mutations.
Files or Areas Likely Affected
apps/dashboard/lib/data/apps/dashboard/lib/cache/apps/dashboard/app/passes/page.tsxapps/dashboard/app/members/page.tsxapps/dashboard/app/activity/page.tsxapps/dashboard/components/Acceptance Criteria
Additional Notes
Assumption: this can be implemented with React Query, SWR, or a project-approved equivalent.