Skip to content

feat: Review & Rating API#134

Merged
SudiptaPaul-31 merged 1 commit into
Lumina-eX:mainfrom
Gezziy:rating-api
Jun 25, 2026
Merged

feat: Review & Rating API#134
SudiptaPaul-31 merged 1 commit into
Lumina-eX:mainfrom
Gezziy:rating-api

Conversation

@Gezziy

@Gezziy Gezziy commented Jun 24, 2026

Copy link
Copy Markdown

closes #123

Summary of changes

This PR implements the Review and Rating API to manage freelancer feedback according to Issue #123.

  • Introduces 009-reviews-schema.sql which explicitly defines the schema, mapping contract_id to user relationships.
  • Adds POST /api/reviews allowing clients to submit reviews containing a rating (1-5), verified by zod schema parsing.
  • Adds GET /api/reviews/[userId] that fetches paginated results using dynamic LIMIT/OFFSET queries, executing efficiently in a single database round-trip via window functions.
  • Implements comprehensive Vitest coverage in __tests__/api/reviews.test.ts to assert uniqueness bounds, data types, and routing logic.

Reason for the changes

To guarantee fair, validated feedback within the TaskChain ecosystem. By tying reviews to explicit contracts and enforcing uniqueness, we avoid system manipulation, allowing top-performing freelancers to build a transparent track record that clients can trust.

- Add database schema migration for reviews with contract uniqueness constraints
- Create POST /api/reviews endpoint to submit and validate freelancer reviews
- Create GET /api/reviews/[userId] endpoint with pagination support
- Author unit tests to verify constraint violations and paginated fetching logic
@drips-wave

drips-wave Bot commented Jun 24, 2026

Copy link
Copy Markdown

@Gezziy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@SudiptaPaul-31 SudiptaPaul-31 merged commit dd7eed3 into Lumina-eX:main Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Review & Rating API

3 participants