# omar2282005/academyhub architecture

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

- Interactive diagram: https://gitdiagram.com/omar2282005/academyhub
- Repository: https://github.com/omar2282005/academyhub

## Overview

AcademyHub is an ASP.NET Core MVC course-management app. Visitors browse courses and details; signed-in users create courses and owners can edit or delete them, with server-side validation and enrollment-aware deletion. The graph shows the documented Identity account flow and the sampled controller-to-repository-to-training-data path. README capabilities are included where implementation files were not sampled; those links are dashed where wiring is unverified.

Main entry points: [`AcademyHub/Controllers/CourseController.cs`](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Controllers/CourseController.cs) (Course actions), [`AcademyHub/Program.cs`](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Program.cs) (MVC routing), [`AcademyHub/Data/TrainingDbContext.cs`](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Data/TrainingDbContext.cs) (Training data context), [`AcademyHub/Repositories/Implementation/CourseRepository .cs`](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Repositories/Implementation/CourseRepository%20.cs) (Course repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_mvc["MVC routing<br/>[Program.cs]"]
  node_home["Home pages<br/>[HomeController.cs]"]
  node_course_views["Catalog and forms"]
  node_home_views["Home and shared views"]
  node_browser_search["Browser catalog search<br/>[site.js]"]
end

subgraph group_courses["Course workflows"]
  node_course_controller["Course actions"]
  node_viewmodels["Course ViewModels"]
  node_mapping["Entity mapping<br/>[MappingProfile.cs]"]
  node_repository_contract["Course repository contract"]
  node_repository["Course repository"]
end

subgraph group_training["Training domain"]
  node_course_domain["Courses and instructors<br/>[Course.cs]"]
  node_enrollment_domain["Students and enrollments<br/>[Enrollment.cs]"]
  node_instructor_profile["Instructor profiles"]
  node_training_context["Training data context"]
  node_training_db[("Training database")]
end

subgraph group_accounts["Accounts and storage"]
  node_identity_user["Application user<br/>[ApplicationUser.cs]"]
  node_identity_context["Identity data context"]
  node_identity_db[("Identity database")]
  node_identity_ui["Identity account UI"]
end

node_visitor(("Visitor"))
node_member(("Signed-in member"))

node_visitor -->|"requests pages"| node_mvc
node_member -->|"requests changes"| node_mvc
node_mvc -->|"routes courses"| node_course_controller
node_mvc -->|"routes home"| node_home
node_mvc -->|"maps account pages"| node_identity_ui
node_course_controller -->|"calls"| node_repository_contract
node_course_controller -->|"maps models"| node_mapping
node_course_controller -->|"binds and returns"| node_viewmodels
node_course_controller -->|"returns views"| node_course_views
node_home -->|"returns views"| node_home_views
node_course_views -.->|"searches loaded rows"| node_browser_search
node_repository -->|"implements"| node_repository_contract
node_course_controller -->|"gets current user"| node_identity_user
node_course_controller -.->|"dispatches data calls"| node_repository
node_repository -->|"queries and saves"| node_training_context
node_training_context -.->|"persists training data"| node_training_db
node_identity_context -.->|"persists accounts"| node_identity_db
node_identity_ui -.->|"manages accounts"| node_identity_user
node_identity_user -->|"stored through"| node_identity_context
node_training_context -->|"models courses"| node_course_domain
node_training_context -->|"models enrollments"| node_enrollment_domain
node_training_context -->|"models profiles"| node_instructor_profile
node_course_domain -->|"owns enrollments"| node_enrollment_domain
node_course_domain -.->|"links instructor profile"| node_instructor_profile
node_mvc -.->|"validates forms"| node_viewmodels

click node_mvc "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Program.cs"
click node_home "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Controllers/HomeController.cs"
click node_course_controller "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Controllers/CourseController.cs"
click node_course_views "https://github.com/omar2282005/academyhub/tree/master/AcademyHub/Views/Course"
click node_home_views "https://github.com/omar2282005/academyhub/tree/master/AcademyHub/Views"
click node_viewmodels "https://github.com/omar2282005/academyhub/tree/master/AcademyHub/ViewModel"
click node_mapping "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Mapping/MappingProfile.cs"
click node_repository_contract "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Repositories/Interface/ICourseRepository.cs"
click node_repository "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Repositories/Implementation/CourseRepository%20.cs"
click node_course_domain "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Models/Course.cs"
click node_enrollment_domain "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Models/Enrollment.cs"
click node_instructor_profile "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Models/InstructorProfile.cs"
click node_training_context "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Data/TrainingDbContext.cs"
click node_identity_user "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Identity/ApplicationUser.cs"
click node_identity_context "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Data/IdentityAppDbContext.cs"
click node_browser_search "https://github.com/omar2282005/academyhub/blob/master/AcademyHub/wwwroot/js/site.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_mvc,node_home,node_course_views,node_home_views,node_browser_search toneBlue
class node_course_controller,node_viewmodels,node_mapping,node_repository_contract,node_repository toneAmber
class node_course_domain,node_enrollment_domain,node_instructor_profile,node_training_context,node_training_db toneMint
class node_identity_user,node_identity_context,node_identity_db,node_identity_ui toneRose
class node_visitor,node_member toneIndigo
```

## Components

### Web experience

- [MVC routing](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Program.cs): `AcademyHub/Program.cs`
- [Home pages](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Controllers/HomeController.cs): `AcademyHub/Controllers/HomeController.cs`
- [Catalog and forms](https://github.com/omar2282005/academyhub/tree/master/AcademyHub/Views/Course): `AcademyHub/Views/Course`
- [Home and shared views](https://github.com/omar2282005/academyhub/tree/master/AcademyHub/Views): `AcademyHub/Views`
- [Browser catalog search](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/wwwroot/js/site.js): `AcademyHub/wwwroot/js/site.js`

### Course workflows

- [Course actions](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Controllers/CourseController.cs): `AcademyHub/Controllers/CourseController.cs`
- [Course ViewModels](https://github.com/omar2282005/academyhub/tree/master/AcademyHub/ViewModel): `AcademyHub/ViewModel`
- [Entity mapping](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Mapping/MappingProfile.cs): `AcademyHub/Mapping/MappingProfile.cs`
- [Course repository contract](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Repositories/Interface/ICourseRepository.cs): `AcademyHub/Repositories/Interface/ICourseRepository.cs`
- [Course repository](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Repositories/Implementation/CourseRepository%20.cs): `AcademyHub/Repositories/Implementation/CourseRepository .cs`

### Training domain

- [Courses and instructors](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Models/Course.cs): `AcademyHub/Models/Course.cs`
- [Students and enrollments](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Models/Enrollment.cs): `AcademyHub/Models/Enrollment.cs`
- [Instructor profiles](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Models/InstructorProfile.cs): `AcademyHub/Models/InstructorProfile.cs`
- [Training data context](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Data/TrainingDbContext.cs): `AcademyHub/Data/TrainingDbContext.cs`
- **Training database**

### Accounts and storage

- [Application user](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Identity/ApplicationUser.cs): `AcademyHub/Identity/ApplicationUser.cs`
- [Identity data context](https://github.com/omar2282005/academyhub/blob/master/AcademyHub/Data/IdentityAppDbContext.cs): `AcademyHub/Data/IdentityAppDbContext.cs`
- **Identity database**
- **Identity account UI**

### Other components

- **Visitor**
- **Signed-in member**

## Connections

- Visitor → MVC routing: requests pages (evidence: `README.md`)
- Signed-in member → MVC routing: requests changes (evidence: `README.md`)
- MVC routing → Course actions: routes courses (evidence: `AcademyHub/Program.cs`)
- MVC routing → Home pages: routes home (evidence: `AcademyHub/Program.cs`)
- MVC routing → Identity account UI: maps account pages (evidence: `AcademyHub/Program.cs`)
- Course actions → Course repository contract: calls (evidence: `AcademyHub/Controllers/CourseController.cs`)
- Course actions → Entity mapping: maps models (evidence: `AcademyHub/Controllers/CourseController.cs`)
- Course actions → Course ViewModels: binds and returns (evidence: `AcademyHub/Controllers/CourseController.cs`)
- Course actions → Catalog and forms: returns views (evidence: `AcademyHub/Controllers/CourseController.cs`)
- Home pages → Home and shared views: returns views (evidence: `AcademyHub/Controllers/HomeController.cs`)
- Catalog and forms → Browser catalog search: searches loaded rows (evidence: `README.md`)
- Course repository → Course repository contract: implements (evidence: `AcademyHub/Repositories/Implementation/CourseRepository .cs`)
- Course actions → Application user: gets current user (evidence: `AcademyHub/Controllers/CourseController.cs`)
- Course actions → Course repository: dispatches data calls
- Course repository → Training data context: queries and saves (evidence: `AcademyHub/Repositories/Implementation/CourseRepository .cs`)
- Training data context → Training database: persists training data (evidence: `README.md`)
- Identity data context → Identity database: persists accounts (evidence: `README.md`)
- Identity account UI → Application user: manages accounts (evidence: `README.md`)
- Application user → Identity data context: stored through (evidence: `AcademyHub/Data/IdentityAppDbContext.cs`)
- Training data context → Courses and instructors: models courses (evidence: `AcademyHub/Data/TrainingDbContext.cs`)
- Training data context → Students and enrollments: models enrollments (evidence: `AcademyHub/Data/TrainingDbContext.cs`)
- Training data context → Instructor profiles: models profiles (evidence: `AcademyHub/Data/TrainingDbContext.cs`)
- Courses and instructors → Students and enrollments: owns enrollments (evidence: `AcademyHub/Models/Course.cs`)
- Courses and instructors → Instructor profiles: links instructor profile
- MVC routing → Course ViewModels: validates forms (evidence: `README.md`)
