Repository navigation
Design and implement the Governance module (deferred) behind its existing feature flag #337
Description
Difficulty: Expert
Type: feature
Background
The README already reserves NEXT_PUBLIC_FEATURE_GOVERNANCE (default false everywhere) and lists "Advanced analytics and governance" as intentionally deferred, but no governance UI or data model currently exists in this frontend.
Problem
Communities have no way to propose, discuss, or vote on decisions (role policy changes, resource additions, community rules) through the dashboard, and there's no defined contract for how this frontend would talk to a (currently non-existent, or future guildpass-core) governance backend.
Expected outcome
A feature-flagged Governance module lets members view active proposals, cast votes (weighted by role/tier if applicable), and lets admins create new proposals, backed by a clearly documented API contract this frontend expects from guildpass-core (to be implemented there separately), with a full mock-mode implementation so the module is demoable without a live governance backend.
Suggested implementation
- Design the proposal/vote data shapes in
lib/api/types.ts(or a new governance-specific types module) and document the expectedguildpass-coreendpoints (e.g.,GET /v1/governance/proposals,POST /v1/governance/proposals/:id/vote) in a newdocs/governance-contract.md. - Implement
lib/api/mock.tssupport for the full proposal lifecycle (draft → active → closed → resolved) with simulated votes. - Build the
/governanceroute (proposal list, proposal detail with voting UI, admin proposal-creation form), gated via<FeatureGate enabled={features.governance} name="Governance">following the documented pattern. - Ensure vote-casting respects the existing SIWE-authenticated admin/member patterns (voting likely requires an authenticated wallet at minimum, even if not full admin SIWE).
- Add
lib/api/live.tsimplementations calling the documented (new) endpoints, with clear503/graceful-degradation behavior if the live backend doesn't yet support them (consistent with the existing integration-gateway pattern).
Acceptance criteria
- Module fully functions in mock mode (create proposal, vote, see results)
- API contract for
guildpass-coredocumented clearly enough to be implemented independently - Live-mode implementation degrades gracefully (not a hard crash) if the backend doesn't support governance endpoints yet
- Module is properly hidden/flagged per the existing feature-flag pattern
Likely affected files/directories
app/governance/(new)lib/api/mock.ts,lib/api/live.ts,lib/api/types.tslib/features.tsdocs/governance-contract.md(new)
Activity
Six2world commentedon Jul 27, 2026
I'll take this one.
Plan:
lib/api/types.ts(or newlib/api/governance-types.ts) covering the full lifecycle: draft → active → closed → resolved, plus vote weighting by role/tier.guildpass-corecontract indocs/governance-contract.md— endpoints likeGET /v1/governance/proposalsandPOST /v1/governance/proposals/:id/vote, request/response shapes, auth requirements.lib/api/mock.tswith a full simulated lifecycle so the module is demoable standalone./governance(list, detail + voting UI, admin create-proposal form) gated behind<FeatureGate enabled={features.governance} name="Governance">.lib/api/live.tscalls to the documented endpoints with graceful 503/degradation handling ifguildpass-coredoesn't support them yet — no hard crash.Assigning to myself.
grantfox-oss commentedon Jul 27, 2026
🦊 GrantFox — @Six2world has been assigned to this issue as part of the Official Campaign | FWC26 campaign!
Next steps:
Closes #337)Good luck! Track your progress on GrantFox.
grantfox-oss commentedon Jul 29, 2026
🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign | FWC26 campaign!
@Six2world's PR #357 was approved and merged by @Lakes41.
🏆 @Six2world: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (83 total points). Track your full progress on GrantFox.
👏 Great work, @Six2world! Keep contributing to Adamantine-guild.