# katocharyan/college_management_system architecture

> Architecture diagram of the GitHub repository katocharyan/college_management_system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/katocharyan/college_management_system
- Repository: https://github.com/katocharyan/college_management_system

## Overview

This ASP.NET Core API supports account registration/login and JWT issuance, plus authenticated student record creation, lookup, listing, updates, and deletion. Student requests enter the controller, pass through the service abstraction and StudentService for validation and mapping, then use Entity Framework persistence; responses return through the controller. Authentication accesses users directly through the DbContext. Program.cs configures dependency injection, SQL Server, and JWT validation. Source evidence is limited to the supplied excerpts and index; migrations and other unsampled runtime behavior are not expanded.

Main entry points: [`CollegeManagementSystem/Services/StudentService.cs`](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Services/StudentService.cs) (Student Operations), [`CollegeManagementSystem/Controllers/StudentController.cs`](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Controllers/StudentController.cs) (Student Endpoints), [`CollegeManagementSystem/Controllers/AuthController.cs`](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Controllers/AuthController.cs) (Auth Endpoints), [`CollegeManagementSystem/Data/AppDbContext.cs`](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Data/AppDbContext.cs) (EF DbContext)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_student_api["Student Endpoints"]
  node_application_setup["Application Setup<br/>[Program.cs]"]
end

subgraph group_students["Student Management"]
  node_student_create_dto["Create Input"]
  node_student_update_dto["Update Input"]
  node_student_response["Student Response"]
  node_student_service_contract["Student Service Contract<br/>[IStudentService.cs]"]
  node_student_service["Student Operations<br/>[StudentService.cs]"]
end

subgraph group_data["Persistence and Domain"]
  node_db_context["EF DbContext<br/>[AppDbContext.cs]"]
  node_student_model["Student Entity<br/>[Student.cs]"]
  node_user_model["User Entity<br/>[User.cs]"]
  node_sql_server[("SQL Server")]
end

subgraph group_security["Authentication"]
  node_auth_api["Auth Endpoints<br/>[AuthController.cs]"]
  node_register_dto["Registration Input<br/>[RegisterDto.cs]"]
  node_login_dto["Login Input<br/>[LoginDto.cs]"]
end

node_client(("API Client"))

node_client -->|"calls auth routes"| node_auth_api
node_client -->|"calls student routes"| node_student_api
node_auth_api -->|"accepts registration"| node_register_dto
node_auth_api -->|"accepts credentials"| node_login_dto
node_auth_api -->|"reads and saves users"| node_db_context
node_auth_api -->|"creates user"| node_user_model
node_student_api -->|"accepts create input"| node_student_create_dto
node_student_api -->|"accepts update input"| node_student_update_dto
node_student_api -->|"calls operations"| node_student_service_contract
node_student_service -->|"implements"| node_student_service_contract
node_student_service -->|"queries and saves"| node_db_context
node_student_service -->|"creates and updates"| node_student_model
node_student_service -->|"maps create input"| node_student_create_dto
node_student_service -->|"maps update input"| node_student_update_dto
node_student_service -->|"maps results"| node_student_response
node_student_api -->|"returns responses"| node_student_response
node_db_context -->|"exposes set"| node_student_model
node_db_context -->|"exposes set"| node_user_model
node_application_setup -->|"configures context"| node_db_context
node_application_setup -->|"registers service"| node_student_service
node_application_setup -->|"maps implementation"| node_student_service_contract
node_application_setup -->|"configures provider"| node_sql_server

