# seangnang/simple-website architecture

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

- Interactive diagram: https://gitdiagram.com/seangnang/simple-website
- Repository: https://github.com/seangnang/simple-website

## Overview

SimpleWebsite is an ASP.NET Core learning-management website. Its principal learner workflow is browsing courses, enrolling, accessing lessons, and recording lesson completion; the repository also includes instructor course authoring, administration, payments, reviews/comments, notifications, and email. The README is only a project title, so capabilities and relationships here are based on the source index and shown excerpts. EmailService contains conflicting merge-marker excerpts, so its exact delivery behavior is uncertain.

Main entry points: [`Data/AppDbContext.cs`](https://github.com/seangnang/simple-website/blob/master/Data/AppDbContext.cs) (Application database), [`Services/NotificationService.cs`](https://github.com/seangnang/simple-website/blob/master/Services/NotificationService.cs) (Notifications), [`Controllers/CourseController.cs`](https://github.com/seangnang/simple-website/blob/master/Controllers/CourseController.cs) (Enrollment), [`Controllers/PaymentController.cs`](https://github.com/seangnang/simple-website/blob/master/Controllers/PaymentController.cs) (Payment handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Course learning"]
  node_course_browse["Course browsing"]
  node_enrollment["Enrollment"]
  node_lesson_learning["Lesson learning"]
  node_progress["Lesson progress<br/>[LessonProgress.cs]"]
  node_payments["Payment handling"]
end

subgraph group_authoring["Course operations"]
  node_instructor_tools["Instructor tools"]
  node_categories["Category management"]
  node_coupons["Coupon management"]
  node_admin["Administration<br/>[AdminController.cs]"]
  node_dashboard["Dashboard"]
end

subgraph group_accounts["Accounts and community"]
  node_accounts["Account management"]
  node_profiles["User profiles"]
  node_reviews["Course reviews"]
  node_comments["Lesson comments"]
  node_home["Home pages<br/>[HomeController.cs]"]
end

subgraph group_communications["Messaging"]
  node_notifications["Notifications"]
  node_notification_ui["Notification access"]
  node_email["Email service<br/>[EmailService.cs]"]
  node_email_inbox["Email inbox<br/>[EmailController.cs]"]
end

subgraph group_platform["Application data"]
  node_domain_models["LMS entities"]
  node_database[("Application database<br/>[AppDbContext.cs]")]
  node_stripe["Stripe settings<br/>[StripeSettings.cs]"]
end

node_learner(("Learner"))
node_instructor(("Instructor"))

node_learner -.->|"browses"| node_course_browse
node_learner -.->|"enrolls"| node_enrollment
node_learner -.->|"studies"| node_lesson_learning
node_course_browse -->|"queries"| node_database
node_enrollment -->|"saves enrollment"| node_database
node_enrollment -->|"sends email"| node_email
node_enrollment -->|"notifies users"| node_notifications
node_lesson_learning -->|"loads lessons"| node_database
node_lesson_learning -->|"records completion"| node_progress
node_lesson_learning -->|"saves progress"| node_database
node_payments -->|"reads and writes"| node_database
node_payments -->|"uses settings"| node_stripe
node_instructor -.->|"manages courses"| node_instructor_tools
node_instructor_tools -->|"reads and writes"| node_database
node_categories -->|"reads and writes"| node_database
node_coupons -->|"reads and writes"| node_database
node_admin -->|"queries"| node_database
node_dashboard -->|"queries"| node_database
node_accounts -->|"uses users"| node_database
node_accounts -->|"requests notifications"| node_notifications
node_profiles -.->|"uses users"| node_database
node_reviews -->|"reads and writes"| node_database
node_reviews -->|"sends notifications"| node_notifications
node_comments -->|"reads and writes"| node_database
node_comments -->|"sends notifications"| node_notifications
node_notification_ui -->|"loads notifications"| node_notifications
node_notifications -->|"stores notifications"| node_database
node_email_inbox -.->|"uses email logs"| node_database
node_home -->|"queries"| node_database
node_database -->|"maps entities"| node_domain_models

click node_course_browse "https://github.com/seangnang/simple-website/blob/master/Controllers/CourseController.cs"
click node_enrollment "https://github.com/seangnang/simple-website/blob/master/Controllers/CourseController.cs"
click node_lesson_learning "https://github.com/seangnang/simple-website/blob/master/Controllers/CourseController.cs"
click node_progress "https://github.com/seangnang/simple-website/blob/master/Models/LessonProgress.cs"
click node_payments "https://github.com/seangnang/simple-website/blob/master/Controllers/PaymentController.cs"
click node_instructor_tools "https://github.com/seangnang/simple-website/blob/master/Controllers/InstructorController.cs"
click node_categories "https://github.com/seangnang/simple-website/blob/master/Controllers/CategoryController.cs"
click node_coupons "https://github.com/seangnang/simple-website/blob/master/Controllers/CouponController.cs"
click node_admin "https://github.com/seangnang/simple-website/blob/master/Controllers/AdminController.cs"
click node_dashboard "https://github.com/seangnang/simple-website/blob/master/Controllers/DashboardController.cs"
click node_accounts "https://github.com/seangnang/simple-website/blob/master/Controllers/AccountController.cs"
click node_profiles "https://github.com/seangnang/simple-website/blob/master/Controllers/ProfileController.cs"
click node_reviews "https://github.com/seangnang/simple-website/blob/master/Controllers/ReviewController.cs"
click node_comments "https://github.com/seangnang/simple-website/blob/master/Controllers/CommentController.cs"
click node_notifications "https://github.com/seangnang/simple-website/blob/master/Services/NotificationService.cs"
click node_notification_ui "https://github.com/seangnang/simple-website/blob/master/Controllers/NotificationController.cs"
click node_email "https://github.com/seangnang/simple-website/blob/master/Services/EmailService.cs"
click node_email_inbox "https://github.com/seangnang/simple-website/blob/master/Controllers/EmailController.cs"
click node_home "https://github.com/seangnang/simple-website/blob/master/Controllers/HomeController.cs"
click node_domain_models "https://github.com/seangnang/simple-website/tree/master/Models"
click node_database "https://github.com/seangnang/simple-website/blob/master/Data/AppDbContext.cs"
click node_stripe "https://github.com/seangnang/simple-website/blob/master/Models/StripeSettings.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_course_browse,node_enrollment,node_lesson_learning,node_progress,node_payments toneBlue
class node_instructor_tools,node_categories,node_coupons,node_admin,node_dashboard toneAmber
class node_accounts,node_profiles,node_reviews,node_comments,node_home toneMint
class node_notifications,node_notification_ui,node_email,node_email_inbox toneRose
class node_domain_models,node_database,node_stripe,node_learner,node_instructor toneIndigo
```

## Components

### Course learning

- [Course browsing](https://github.com/seangnang/simple-website/blob/master/Controllers/CourseController.cs): `Controllers/CourseController.cs`
- [Enrollment](https://github.com/seangnang/simple-website/blob/master/Controllers/CourseController.cs): `Controllers/CourseController.cs`
- [Lesson learning](https://github.com/seangnang/simple-website/blob/master/Controllers/CourseController.cs): `Controllers/CourseController.cs`
- [Lesson progress](https://github.com/seangnang/simple-website/blob/master/Models/LessonProgress.cs): `Models/LessonProgress.cs`
- [Payment handling](https://github.com/seangnang/simple-website/blob/master/Controllers/PaymentController.cs): `Controllers/PaymentController.cs`

### Course operations

- [Instructor tools](https://github.com/seangnang/simple-website/blob/master/Controllers/InstructorController.cs): `Controllers/InstructorController.cs`
- [Category management](https://github.com/seangnang/simple-website/blob/master/Controllers/CategoryController.cs): `Controllers/CategoryController.cs`
- [Coupon management](https://github.com/seangnang/simple-website/blob/master/Controllers/CouponController.cs): `Controllers/CouponController.cs`
- [Administration](https://github.com/seangnang/simple-website/blob/master/Controllers/AdminController.cs): `Controllers/AdminController.cs`
- [Dashboard](https://github.com/seangnang/simple-website/blob/master/Controllers/DashboardController.cs): `Controllers/DashboardController.cs`

### Accounts and community

- [Account management](https://github.com/seangnang/simple-website/blob/master/Controllers/AccountController.cs): `Controllers/AccountController.cs`
- [User profiles](https://github.com/seangnang/simple-website/blob/master/Controllers/ProfileController.cs): `Controllers/ProfileController.cs`
- [Course reviews](https://github.com/seangnang/simple-website/blob/master/Controllers/ReviewController.cs): `Controllers/ReviewController.cs`
- [Lesson comments](https://github.com/seangnang/simple-website/blob/master/Controllers/CommentController.cs): `Controllers/CommentController.cs`
- [Home pages](https://github.com/seangnang/simple-website/blob/master/Controllers/HomeController.cs): `Controllers/HomeController.cs`

### Messaging

- [Notifications](https://github.com/seangnang/simple-website/blob/master/Services/NotificationService.cs): `Services/NotificationService.cs`
- [Notification access](https://github.com/seangnang/simple-website/blob/master/Controllers/NotificationController.cs): `Controllers/NotificationController.cs`
- [Email service](https://github.com/seangnang/simple-website/blob/master/Services/EmailService.cs): `Services/EmailService.cs`
- [Email inbox](https://github.com/seangnang/simple-website/blob/master/Controllers/EmailController.cs): `Controllers/EmailController.cs`

### Application data

- [LMS entities](https://github.com/seangnang/simple-website/tree/master/Models): `Models`
- [Application database](https://github.com/seangnang/simple-website/blob/master/Data/AppDbContext.cs): `Data/AppDbContext.cs`
- [Stripe settings](https://github.com/seangnang/simple-website/blob/master/Models/StripeSettings.cs): `Models/StripeSettings.cs`

### Other components

- **Learner**
- **Instructor**

## Connections

- Learner → Course browsing: browses
- Learner → Enrollment: enrolls
- Learner → Lesson learning: studies
- Course browsing → Application database: queries (evidence: `Controllers/CourseController.cs`)
- Enrollment → Application database: saves enrollment (evidence: `Controllers/CourseController.cs`)
- Enrollment → Email service: sends email (evidence: `Controllers/CourseController.cs`)
- Enrollment → Notifications: notifies users (evidence: `Controllers/CourseController.cs`)
- Lesson learning → Application database: loads lessons (evidence: `Controllers/CourseController.cs`)
- Lesson learning → Lesson progress: records completion (evidence: `Controllers/CourseController.cs`)
- Lesson learning → Application database: saves progress (evidence: `Controllers/CourseController.cs`)
- Payment handling → Application database: reads and writes (evidence: `Controllers/PaymentController.cs`)
- Payment handling → Stripe settings: uses settings (evidence: `Controllers/PaymentController.cs`)
- Instructor → Instructor tools: manages courses
- Instructor tools → Application database: reads and writes (evidence: `Controllers/InstructorController.cs`)
- Category management → Application database: reads and writes (evidence: `Controllers/CategoryController.cs`)
- Coupon management → Application database: reads and writes (evidence: `Controllers/CouponController.cs`)
- Administration → Application database: queries (evidence: `Controllers/AdminController.cs`)
- Dashboard → Application database: queries (evidence: `Controllers/DashboardController.cs`)
- Account management → Application database: uses users (evidence: `Controllers/AccountController.cs`)
- Account management → Notifications: requests notifications (evidence: `Controllers/AccountController.cs`)
- User profiles → Application database: uses users
- Course reviews → Application database: reads and writes (evidence: `Controllers/ReviewController.cs`)
- Course reviews → Notifications: sends notifications (evidence: `Controllers/ReviewController.cs`)
- Lesson comments → Application database: reads and writes (evidence: `Controllers/CommentController.cs`)
- Lesson comments → Notifications: sends notifications (evidence: `Controllers/CommentController.cs`)
- Notification access → Notifications: loads notifications (evidence: `Controllers/NotificationController.cs`)
- Notifications → Application database: stores notifications (evidence: `Services/NotificationService.cs`)
- Email inbox → Application database: uses email logs (evidence: `Controllers/EmailController.cs`)
- Home pages → Application database: queries (evidence: `Controllers/HomeController.cs`)
- Application database → LMS entities: maps entities (evidence: `Data/AppDbContext.cs`)
