feat: add analytics endpoints and market insights page - #1
Open
benedict-cmd wants to merge 2 commits into
Open
Conversation
- 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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type
Related Issue
Closes #
Testing
Screenshots (if UI change)