Skip to content

Implement Application-Based Bounty Selection Flow (Model 2) #146

@0xdevcollins

Description

@0xdevcollins

Feature: Complete Application-Based Bounty Selection Flow

Overview

While the frontend has partial Application model support, it is incomplete. The full Model 2 flow requires: proposal submission with portfolio, creator-side application review dashboard, applicant selection triggering exclusive claim, and escrow lock on selection. The contract's apply(), select_applicant(), submit_work(), and approve_submission() methods need proper frontend integration.

Depends on: #139 (TypeScript contract bindings)


Goals

  • Contributors submit structured proposals (approach, timeline, portfolio)
  • Creators review applications in a dashboard with comparison tools
  • Selection triggers on-chain assignment via select_applicant()
  • Selected contributor submits work via submit_work()
  • Creator approves and releases escrow via approve_submission()

Contract Methods Used

BountyRegistry.apply(applicant, bounty_id, proposal)
BountyRegistry.select_applicant(creator, bounty_id, applicant)
BountyRegistry.submit_work(contributor, bounty_id, work_cid)
BountyRegistry.approve_submission(creator, bounty_id, points)

Implementation Details

1. Enhanced Application Form

Modify: components/bounty/application-dialog.tsx

  • Structured fields: approach, estimated timeline, relevant experience
  • Portfolio/past work links
  • Proposal preview before submission
  • Calls apply() contract method

2. Creator Application Review Dashboard

Create: components/bounty/application-review-dashboard.tsx

  • List all applications with:
    • Applicant reputation score and tier
    • Proposal summary
    • Past completion stats
    • Timeline estimate
  • Side-by-side comparison mode
  • "Select" / "Decline" actions per applicant
  • Selection calls select_applicant() on-chain

3. Post-Selection Work Submission

Modify: app/bounty/[bountyId]/page.tsx

  • Selected applicant sees "Submit Work" form
  • Upload/link deliverables (stored as IPFS CID)
  • Calls submit_work() on-chain
  • Status moves to InReview

4. Creator Approval Panel

Create: components/bounty/submission-approval-panel.tsx

  • View submitted work
  • "Approve & Release Payment" with reputation points input
  • "Request Revisions" with feedback
  • Calls approve_submission() to release escrow

Files Affected

Modified

  • components/bounty/application-dialog.tsx
  • app/bounty/[bountyId]/page.tsx

Created

  • hooks/use-bounty-application.ts
  • components/bounty/application-review-dashboard.tsx
  • components/bounty/submission-approval-panel.tsx

Acceptance Criteria

  • Structured application form with proposal fields
  • Creator sees all applications in review dashboard
  • Selection triggers on-chain assignment
  • Selected contributor can submit work
  • Creator can approve and release payment
  • Rejected applicants notified
  • Full flow works end-to-end with contract calls

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions