Skip to content

[FEAT] Build Repair Job Lifecycle API (Request, Quote, Milestone Payments) #25

Description

@Rampop01

Issue #55

[FEAT] Build Repair Job Lifecycle API (Request, Quote, Milestone Payments)

🟡 Priority: High
Difficulty: Hard
Estimated Effort: 4-5 days
Relevant Files: src/controllers/repair.controller.ts, src/services/repair.service.ts, src/routes/repair.routes.ts
Labels: api, repair, priority:high

Requirements

  1. Repair Lifecycle Endpoints

    • Implement POST /repair/request for users to submit a repair request to a specific technician.
    • Implement POST /repair/:id/quote for a technician to respond with a price and milestone breakdown.
    • Implement PATCH /repair/:id/accept-quote for the user to accept and fund the repair escrow on-chain.
    • Implement PATCH /repair/:id/milestone/:n/complete for the technician to mark a milestone as done and trigger the partial payout.
  2. Security & Access Control

    • Strict ownership checks on all PATCH endpoints: only the involved technician or user can mutate the repair record.
    • Validate that a milestone cannot be marked complete if the previous milestone is not yet approved by the user.
  3. Testing Requirements

    • Integration test: Walk through the full lifecycle (Request -> Quote -> Accept -> Milestone 1 complete -> Milestone 2 complete -> Final release).
    • Test that an unauthorized user attempting to accept a quote receives a 403 Forbidden.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions