# darkeyez-reborn/webqlbd architecture

> Architecture diagram of the GitHub repository darkeyez-reborn/webqlbd, 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/darkeyez-reborn/webqlbd
- Repository: https://github.com/darkeyez-reborn/webqlbd

## Overview

QLBD2 is an ASP.NET MVC student administration and grade-management application. Users access role-protected dashboards; account actions handle sign-in and account maintenance, while management actions cover courses and grades. The controllers use an Entity Framework context to query and save student, class, course, account, and result records. The tree shows corresponding dashboard and login views, but the excerpts do not establish client-side request wiring or the full details of each dashboard interaction, so those links are omitted.

Main entry points: [`QLBD2/Controllers/DashboardController.cs`](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Controllers/DashboardController.cs) (Dashboard actions), [`QLBD2/Models/Model1.Context.cs`](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Models/Model1.Context.cs) (Entity Framework context), [`QLBD2/Controllers/TaiKhoanController.cs`](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Controllers/TaiKhoanController.cs) (Account actions), [`QLBD2/Controllers/HomeController.cs`](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Controllers/HomeController.cs) (Home pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_home["Home pages<br/>[HomeController.cs]"]
  node_dashboard["Dashboard actions"]
  node_homeviews["Home views"]
  node_gradeview["Grade dashboard<br/>[Giaodien.cshtml]"]
end

subgraph group_access["Access control"]
  node_accountview["Sign-in view<br/>[Dangnhap.cshtml]"]
  node_accounts["Account actions"]
  node_permissions["Role authorization"]
  node_accountadmin["Account admin view"]
end

subgraph group_academic["Academic management"]
  node_courseadmin["Course admin view"]
  node_gradeadmin["Grade admin view<br/>[QuanLyDiem.cshtml]"]
end

subgraph group_data["Domain data"]
  node_context["Entity Framework context<br/>[Model1.Context.cs]"]
  node_student["Student records<br/>[SinhVien.cs]"]
  node_class["Class records<br/>[Lop.cs]"]
  node_course["Course records<br/>[HocPhan.cs]"]
  node_results["Grade records<br/>[KetQua.cs]"]
  node_database[("SQL database")]
end

node_user(("User"))

node_user -->|"requests pages"| node_home
node_user -->|"submits credentials"| node_accounts
node_user -->|"opens dashboard"| node_dashboard
node_home -->|"returns view"| node_homeviews
node_dashboard -->|"returns view"| node_gradeview
node_dashboard -->|"authorization filter"| node_permissions
node_dashboard -->|"returns view"| node_accountadmin
node_dashboard -->|"returns view"| node_courseadmin
node_dashboard -->|"returns view"| node_gradeadmin
node_accounts -->|"returns view"| node_accountview
node_accounts -->|"queries and saves"| node_context
node_context -->|"reads and writes"| node_database
node_context -->|"maps records"| node_student
node_context -->|"maps records"| node_class
node_context -->|"maps records"| node_course
node_context -->|"maps records"| node_results

click node_home "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Controllers/HomeController.cs"
click node_dashboard "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Controllers/DashboardController.cs"
click node_homeviews "https://github.com/darkeyez-reborn/webqlbd/tree/master/QLBD2/Views/Home"
click node_gradeview "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Views/Dashboard/Giaodien.cshtml"
click node_accountview "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Views/TaiKhoan/Dangnhap.cshtml"
click node_accounts "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Controllers/TaiKhoanController.cs"
click node_permissions "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Controllers/PhanQuyenAttribute.cs"
click node_accountadmin "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Views/Dashboard/QuanLyTaiKhoan.cshtml"
click node_courseadmin "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Views/Dashboard/QuanLyMonHoc.cshtml"
click node_gradeadmin "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Views/Dashboard/QuanLyDiem.cshtml"
click node_context "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Models/Model1.Context.cs"
click node_student "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Models/SinhVien.cs"
click node_class "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Models/Lop.cs"
click node_course "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Models/HocPhan.cs"
click node_results "https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Models/KetQua.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_home,node_dashboard,node_homeviews,node_gradeview,node_user toneBlue
class node_accountview,node_accounts,node_permissions,node_accountadmin toneAmber
class node_courseadmin,node_gradeadmin toneMint
class node_context,node_student,node_class,node_course,node_results,node_database toneRose
```

## Components

### Web entry

- [Home pages](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Controllers/HomeController.cs): `QLBD2/Controllers/HomeController.cs`
- [Dashboard actions](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Controllers/DashboardController.cs): `QLBD2/Controllers/DashboardController.cs`
- [Home views](https://github.com/darkeyez-reborn/webqlbd/tree/master/QLBD2/Views/Home): `QLBD2/Views/Home`
- [Grade dashboard](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Views/Dashboard/Giaodien.cshtml): `QLBD2/Views/Dashboard/Giaodien.cshtml`

### Access control

- [Sign-in view](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Views/TaiKhoan/Dangnhap.cshtml): `QLBD2/Views/TaiKhoan/Dangnhap.cshtml`
- [Account actions](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Controllers/TaiKhoanController.cs): `QLBD2/Controllers/TaiKhoanController.cs`
- [Role authorization](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Controllers/PhanQuyenAttribute.cs): `QLBD2/Controllers/PhanQuyenAttribute.cs`
- [Account admin view](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Views/Dashboard/QuanLyTaiKhoan.cshtml): `QLBD2/Views/Dashboard/QuanLyTaiKhoan.cshtml`

### Academic management

- [Course admin view](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Views/Dashboard/QuanLyMonHoc.cshtml): `QLBD2/Views/Dashboard/QuanLyMonHoc.cshtml`
- [Grade admin view](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Views/Dashboard/QuanLyDiem.cshtml): `QLBD2/Views/Dashboard/QuanLyDiem.cshtml`

### Domain data

- [Entity Framework context](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Models/Model1.Context.cs): `QLBD2/Models/Model1.Context.cs`
- [Student records](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Models/SinhVien.cs): `QLBD2/Models/SinhVien.cs`
- [Class records](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Models/Lop.cs): `QLBD2/Models/Lop.cs`
- [Course records](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Models/HocPhan.cs): `QLBD2/Models/HocPhan.cs`
- [Grade records](https://github.com/darkeyez-reborn/webqlbd/blob/master/QLBD2/Models/KetQua.cs): `QLBD2/Models/KetQua.cs`
- **SQL database**

### Other components

- **User**

## Connections

- User → Home pages: requests pages
- User → Account actions: submits credentials
- User → Dashboard actions: opens dashboard
- Home pages → Home views: returns view
- Dashboard actions → Grade dashboard: returns view
- Dashboard actions → Role authorization: authorization filter
- Dashboard actions → Account admin view: returns view
- Dashboard actions → Course admin view: returns view
- Dashboard actions → Grade admin view: returns view
- Account actions → Sign-in view: returns view
- Account actions → Entity Framework context: queries and saves
- Entity Framework context → SQL database: reads and writes
- Entity Framework context → Student records: maps records
- Entity Framework context → Class records: maps records
- Entity Framework context → Course records: maps records
- Entity Framework context → Grade records: maps records
