Open
Conversation
- Added Application model for storing country-based job application data - Implemented map analytics service with time-based filtering (weekly/monthly/yearly/all) - Added role-based filtering with 24 professional job titles - Created comparison data endpoints with percentage change calculations - Implemented multi-tier caching system (analytics, static, general) - Added REST API endpoints: * GET /api/analytics/country-applications - Main map data endpoint * GET /api/analytics/roles - Available roles for dropdown * GET /api/map-analytics/* - Extended analytics endpoints - Updated middleware to allow public access to analytics endpoints - Created seed script with 869 realistic application records - Supports filtering by: * Time periods (WEEK, MONTH, YEAR, ALL) * Single or multiple roles * Custom date ranges - Returns percentage changes for tooltips (e.g., +143.59% vs last week) - All endpoints cached for optimal performance Files modified: 7 Files added: 5
harshavarma29
requested changes
Oct 18, 2025
Contributor
harshavarma29
left a comment
There was a problem hiding this comment.
I have reviewed the PR in Postman using the Admin credentials and noticed the following issue:
All Filter Not Working: There is data available for the custom filter; however, when applying the All filter, the data is not getting grouped and instead displays as empty data.
backend-all-filter-not-working.mp4
Anusha-Gali
requested changes
Dec 11, 2025
added 2 commits
April 2, 2026 17:45
Resolve routes.js: keep map and country analytics with development job analytics and popularity routes. Regenerate package-lock.json after merge. Made-with: Cursor
Made-with: Cursor
Anusha-Gali
approved these changes
Apr 8, 2026
added 2 commits
April 15, 2026 17:24
Made-with: Cursor
Use a same-duration previous custom window when filter range is custom so country analytics can compute comparison data for rolling date windows. Made-with: Cursor
|
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.

















Description
Implements Country Application Map Analytics API for the Job Posting Page Analytics feature.
This API enables aggregation, filtering, and comparison of applicant data by country, role, and time frame (weekly, monthly, yearly, or custom). The goal is to power the new world map visualization on the frontend dashboard by providing preprocessed data optimized for quick rendering and hover insights.
This feature allows admins to visualize global application trends, compare applicant growth between periods, and filter data by specific roles. Performance is enhanced through query optimization and optional caching for repeated analytical requests.
Related PRS (if any):
Frontend PR-#4195
Backend PR: This PR
Main changes explained:
How to test:
npm installand...to run this PR locallyScreenshots or videos of changes: