Add campaign team collaboration and public API v1 platform.#261
Merged
Conversation
Closes Savitura#248 and Savitura#249 by completing invite flows, role-based permissions, the Team dashboard tab, versioned /v1 endpoints with API key auth, and the Developer page API explorer. Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
campaign_memberswith invite/resend/cancel flows (7-day token expiry), role-based permissions (owner, manager, editor, viewer), a Team tab on the campaign dashboard, and an invite preview onAcceptInvite.jsx./api/v1and/v1endpoints with Bearercp_live_*API key auth, 100 req/min rate limiting, Stellar tx-hash contribution recording, OpenAPI docs at/v1/docs, and a live API explorer on the Developer page.Closes #248
Closes #249
Backend
Team & invites (#248)
backend/db/migrations/20260527_campaign_members.sqlPOST /api/campaigns/:id/members/invite— email invite with 7-day tokenGET /api/invites/:token— invite preview (campaign name + role)POST /api/invites/:token/accept— accept invitationPOST /:id/members/:memberId/resend,DELETE /:id/members/invites/:memberId— pending invite managementPATCH /:id/members/:userId(owner only),DELETE /:id/members/:userId(last-owner guard)GET /campaigns/:idresolvesuser_rolefrom session cookiePublic API (#249)
GET /v1/campaigns,GET /v1/campaigns/:idGET/POST /v1/campaigns/:id/contributions(Horizon-verified Stellar tx)GET /v1/users/mePOST /api/auth/api-keysalias alongside/api/api-keys/v1/docsand/api/v1/docsFrontend
Test plan
psql $DATABASE_URL -f backend/db/migrations/20260527_campaign_members.sqlGET /api/v1/campaignsunauthenticated (200)GET /api/v1/users/mewithout key (401); withBearer cp_live_…(200)POST /api/v1/campaigns/:id/contributionswith valid Stellar tx hash creates contribution/v1/docsand verify OpenAPI spec loadscd backend && npm test—campaignPermissions.test.js,v1.test.js,authScopes.test.js