A RESTful API microservice built with Node.js and Express.js for analyzing internship application data and feedback.
- Top Applicants API: Get top 5 applicants by feedback score
- Daily Stats API: Get daily application statistics
- Feedback Summary API: Get feedback rating distribution
- Runtime: Node.js
- Framework: Express.js
- Middleware: CORS, JSON body parser
- Data Storage: In-memory (for demo purposes)
- Node.js (v14 or later)
- npm (comes with Node.js)
-
Clone the repository:
git clone <repository-url> cd internship-analytics
-
Install dependencies:
npm install
Start the development server:
npm start
The server will start on http://localhost:3000
- URL:
/api/applicants/top
- Method:
GET
- Description: Returns top 5 applicants sorted by feedback score
- Response:
{ "success": true, "data": [ { "id": 4, "name": "Diana Prince", "feedbackScore": 4.9, "status": "accepted", "applicationDate": "2025-06-14" }, ... ] }
- URL:
/api/applicants/stats?date=YYYY-MM-DD
- Method:
GET
- Query Parameters:
date
(required): Date in YYYY-MM-DD format
- Response:
{ "success": true, "data": { "date": "2025-06-15", "total": 3, "accepted": 2, "rejected": 0, "pending": 1 } }
- URL:
/api/feedback/summary
- Method:
GET
- Description: Returns count of feedback ratings
- Response:
{ "success": true, "data": { "positive": 4, "neutral": 1, "negative": 2, "total": 7 } }
You can test the API using tools like Postman or curl
:
# Get top applicants
curl http://localhost:3000/api/applicants/top
# Get daily stats
curl "http://localhost:3000/api/applicants/stats?date=2025-06-15"
# Get feedback summary
curl http://localhost:3000/api/feedback/summary
internship-analytics/
├── node_modules/ # Dependencies
├── .gitignore # Git ignore file
├── package.json # Project metadata and dependencies
├── README.md # This file
└── server.js # Main application file
- Add persistent database (e.g., MongoDB, PostgreSQL)
- Implement authentication and authorization
- Add request validation
- Write unit and integration tests
- Add API documentation with Swagger/OpenAPI
- Add logging
- Implement rate limiting
- Add input sanitization
This project is open source and available under the MIT License.