# tsraut19/studentmanagementsystem architecture

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

- Interactive diagram: https://gitdiagram.com/tsraut19/studentmanagementsystem
- Repository: https://github.com/tsraut19/studentmanagementsystem

## Overview

StudentManagementSystem is an ASP.NET Core student-record application: a browser uses the student interface to list, add, edit, and delete records through a JSON API backed by SQL Server. The graph shows the MVC/API setup, client-side workflow, student model, and persistence boundary. The README provides no capability detail, and the tree does not show a dedicated student-page view; links between the home view and student script are therefore omitted.

Main entry points: [`Controllers/StudentsController.cs`](https://github.com/tsraut19/studentmanagementsystem/blob/main/Controllers/StudentsController.cs) (Student API), [`Controllers/HomeController.cs`](https://github.com/tsraut19/studentmanagementsystem/blob/main/Controllers/HomeController.cs) (Home controller), [`Program.cs`](https://github.com/tsraut19/studentmanagementsystem/blob/main/Program.cs) (Application startup), [`wwwroot/js/student.js`](https://github.com/tsraut19/studentmanagementsystem/blob/main/wwwroot/js/student.js) (Student UI logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_program["Application startup<br/>[Program.cs]"]
  node_home["Home controller<br/>[HomeController.cs]"]
  node_homeviews["Home views"]
  node_errorviewmodel["Error view model<br/>[ErrorViewModel.cs]"]
  node_errorview["Error view<br/>[Error.cshtml]"]
end

subgraph group_client["Student interface"]
  node_studentjs["Student UI logic<br/>[student.js]"]
end

subgraph group_api["Student API"]
  node_students["Student API"]
  node_studentmodel["Student model<br/>[Student.cs]"]
end

subgraph group_data["Persistence"]
  node_context["EF context"]
end

node_browser(("Browser user"))
node_sqldb[("SQL Server")]

node_browser -->|"sends requests"| node_program
node_program -->|"routes MVC"| node_home
node_program -->|"routes API"| node_students
node_home -->|"renders views"| node_homeviews
node_home -->|"creates error data"| node_errorviewmodel
node_home -->|"renders error"| node_errorview
node_browser -->|"runs interface"| node_studentjs
node_studentjs -->|"fetches CRUD"| node_students
node_students -->|"returns JSON"| node_studentjs
node_students -->|"accepts and returns"| node_studentmodel
node_students -->|"queries and saves"| node_context
node_context -->|"uses SQL Server"| node_sqldb

click node_program "https://github.com/tsraut19/studentmanagementsystem/blob/main/Program.cs"
click node_home "https://github.com/tsraut19/studentmanagementsystem/blob/main/Controllers/HomeController.cs"
click node_homeviews "https://github.com/tsraut19/studentmanagementsystem/tree/main/Views/Home"
click node_studentjs "https://github.com/tsraut19/studentmanagementsystem/blob/main/wwwroot/js/student.js"
click node_students "https://github.com/tsraut19/studentmanagementsystem/blob/main/Controllers/StudentsController.cs"
click node_studentmodel "https://github.com/tsraut19/studentmanagementsystem/blob/main/Models/Student.cs"
click node_context "https://github.com/tsraut19/studentmanagementsystem/blob/main/Data/ApplicationDBContext.cs"
click node_errorviewmodel "https://github.com/tsraut19/studentmanagementsystem/blob/main/Models/ErrorViewModel.cs"
click node_errorview "https://github.com/tsraut19/studentmanagementsystem/blob/main/Views/Shared/Error.cshtml"

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_program,node_home,node_homeviews,node_errorviewmodel,node_errorview,node_browser toneBlue
class node_studentjs,node_sqldb toneAmber
class node_students,node_studentmodel toneMint
class node_context toneRose
```

## Components

### Web application

- [Application startup](https://github.com/tsraut19/studentmanagementsystem/blob/main/Program.cs): `Program.cs`
- [Home controller](https://github.com/tsraut19/studentmanagementsystem/blob/main/Controllers/HomeController.cs): `Controllers/HomeController.cs`
- [Home views](https://github.com/tsraut19/studentmanagementsystem/tree/main/Views/Home): `Views/Home`
- [Error view model](https://github.com/tsraut19/studentmanagementsystem/blob/main/Models/ErrorViewModel.cs): `Models/ErrorViewModel.cs`
- [Error view](https://github.com/tsraut19/studentmanagementsystem/blob/main/Views/Shared/Error.cshtml): `Views/Shared/Error.cshtml`

### Student interface

- [Student UI logic](https://github.com/tsraut19/studentmanagementsystem/blob/main/wwwroot/js/student.js): `wwwroot/js/student.js`

### Student API

- [Student API](https://github.com/tsraut19/studentmanagementsystem/blob/main/Controllers/StudentsController.cs): `Controllers/StudentsController.cs`
- [Student model](https://github.com/tsraut19/studentmanagementsystem/blob/main/Models/Student.cs): `Models/Student.cs`

### Persistence

- [EF context](https://github.com/tsraut19/studentmanagementsystem/blob/main/Data/ApplicationDBContext.cs): `Data/ApplicationDBContext.cs`

### Other components

- **Browser user**
- **SQL Server**

## Connections

- Browser user → Application startup: sends requests
- Application startup → Home controller: routes MVC
- Application startup → Student API: routes API
- Home controller → Home views: renders views
- Home controller → Error view model: creates error data
- Home controller → Error view: renders error
- Browser user → Student UI logic: runs interface
- Student UI logic → Student API: fetches CRUD
- Student API → Student UI logic: returns JSON
- Student API → Student model: accepts and returns
- Student API → EF context: queries and saves
- EF context → SQL Server: uses SQL Server
