Skip to content

feat: add analytics endpoints and market insights page - #1

Open
benedict-cmd wants to merge 2 commits into
mainfrom
my-fix
Open

feat: add analytics endpoints and market insights page#1
benedict-cmd wants to merge 2 commits into
mainfrom
my-fix

Conversation

@benedict-cmd

Copy link
Copy Markdown
Owner
  • GET /api/jobs/analytics/categories: returns jobCount, avgBudgetXLM, filledCount, avgDaysToFill per category
  • GET /api/jobs/analytics/overview: returns platform-wide totals
  • Add getCategoryAnalytics and getAnalyticsOverview to jobService.js
  • Add /pages/insights.tsx with overview cards and category stats table
  • Add Market Insights link to Navbar with en/es translations

Summary

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Smart contract change

Related Issue

Closes #

Testing

  • Tested locally on Testnet
  • No TypeScript / Rust errors
  • Docs updated if needed

Screenshots (if UI change)

- GET /api/jobs/analytics/categories: returns jobCount, avgBudgetXLM,
  filledCount, avgDaysToFill per category
- GET /api/jobs/analytics/overview: returns platform-wide totals
- Add getCategoryAnalytics and getAnalyticsOverview to jobService.js
- Add /pages/insights.tsx with overview cards and category stats table
- Add Market Insights link to Navbar with en/es translations
- jobService.js: remove duplicate imports (getTimezoneOffset, isBlocked)
- jobService.js: add missing visibility param to createJob signature
- jobService.js: add visibility column to INSERT query
- jobService.js: fix listJobs to accept viewerAddress and includeExpired params
- jobService.js: fix missing \$-prefix on all SQL placeholders in listJobs
- jobService.js: fix raiseDispute/resolveDispute using undefined query() -> pool.query()
- jobService.js: fix export syntax from ES6 export default to CommonJS module.exports
- jobs.js: remove duplicate const declarations for rateLimiters, jobService, verifyJWT
- jobs.js: add missing imports (jobInvitationService, contractAuditService, jobDraftService, recommendationService)
- jobs.js: define missing reportJobRateLimiter and jobReports map
- jobs.js: fix analytics routes to /analytics/categories and /analytics/overview (under /api/jobs)
- jobs.js: replace undefined incrementViewCount with incrementShareCount
- jobs.js: replace undefined inviteFreelancerToJob with jobInvitationService call
- jobs.js: replace undefined logContractInteraction with contractAuditService call
- jobs.js: replace undefined getRecommendedJobs with recommendationService call
- jobs.js: replace undefined extendJobExpiry with inline pool query
- jobs.js: replace undefined trackReferral with incrementShareCount proxy
- server.js: add missing sanitizeMiddleware import
- server.js: add missing processPendingNotifications import
- server.js: fix unclosed bootstrap() try block (missing closing brace)
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.

1 participant