Difficulty: Expert
Type: feature
Background
The README lists "rewards visualization" among the intentionally deferred features, while guildpass-core's data model already includes badges (placeholder) and outbox event types that a reward/streak engine would emit if implemented there.
Problem
Even once guildpass-core can compute rewards/streaks (a related deferred capability there), this frontend has no visualization surface for members to see their own reward history/streaks or for admins to see community-wide reward distribution — and no defined contract for how this frontend would consume that data live.
Expected outcome
A member-facing "My Rewards" view shows streak status and reward/badge history with live updates as new rewards are earned, and an admin-facing "Community Rewards" view shows aggregate distribution, both built against a clearly documented (and mock-implemented) API contract this frontend expects from guildpass-core.
Suggested implementation
- Document the expected
guildpass-core endpoints (e.g., GET /v1/members/:address/rewards, GET /v1/community/rewards/summary) in a new docs/rewards-contract.md, aligned with the outbox event types already documented there if a reward engine is later built to emit them.
- Implement full mock support in
lib/api/mock.ts: seeded streak/reward history for members, and aggregate summary data for the admin view.
- Build the member "My Rewards" page (streak visualization, badge/reward timeline) and the admin "Community Rewards" page (distribution chart, top contributors).
- For "live updates," implement a polling-based refresh (React Query's
refetchInterval) as the practical, incrementally-adoptable approach, documenting how a future push-based mechanism (SSE/WebSockets) could replace it once guildpass-core supports it.
- Ensure the module is additive and doesn't assume
guildpass-core's reward engine exists yet — live-mode calls should degrade gracefully (clear "not yet available" state) if the backend doesn't implement the documented contract.
Acceptance criteria
Likely affected files/directories
app/rewards/ (new, member + admin views)
lib/api/mock.ts, lib/api/live.ts, lib/api/types.ts
docs/rewards-contract.md (new)
Difficulty: Expert
Type: feature
Background
The README lists "rewards visualization" among the intentionally deferred features, while
guildpass-core's data model already includesbadges(placeholder) and outbox event types that a reward/streak engine would emit if implemented there.Problem
Even once
guildpass-corecan compute rewards/streaks (a related deferred capability there), this frontend has no visualization surface for members to see their own reward history/streaks or for admins to see community-wide reward distribution — and no defined contract for how this frontend would consume that data live.Expected outcome
A member-facing "My Rewards" view shows streak status and reward/badge history with live updates as new rewards are earned, and an admin-facing "Community Rewards" view shows aggregate distribution, both built against a clearly documented (and mock-implemented) API contract this frontend expects from
guildpass-core.Suggested implementation
guildpass-coreendpoints (e.g.,GET /v1/members/:address/rewards,GET /v1/community/rewards/summary) in a newdocs/rewards-contract.md, aligned with the outbox event types already documented there if a reward engine is later built to emit them.lib/api/mock.ts: seeded streak/reward history for members, and aggregate summary data for the admin view.refetchInterval) as the practical, incrementally-adoptable approach, documenting how a future push-based mechanism (SSE/WebSockets) could replace it onceguildpass-coresupports it.guildpass-core's reward engine exists yet — live-mode calls should degrade gracefully (clear "not yet available" state) if the backend doesn't implement the documented contract.Acceptance criteria
Likely affected files/directories
app/rewards/(new, member + admin views)lib/api/mock.ts,lib/api/live.ts,lib/api/types.tsdocs/rewards-contract.md(new)