click node_auth_api "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Controllers/AuthController.cs"
click node_student_api "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Controllers/StudentController.cs"
click node_register_dto "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/DTOs/RegisterDto.cs"
click node_login_dto "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/DTOs/LoginDto.cs"
click node_student_create_dto "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/DTOs/Student/CreateStudentDto.cs"
click node_student_update_dto "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/DTOs/Student/UpdateStudentDto.cs"
click node_student_response "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/DTOs/Student/StudentResponseDto.cs"
click node_student_service_contract "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Interfaces/IStudentService.cs"
click node_student_service "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Services/StudentService.cs"
click node_db_context "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Data/AppDbContext.cs"
click node_student_model "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Models/Student.cs"
click node_user_model "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Models/User.cs"
click node_application_setup "https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Program.cs"

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_student_api,node_application_setup,node_client toneBlue
class node_student_create_dto,node_student_update_dto,node_student_response,node_student_service_contract,node_student_service toneAmber
class node_db_context,node_student_model,node_user_model,node_sql_server toneMint
class node_auth_api,node_register_dto,node_login_dto toneRose
```

## Components

### HTTP API

- [Student Endpoints](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Controllers/StudentController.cs): `CollegeManagementSystem/Controllers/StudentController.cs`
- [Application Setup](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Program.cs): `CollegeManagementSystem/Program.cs`

### Student Management

- [Create Input](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/DTOs/Student/CreateStudentDto.cs): `CollegeManagementSystem/DTOs/Student/CreateStudentDto.cs`
- [Update Input](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/DTOs/Student/UpdateStudentDto.cs): `CollegeManagementSystem/DTOs/Student/UpdateStudentDto.cs`
- [Student Response](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/DTOs/Student/StudentResponseDto.cs): `CollegeManagementSystem/DTOs/Student/StudentResponseDto.cs`
- [Student Service Contract](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Interfaces/IStudentService.cs): `CollegeManagementSystem/Interfaces/IStudentService.cs`
- [Student Operations](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Services/StudentService.cs): `CollegeManagementSystem/Services/StudentService.cs`

### Persistence and Domain

- [EF DbContext](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Data/AppDbContext.cs): `CollegeManagementSystem/Data/AppDbContext.cs`
- [Student Entity](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Models/Student.cs): `CollegeManagementSystem/Models/Student.cs`
- [User Entity](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Models/User.cs): `CollegeManagementSystem/Models/User.cs`
- **SQL Server**

### Authentication

- [Auth Endpoints](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/Controllers/AuthController.cs): `CollegeManagementSystem/Controllers/AuthController.cs`
- [Registration Input](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/DTOs/RegisterDto.cs): `CollegeManagementSystem/DTOs/RegisterDto.cs`
- [Login Input](https://github.com/katocharyan/college_management_system/blob/master/CollegeManagementSystem/DTOs/LoginDto.cs): `CollegeManagementSystem/DTOs/LoginDto.cs`

### Other components

- **API Client**

## Connections

- API Client → Auth Endpoints: calls auth routes (evidence: `CollegeManagementSystem/Controllers/AuthController.cs`)
- API Client → Student Endpoints: calls student routes (evidence: `CollegeManagementSystem/Controllers/StudentController.cs`)
- Auth Endpoints → Registration Input: accepts registration (evidence: `CollegeManagementSystem/Controllers/AuthController.cs`)
- Auth Endpoints → Login Input: accepts credentials (evidence: `CollegeManagementSystem/Controllers/AuthController.cs`)
- Auth Endpoints → EF DbContext: reads and saves users (evidence: `CollegeManagementSystem/Controllers/AuthController.cs`)
- Auth Endpoints → User Entity: creates user (evidence: `CollegeManagementSystem/Controllers/AuthController.cs`)
- Student Endpoints → Create Input: accepts create input (evidence: `CollegeManagementSystem/Controllers/StudentController.cs`)
- Student Endpoints → Update Input: accepts update input (evidence: `CollegeManagementSystem/Controllers/StudentController.cs`)
- Student Endpoints → Student Service Contract: calls operations (evidence: `CollegeManagementSystem/Controllers/StudentController.cs`)
- Student Operations → Student Service Contract: implements (evidence: `CollegeManagementSystem/Services/StudentService.cs`)
- Student Operations → EF DbContext: queries and saves (evidence: `CollegeManagementSystem/Services/StudentService.cs`)
- Student Operations → Student Entity: creates and updates (evidence: `CollegeManagementSystem/Services/StudentService.cs`)
- Student Operations → Create Input: maps create input (evidence: `CollegeManagementSystem/Services/StudentService.cs`)
- Student Operations → Update Input: maps update input (evidence: `CollegeManagementSystem/Services/StudentService.cs`)
- Student Operations → Student Response: maps results (evidence: `CollegeManagementSystem/Services/StudentService.cs`)
- Student Endpoints → Student Response: returns responses (evidence: `CollegeManagementSystem/Controllers/StudentController.cs`)
- EF DbContext → Student Entity: exposes set (evidence: `CollegeManagementSystem/Data/AppDbContext.cs`)
- EF DbContext → User Entity: exposes set (evidence: `CollegeManagementSystem/Data/AppDbContext.cs`)
- Application Setup → EF DbContext: configures context (evidence: `CollegeManagementSystem/Program.cs`)
- Application Setup → Student Operations: registers service (evidence: `CollegeManagementSystem/Program.cs`)
- Application Setup → Student Service Contract: maps implementation (evidence: `CollegeManagementSystem/Program.cs`)
- Application Setup → SQL Server: configures provider (evidence: `CollegeManagementSystem/Program.cs`)
