feat: add vendor trust score endpoint and leaderboard#64
Conversation
|
🎉 Thank you for your Pull Request! We're thrilled to have your contribution to FreshScan AI. Before we review, please make sure you have:
A maintainer will review your code as soon as possible! |
|
@Aharshi3614 is attempting to deploy a commit to the karan3431's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
CI is now green locally after fixing ruff + excluding notebook. Ready for review |
|
The backend ci is still failing as per my review the frontend styling is perfect and leaderboard looks perfect and completely aligns with our design system now. however the two small fixes first pull the main if any recent commits you are behind or something. Issues to be fix before merging:
|
|
Fixed all 4 issues raised in the review: 1.Import path: Changed from backend.vendors to from vendors in main.py so it resolves correctly when running from inside the backend folder |
|
All CI checks are now passing. I think its ready for final review and merge. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|

Description
Closes #45
This PR adds vendor trust score functionality and a public leaderboard.
Changes
Added vendor trust score API endpoints
GET /api/v1/vendors/leaderboardGET /api/v1/vendors/{vendor_id}/trust-scorePOST /api/v1/vendors/{vendor_id}/recalculateAdded vendor trust score calculation logic
Added trust badge and trend computation
Added SQL migration for vendor trust score fields
Added leaderboard frontend page
Registered vendor routes in the FastAPI backend
Notes
While testing locally, I encountered project import-path issues when running the backend with
uvicorn backend.main:app. The feature implementation itself is included in this PR, but additional package import adjustments may be required depending on the project's preferred backend execution method.