# mspopov-dev/student-service architecture

> Architecture diagram of the GitHub repository mspopov-dev/student-service, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mspopov-dev/student-service
- Repository: https://github.com/mspopov-dev/student-service

## Overview

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: [`src/controller/studentController.js`](https://github.com/mspopov-dev/student-service/blob/dev/src/controller/studentController.js) (Request handlers), [`src/server.js`](https://github.com/mspopov-dev/student-service/blob/dev/src/server.js) (Express server), [`src/routes/studentRoutes.js`](https://github.com/mspopov-dev/student-service/blob/dev/src/routes/studentRoutes.js) (Student routes), [`src/service/studentService.js`](https://github.com/mspopov-dev/student-service/blob/dev/src/service/studentService.js) (Student service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_http["HTTP layer"]
  node_server["Express server<br/>[server.js]"]
  node_routes["Student routes<br/>[studentRoutes.js]"]
  node_controller["Request handlers"]
end

subgraph group_app["Application logic"]
  node_service["Student service<br/>[studentService.js]"]
end

subgraph group_data["Student data"]
  node_repository[("Student repository")]
  node_student["Student model<br/>[student.js]"]
end

node_client(("API client"))

node_client -->|"sends requests"| node_server
node_server -->|"dispatches requests"| node_routes
node_routes -->|"dispatches endpoints"| node_controller
node_controller -->|"calls operations"| node_service
node_service -->|"calls data operations"| node_repository
node_repository -->|"constructs students"| node_student
node_controller -->|"returns responses"| node_client

click node_server "https://github.com/mspopov-dev/student-service/blob/dev/src/server.js"
click node_routes "https://github.com/mspopov-dev/student-service/blob/dev/src/routes/studentRoutes.js"
click node_controller "https://github.com/mspopov-dev/student-service/blob/dev/src/controller/studentController.js"
click node_service "https://github.com/mspopov-dev/student-service/blob/dev/src/service/studentService.js"
click node_repository "https://github.com/mspopov-dev/student-service/blob/dev/src/repository/studentRepository.js"
click node_student "https://github.com/mspopov-dev/student-service/blob/dev/src/model/student.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server,node_routes,node_controller,node_client toneBlue
class node_service toneAmber
class node_repository,node_student toneMint
```

## Components

### HTTP layer

- [Express server](https://github.com/mspopov-dev/student-service/blob/dev/src/server.js): `src/server.js`
- [Student routes](https://github.com/mspopov-dev/student-service/blob/dev/src/routes/studentRoutes.js): `src/routes/studentRoutes.js`
- [Request handlers](https://github.com/mspopov-dev/student-service/blob/dev/src/controller/studentController.js): `src/controller/studentController.js`

### Application logic

- [Student service](https://github.com/mspopov-dev/student-service/blob/dev/src/service/studentService.js): `src/service/studentService.js`

### Student data

- [Student repository](https://github.com/mspopov-dev/student-service/blob/dev/src/repository/studentRepository.js): `src/repository/studentRepository.js`
- [Student model](https://github.com/mspopov-dev/student-service/blob/dev/src/model/student.js): `src/model/student.js`

### Other components

- **API client**

## Connections

- 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
