Skip to content

Build saga-style tournament lifecycle (create → join → lock → settle → payout) #502

Description

@josephchimebuka

Summary

Replace thin mock/Prisma tournament fragments with a full lifecycle service: create tournament, atomic joins, lock entries, settle based on linked rounds, and payout winners.

Why this matters

Tournaments are campaign-visible features but still lack a coherent end-to-end domain workflow.

Where to work

  • src/services/tournament.service.ts
  • src/routes/tournaments.routes.ts
  • Prisma Tournament / participants
  • seed scripts

What to implement

  1. Model tournament states and transitions.
  2. Implement create/list/join/lock/settle endpoints or jobs.
  3. Tie settlement to resolved rounds/leaderboard rules.
  4. Atomic join capacity (already partially done) extended to settlement.
  5. Integration tests for full happy path + full tournament.

Acceptance criteria

  • Tournament can be created and joined in DB mode.
  • Settlement produces deterministic winners/payouts.
  • Illegal actions in wrong state rejected.
  • Tests cover lifecycle.

Done when

Tournaments work as a complete product flow, not isolated endpoints.

Metadata

Field Value
Difficulty advanced
Complexity high
Good first contribution? no

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSGrantFox OSS campaignMaybe RewardedPotential reward for contributorsStellar WaveIssues in the Stellar wave programThird CampaignCampaign: Third CampaignapiAPI routes and contractsarchitectureArchitecture and boundariesbackendBackend engineering

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions