How mspopov-dev/student-service works
This is a small Express student web service. Clients send student-management and score/query requests through the server, routes, and controller; the service applies lightweight validation or response shaping, then uses a repository backed by an in-memory map. The API supports create, read, update, delete, score updates, name searches, name-based counts, and minimum-score searches. The map is process-local rather than a persistent database. The README is empty, so capabilities and wiring are based on the supplied source excerpts.
Main entry points: studentController.js Request handlers · server.js Express server · studentRoutes.js Student routes · studentService.js Student service
Components 7
HTTP layer
- Express server
src/server.js - Student routes
src/routes/studentRoutes.js - Request handlers
src/controller/studentController.js
Application logic
- Student service
src/service/studentService.js
Student data
- Student repository
src/repository/studentRepository.js - Student model
src/model/student.js
Other components
- API client
Connections 7
- API client → Express server: sends requests
- Express server → Student routes: dispatches requests
- Student routes → Request handlers: dispatches endpoints
- Request handlers → Student service: calls operations
- Student service → Student repository: calls data operations
- Student repository → Student model: constructs students
- Request handlers → API client: returns responses