# serkanbyx/lms-mern architecture

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

- Interactive diagram: https://gitdiagram.com/serkanbyx/lms-mern
- Repository: https://github.com/serkanbyx/lms-mern

## Overview

Lumen LMS is a full-stack learning platform: learners discover courses, enroll, study lessons, complete server-graded quizzes, and earn certificates; instructors author and submit courses for admin review and publication. The map follows browser routes through the API into domain controllers and MongoDB, with separate identity/security, media, and moderation branches. Relationships use README architecture statements and SOURCE INDEX references plus shown excerpts; unsampled subsystem links are omitted where the caller is not evidenced.

Main entry points: [`server/models/Enrollment.model.js`](https://github.com/serkanbyx/lms-mern/blob/main/server/models/Enrollment.model.js) (Learning records), [`client/src/App.jsx`](https://github.com/serkanbyx/lms-mern/blob/main/client/src/App.jsx) (React application), [`server/routes/course.routes.js`](https://github.com/serkanbyx/lms-mern/blob/main/server/routes/course.routes.js) (REST routes), [`server/controllers/auth.controller.js`](https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/auth.controller.js) (Identity and RBAC)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Learner and author UI"]
  node_spa["React application<br/>[App.jsx]"]
  node_http["API client<br/>[axios.js]"]
  node_authui["Sign-in and registration<br/>[LoginPage.jsx]"]
  node_catalog["Course discovery"]
  node_student["Learning experience"]
  node_author["Course authoring"]
  node_adminui["Moderation console"]
end

subgraph group_api["API and access"]
  node_routes["REST routes<br/>[course.routes.js]"]
  node_identity["Identity and RBAC<br/>[auth.controller.js]"]
  node_authguard["JWT access guard<br/>[auth.middleware.js]"]
end

subgraph group_learning["Learning domain"]
  node_courses["Course lifecycle"]
  node_enrollment["Enrollment and certificates"]
  node_lessons["Lessons and progress"]
  node_quizzes["Quiz attempts and grading<br/>[quiz.controller.js]"]
  node_admin["Admin moderation"]
  node_models[("Learning records")]
end

subgraph group_operations["Platform services"]
  node_mongo[("MongoDB")]
  node_media["Signed media uploads"]
  node_redis["Rate limiting"]
  node_mail["Transactional email<br/>[email.js]"]
end

node_browser(("Browser users"))
node_cloudinary[("Cloudinary")]
node_redisservice[("Redis")]
node_smtp["SMTP"]

node_browser -->|"uses"| node_spa
node_spa -->|"requests through"| node_http
node_http -->|"calls REST API"| node_routes
node_spa -->|"routes to"| node_catalog
node_spa -->|"routes to"| node_student
node_spa -->|"routes to"| node_author
node_spa -->|"routes to"| node_adminui
node_http -->|"calls"| node_identity
node_routes -->|"dispatches"| node_courses
node_routes -->|"dispatches"| node_enrollment
node_routes -->|"protects routes"| node_authguard
node_authguard -->|"loads user"| node_identity
node_identity -->|"reads identity"| node_models
node_courses -->|"reads and writes"| node_models
node_enrollment -->|"reads and writes"| node_models
node_lessons -.->|"updates learning state"| node_models
node_quizzes -.->|"stores attempts"| node_models
node_admin -->|"moderates records"| node_models
node_models -->|"persists"| node_mongo
node_media -->|"signed uploads"| node_cloudinary
node_redis -->|"uses"| node_redisservice
node_identity -->|"sends account mail"| node_mail
node_mail -.->|"delivers"| node_smtp

click node_spa "https://github.com/serkanbyx/lms-mern/blob/main/client/src/App.jsx"
click node_http "https://github.com/serkanbyx/lms-mern/blob/main/client/src/api/axios.js"
click node_authui "https://github.com/serkanbyx/lms-mern/blob/main/client/src/pages/auth/LoginPage.jsx"
click node_catalog "https://github.com/serkanbyx/lms-mern/blob/main/client/src/pages/public/CourseCatalogPage.jsx"
click node_student "https://github.com/serkanbyx/lms-mern/blob/main/client/src/pages/student/LessonPlayerPage.jsx"
click node_author "https://github.com/serkanbyx/lms-mern/blob/main/client/src/pages/instructor/CurriculumBuilderPage.jsx"
click node_adminui "https://github.com/serkanbyx/lms-mern/blob/main/client/src/pages/admin/PendingReviewPage.jsx"
click node_routes "https://github.com/serkanbyx/lms-mern/blob/main/server/routes/course.routes.js"
click node_identity "https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/auth.controller.js"
click node_authguard "https://github.com/serkanbyx/lms-mern/blob/main/server/middleware/auth.middleware.js"
click node_courses "https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/course.controller.js"
click node_enrollment "https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/enrollment.controller.js"
click node_lessons "https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/lesson.controller.js"
click node_quizzes "https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/quiz.controller.js"
click node_admin "https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/admin.controller.js"
click node_models "https://github.com/serkanbyx/lms-mern/blob/main/server/models/Enrollment.model.js"
click node_media "https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/upload.controller.js"
click node_redis "https://github.com/serkanbyx/lms-mern/blob/main/server/middleware/rateLimit.middleware.js"
click node_mail "https://github.com/serkanbyx/lms-mern/blob/main/server/utils/email.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_spa,node_http,node_authui,node_catalog,node_student,node_author,node_adminui,node_browser toneBlue
class node_routes,node_identity,node_authguard,node_cloudinary,node_redisservice toneAmber
class node_courses,node_enrollment,node_lessons,node_quizzes,node_admin,node_models toneMint
class node_mongo,node_media,node_redis,node_mail toneRose
class node_smtp toneIndigo
```

## Components

### Learner and author UI

- [React application](https://github.com/serkanbyx/lms-mern/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [API client](https://github.com/serkanbyx/lms-mern/blob/main/client/src/api/axios.js): `client/src/api/axios.js`
- [Sign-in and registration](https://github.com/serkanbyx/lms-mern/blob/main/client/src/pages/auth/LoginPage.jsx): `client/src/pages/auth/LoginPage.jsx`
- [Course discovery](https://github.com/serkanbyx/lms-mern/blob/main/client/src/pages/public/CourseCatalogPage.jsx): `client/src/pages/public/CourseCatalogPage.jsx`
- [Learning experience](https://github.com/serkanbyx/lms-mern/blob/main/client/src/pages/student/LessonPlayerPage.jsx): `client/src/pages/student/LessonPlayerPage.jsx`
- [Course authoring](https://github.com/serkanbyx/lms-mern/blob/main/client/src/pages/instructor/CurriculumBuilderPage.jsx): `client/src/pages/instructor/CurriculumBuilderPage.jsx`
- [Moderation console](https://github.com/serkanbyx/lms-mern/blob/main/client/src/pages/admin/PendingReviewPage.jsx): `client/src/pages/admin/PendingReviewPage.jsx`

### API and access

- [REST routes](https://github.com/serkanbyx/lms-mern/blob/main/server/routes/course.routes.js): `server/routes/course.routes.js`
- [Identity and RBAC](https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/auth.controller.js): `server/controllers/auth.controller.js`
- [JWT access guard](https://github.com/serkanbyx/lms-mern/blob/main/server/middleware/auth.middleware.js): `server/middleware/auth.middleware.js`

### Learning domain

- [Course lifecycle](https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/course.controller.js): `server/controllers/course.controller.js`
- [Enrollment and certificates](https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/enrollment.controller.js): `server/controllers/enrollment.controller.js`
- [Lessons and progress](https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/lesson.controller.js): `server/controllers/lesson.controller.js`
- [Quiz attempts and grading](https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/quiz.controller.js): `server/controllers/quiz.controller.js`
- [Admin moderation](https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/admin.controller.js): `server/controllers/admin.controller.js`
- [Learning records](https://github.com/serkanbyx/lms-mern/blob/main/server/models/Enrollment.model.js): `server/models/Enrollment.model.js`

### Platform services

- **MongoDB**
- [Signed media uploads](https://github.com/serkanbyx/lms-mern/blob/main/server/controllers/upload.controller.js): `server/controllers/upload.controller.js`
- [Rate limiting](https://github.com/serkanbyx/lms-mern/blob/main/server/middleware/rateLimit.middleware.js): `server/middleware/rateLimit.middleware.js`
- [Transactional email](https://github.com/serkanbyx/lms-mern/blob/main/server/utils/email.js): `server/utils/email.js`

### Other components

- **Browser users**
- **Cloudinary**
- **Redis**
- **SMTP**

## Connections

- Browser users → React application: uses (evidence: `README.md`)
- React application → API client: requests through (evidence: `client/src/api/axios.js`)
- API client → REST routes: calls REST API (evidence: `README.md`)
- React application → Course discovery: routes to (evidence: `client/src/App.jsx`)
- React application → Learning experience: routes to (evidence: `client/src/App.jsx`)
- React application → Course authoring: routes to (evidence: `client/src/App.jsx`)
- React application → Moderation console: routes to (evidence: `client/src/App.jsx`)
- API client → Identity and RBAC: calls (evidence: `client/src/api/axios.js`)
- REST routes → Course lifecycle: dispatches (evidence: `server/routes/course.routes.js`)
- REST routes → Enrollment and certificates: dispatches (evidence: `server/routes/course.routes.js`)
- REST routes → JWT access guard: protects routes (evidence: `server/routes/course.routes.js`)
- JWT access guard → Identity and RBAC: loads user (evidence: `server/middleware/auth.middleware.js`)
- Identity and RBAC → Learning records: reads identity (evidence: `server/controllers/auth.controller.js`)
- Course lifecycle → Learning records: reads and writes (evidence: `server/controllers/course.controller.js`)
- Enrollment and certificates → Learning records: reads and writes (evidence: `server/controllers/enrollment.controller.js`)
- Lessons and progress → Learning records: updates learning state
- Quiz attempts and grading → Learning records: stores attempts
- Admin moderation → Learning records: moderates records (evidence: `server/controllers/admin.controller.js`)
- Learning records → MongoDB: persists (evidence: `README.md`)
- Signed media uploads → Cloudinary: signed uploads (evidence: `README.md`)
- Rate limiting → Redis: uses (evidence: `server/middleware/rateLimit.middleware.js`)
- Identity and RBAC → Transactional email: sends account mail (evidence: `server/controllers/auth.controller.js`)
- Transactional email → SMTP: delivers (evidence: `README.md`)
