Overview
The platform exposes a createBounty GraphQL mutation but has no UI route to actually create one. Sponsors can only view, review, and approve bounties; they cannot create them through the app. This is a critical missing flow that blocks any new sponsor from listing work on the platform.
Goals
- Allow authenticated sponsors to create bounties of all four types (FIXED_PRICE, COMPETITION, MILESTONE_BASED, lightning round)
- Validate inputs client-side (title, reward amount, deadlines, category)
- Wire to the existing
createBounty mutation
- Surface success and error states clearly
- Redirect to the new bounty detail page on success
Implementation Details
1. Create the bounty creation route
Create: app/bounty/create/page.tsx
- Multi-step form (basic info → rewards/deadline → review)
- Type selector (FIXED_PRICE, COMPETITION, MILESTONE_BASED)
- Reward amount + currency picker (XLM, USDC, EURC)
- Deadline picker
- Optional
bountyWindowId for Lightning Rounds
- GitHub issue URL field (required for FIXED_PRICE)
- Cover description (markdown editor optional)
2. Validation
- Min cover description length
- Reward amount > 0
- Deadline must be in the future
- For COMPETITION: require start/end dates
- For MILESTONE_BASED: require at least 2 milestones with payout split summing to 100%
3. Create the mutation hook
Create: hooks/use-create-bounty.ts
- Wraps the generated
useCreateBountyMutation
- Invalidates
bountyKeys.lists() on success
- Returns toast and redirect
4. Permission gating
Modify: components/global-navbar.tsx
- Show "Create Bounty" CTA only for authenticated users with sponsor role (or organization membership)
Files Affected
Created
app/bounty/create/page.tsx
hooks/use-create-bounty.ts
components/bounty/bounty-create-form.tsx
Modified
components/global-navbar.tsx
Acceptance Criteria
Overview
The platform exposes a
createBountyGraphQL mutation but has no UI route to actually create one. Sponsors can only view, review, and approve bounties; they cannot create them through the app. This is a critical missing flow that blocks any new sponsor from listing work on the platform.Goals
createBountymutationImplementation Details
1. Create the bounty creation route
Create:
app/bounty/create/page.tsxbountyWindowIdfor Lightning Rounds2. Validation
3. Create the mutation hook
Create:
hooks/use-create-bounty.tsuseCreateBountyMutationbountyKeys.lists()on success4. Permission gating
Modify:
components/global-navbar.tsxFiles Affected
Created
app/bounty/create/page.tsxhooks/use-create-bounty.tscomponents/bounty/bounty-create-form.tsxModified
components/global-navbar.tsxAcceptance Criteria
/bounty/[id]