🔖 Title
Merchant Analytics, Portfolio and Leaderboard endpoints
📄 Description
merchants.controller.ts only exposes GET /merchants and GET /merchants/:id. There is no way to inspect a merchant's loan portfolio, repayment performance, or ranking against other merchants — needed for both the merchant dashboard and internal risk review.
✅ Tasks to complete
📚 Documentation/context for AI
(This link never should removed)
https://github.com/TrustUp-app/TrustUp-API/tree/main/docs
🗒️ Additional notes
Greenfield — no portfolio/analytics/leaderboard logic exists today in merchants.service.ts.
🔖 Title
Merchant Analytics, Portfolio and Leaderboard endpoints
📄 Description
merchants.controller.tsonly exposesGET /merchantsandGET /merchants/:id. There is no way to inspect a merchant's loan portfolio, repayment performance, or ranking against other merchants — needed for both the merchant dashboard and internal risk review.✅ Tasks to complete
GET /merchants/:id/portfolio— active loans, repayment rate, volumeGET /merchants/:id/analytics— time-series volume, default rate, avg loan sizeGET /merchants/leaderboard— ranked merchants by configurable metric📚 Documentation/context for AI
(This link never should removed)
https://github.com/TrustUp-app/TrustUp-API/tree/main/docs
🗒️ Additional notes
Greenfield — no portfolio/analytics/leaderboard logic exists today in
merchants.service.ts.