Skip to content

Harshavarma: Created an analytics api for fetching job hits#1882

Open
harshavarma29 wants to merge 1 commit intodevelopmentfrom
harsha_job_hits_and_applications
Open

Harshavarma: Created an analytics api for fetching job hits#1882
harshavarma29 wants to merge 1 commit intodevelopmentfrom
harsha_job_hits_and_applications

Conversation

@harshavarma29
Copy link
Contributor

@harshavarma29 harshavarma29 commented Nov 4, 2025

Description

An analytics chart that displays the number of hits and applications for each role, with options to filter by date range and specific roles.
image

Related PRS (if any):

To test this backend PR, you need to checkout the 4325 frontend PR.

Main changes explained:

Created the following files:

  • src/controllers/jobAnalytics/JobHitsAndApplicationsController.js: Implements the business logic for fetching the number of hits and applications for each role.
  • src/models/jobAnalytics/JobHitsAndApplications.js: Defines the schema for the table with columns: role, date, hit, and applied.
  • src/routes/jobAnalytics/JobHitsAndApplicationsRoutes.js: Configures the /analytics/job-hits-and-applications route to fetch data using the controller’s business logic.
  • src/startup/routes.js: Configures the root route for /analytics/job-hits-and-applications.

How to test:

  1. Check into the current branch
  2. Do npm install, npm run build, and npm start to run this PR locally
  3. Go to frontend PR 4325 for continuation of next steps.
  4. Optionally, test this backend PR using Postman.
  5. Fetch the authentication token fromhttp://localhost:4500/api/login
  6. Add the token to the Authorization header and fetch data using http://localhost:4500/api/analytics/job-hits-and-applications
  7. Test some negative scenarios.
  8. Refer to the sample test video provided below.

Screenshots or videos of changes:

role_fetch_issue_video.mp4

Note:

Let me know your inputs, comments, or suggestions for improvement.

@harshavarma29 harshavarma29 changed the title feat: Created an analytics api for fetching job hits, applications an… Harsha: Created an analytics api for fetching job hits Nov 4, 2025
Copy link

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Harsha,

I have reviewed your PR locally and it works as per the requirement except for the optional query parameters as mentioned in the Endpoint: GET /analytics/role-hits-applications
Query Parameters:
startDate (optional): Date range start.
endDate (optional): Date range end.
roles (optional): Specific roles to filter.
Screenshot 2025-11-21 at 10 31 00 PM
Screenshot 2025-11-21 at 10 28 57 PM
Screenshot 2025-11-21 at 10 28 21 PM

@Anusha-Gali Anusha-Gali added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Nov 27, 2025
Copy link

@bhanuanishakkineni bhanuanishakkineni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Harsha,
I have reviewed your PR and tested both frontend and backend. I tested the API endpoint using the Postman and it returned the expected results.
image
Please find comments related to frontend in #4325

@harshavarma29 harshavarma29 changed the title Harsha: Created an analytics api for fetching job hits Harshavarma: Created an analytics api for fetching job hits Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants