# maheshs-github/lms-project architecture

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

- Interactive diagram: https://gitdiagram.com/maheshs-github/lms-project
- Repository: https://github.com/maheshs-github/lms-project

## Overview

This is a dual-role learning management system: instructors create and submit courses, admins manage users and approve courses, and students browse, enroll, learn, track progress, review courses, and earn certificates. The React client serves these workflows through an Express REST API, with MongoDB-backed domain data and Socket.io real-time features. The graph preserves documented capabilities, but several route/controller and client-page connections are not shown in the excerpts; those uncertain links are omitted rather than inferred.

Main entry points: [`server/src/app.js`](https://github.com/maheshs-github/lms-project/blob/master/server/src/app.js) (API application), [`server/controllres/course.controller.js`](https://github.com/maheshs-github/lms-project/blob/master/server/controllres/course.controller.js) (Course workflows), [`client/src/utils/apiClient.js`](https://github.com/maheshs-github/lms-project/blob/master/client/src/utils/apiClient.js) (HTTP client), [`server/models`](https://github.com/maheshs-github/lms-project/tree/master/server/models) (Domain models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_frontend["Client entry<br/>[main.jsx]"]
  node_navigation["Role navigation<br/>[AppRoutes.jsx]"]
  node_authstate["Auth state<br/>[AuthSlice.js]"]
  node_learnerpages["Learning experience"]
  node_courseauthoring["Course authoring<br/>[NewCourse.jsx]"]
  node_adminui["Admin console<br/>[AdminDashboard.jsx]"]
  node_apiclient["HTTP client<br/>[apiClient.js]"]
end

subgraph group_api["REST application"]
  node_express["API application<br/>[app.js]"]
  node_userapi["Identity endpoints<br/>[user.routes.js]"]
  node_authentication["Authentication"]
end

subgraph group_domain["Learning services"]
  node_courses["Course workflows"]
  node_administration["Admin workflows"]
  node_payments["Course payments"]
  node_progress["Learning progress"]
  node_certificates["Certification"]
  node_realtime["Live updates<br/>[index.js]"]
end

subgraph group_state["Persistence and integrations"]
  node_models[("Domain models")]
  node_cache["Course cache<br/>[cache.js]"]
  node_redis[("Redis<br/>[redis.js]")]
  node_media["Cloudinary media<br/>[cloudinary.js]"]
end

node_learner(("Users"))

node_learner -->|"uses"| node_frontend
node_frontend -->|"loads routes"| node_navigation
node_frontend -->|"initializes state"| node_authstate
node_learner -->|"learns and tracks"| node_learnerpages
node_learner -->|"creates courses"| node_courseauthoring
node_learner -->|"administers"| node_adminui
node_learnerpages -.->|"requests data"| node_apiclient
node_courseauthoring -.->|"submits courses"| node_apiclient
node_adminui -.->|"requests admin data"| node_apiclient
node_apiclient -->|"calls REST API"| node_express
node_express -->|"mounts routes"| node_userapi
node_userapi -->|"guards requests"| node_authentication
node_userapi -->|"handles identity data"| node_models
node_express -->|"routes course requests"| node_courses
node_courses -->|"reads and writes"| node_models
node_courses -->|"uploads thumbnails"| node_media
node_courses -->|"invalidates catalog"| node_cache
node_cache -->|"uses cache store"| node_redis
node_express -->|"routes admin requests"| node_administration
node_administration -->|"queries admin data"| node_models
node_administration -->|"invalidates catalog"| node_cache
node_express -->|"routes payment requests"| node_payments
node_express -->|"routes progress requests"| node_progress
node_express -->|"routes certificate requests"| node_certificates
node_express -->|"adds real-time layer"| node_realtime
node_realtime -->|"uses user and message data"| node_models
node_learner -.->|"pays for courses"| node_payments
node_progress -.->|"completion triggers"| node_certificates

click node_frontend "https://github.com/maheshs-github/lms-project/blob/master/client/src/main.jsx"
click node_navigation "https://github.com/maheshs-github/lms-project/blob/master/client/src/Routes/AppRoutes.jsx"
click node_authstate "https://github.com/maheshs-github/lms-project/blob/master/client/src/redux/AuthSlice.js"
click node_learnerpages "https://github.com/maheshs-github/lms-project/blob/master/client/src/pages/student/StudentDashBoard.jsx"
click node_courseauthoring "https://github.com/maheshs-github/lms-project/blob/master/client/src/pages/instructor/NewCourse.jsx"
click node_adminui "https://github.com/maheshs-github/lms-project/blob/master/client/src/pages/admin/AdminDashboard.jsx"
click node_apiclient "https://github.com/maheshs-github/lms-project/blob/master/client/src/utils/apiClient.js"
click node_express "https://github.com/maheshs-github/lms-project/blob/master/server/src/app.js"
click node_userapi "https://github.com/maheshs-github/lms-project/blob/master/server/routes/user.routes.js"
click node_authentication "https://github.com/maheshs-github/lms-project/blob/master/server/middlewares/auth.middlewares.js"
click node_courses "https://github.com/maheshs-github/lms-project/blob/master/server/controllres/course.controller.js"
click node_administration "https://github.com/maheshs-github/lms-project/blob/master/server/controllres/admin.controller.js"
click node_payments "https://github.com/maheshs-github/lms-project/blob/master/server/controllres/payment.controller.js"
click node_progress "https://github.com/maheshs-github/lms-project/blob/master/server/controllres/progress.controller.js"
click node_certificates "https://github.com/maheshs-github/lms-project/blob/master/server/controllres/certificate.controller.js"
click node_realtime "https://github.com/maheshs-github/lms-project/blob/master/server/socket/index.js"
click node_models "https://github.com/maheshs-github/lms-project/tree/master/server/models"
click node_cache "https://github.com/maheshs-github/lms-project/blob/master/server/utils/cache.js"
click node_redis "https://github.com/maheshs-github/lms-project/blob/master/server/config/redis.js"
click node_media "https://github.com/maheshs-github/lms-project/blob/master/server/utils/cloudinary.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_frontend,node_navigation,node_authstate,node_learnerpages,node_courseauthoring,node_adminui,node_apiclient,node_learner toneBlue
class node_express,node_userapi,node_authentication toneAmber
class node_courses,node_administration,node_payments,node_progress,node_certificates,node_realtime toneMint
class node_models,node_cache,node_redis,node_media toneRose
```

## Components

### React client

- [Client entry](https://github.com/maheshs-github/lms-project/blob/master/client/src/main.jsx): `client/src/main.jsx`
- [Role navigation](https://github.com/maheshs-github/lms-project/blob/master/client/src/Routes/AppRoutes.jsx): `client/src/Routes/AppRoutes.jsx`
- [Auth state](https://github.com/maheshs-github/lms-project/blob/master/client/src/redux/AuthSlice.js): `client/src/redux/AuthSlice.js`
- [Learning experience](https://github.com/maheshs-github/lms-project/blob/master/client/src/pages/student/StudentDashBoard.jsx): `client/src/pages/student/StudentDashBoard.jsx`
- [Course authoring](https://github.com/maheshs-github/lms-project/blob/master/client/src/pages/instructor/NewCourse.jsx): `client/src/pages/instructor/NewCourse.jsx`
- [Admin console](https://github.com/maheshs-github/lms-project/blob/master/client/src/pages/admin/AdminDashboard.jsx): `client/src/pages/admin/AdminDashboard.jsx`
- [HTTP client](https://github.com/maheshs-github/lms-project/blob/master/client/src/utils/apiClient.js): `client/src/utils/apiClient.js`

### REST application

- [API application](https://github.com/maheshs-github/lms-project/blob/master/server/src/app.js): `server/src/app.js`
- [Identity endpoints](https://github.com/maheshs-github/lms-project/blob/master/server/routes/user.routes.js): `server/routes/user.routes.js`
- [Authentication](https://github.com/maheshs-github/lms-project/blob/master/server/middlewares/auth.middlewares.js): `server/middlewares/auth.middlewares.js`

### Learning services

- [Course workflows](https://github.com/maheshs-github/lms-project/blob/master/server/controllres/course.controller.js): `server/controllres/course.controller.js`
- [Admin workflows](https://github.com/maheshs-github/lms-project/blob/master/server/controllres/admin.controller.js): `server/controllres/admin.controller.js`
- [Course payments](https://github.com/maheshs-github/lms-project/blob/master/server/controllres/payment.controller.js): `server/controllres/payment.controller.js`
- [Learning progress](https://github.com/maheshs-github/lms-project/blob/master/server/controllres/progress.controller.js): `server/controllres/progress.controller.js`
- [Certification](https://github.com/maheshs-github/lms-project/blob/master/server/controllres/certificate.controller.js): `server/controllres/certificate.controller.js`
- [Live updates](https://github.com/maheshs-github/lms-project/blob/master/server/socket/index.js): `server/socket/index.js`

### Persistence and integrations

- [Domain models](https://github.com/maheshs-github/lms-project/tree/master/server/models): `server/models`
- [Course cache](https://github.com/maheshs-github/lms-project/blob/master/server/utils/cache.js): `server/utils/cache.js`
- [Redis](https://github.com/maheshs-github/lms-project/blob/master/server/config/redis.js): `server/config/redis.js`
- [Cloudinary media](https://github.com/maheshs-github/lms-project/blob/master/server/utils/cloudinary.js): `server/utils/cloudinary.js`

### Other components

- **Users**

## Connections

- Users → Client entry: uses
- Client entry → Role navigation: loads routes
- Client entry → Auth state: initializes state
- Users → Learning experience: learns and tracks
- Users → Course authoring: creates courses
- Users → Admin console: administers
- Learning experience → HTTP client: requests data
- Course authoring → HTTP client: submits courses
- Admin console → HTTP client: requests admin data
- HTTP client → API application: calls REST API
- API application → Identity endpoints: mounts routes (evidence: `server/src/app.js`)
- Identity endpoints → Authentication: guards requests (evidence: `server/routes/user.routes.js`)
- Identity endpoints → Domain models: handles identity data (evidence: `server/routes/user.routes.js`)
- API application → Course workflows: routes course requests (evidence: `server/src/app.js`)
- Course workflows → Domain models: reads and writes (evidence: `server/controllres/course.controller.js`)
- Course workflows → Cloudinary media: uploads thumbnails (evidence: `server/controllres/course.controller.js`)
- Course workflows → Course cache: invalidates catalog (evidence: `server/controllres/course.controller.js`)
- Course cache → Redis: uses cache store (evidence: `server/utils/cache.js`)
- API application → Admin workflows: routes admin requests (evidence: `server/src/app.js`)
- Admin workflows → Domain models: queries admin data (evidence: `server/controllres/admin.controller.js`)
- Admin workflows → Course cache: invalidates catalog (evidence: `server/controllres/admin.controller.js`)
- API application → Course payments: routes payment requests (evidence: `server/src/app.js`)
- API application → Learning progress: routes progress requests (evidence: `server/src/app.js`)
- API application → Certification: routes certificate requests (evidence: `server/src/app.js`)
- API application → Live updates: adds real-time layer
- Live updates → Domain models: uses user and message data (evidence: `server/socket/index.js`)
- Users → Course payments: pays for courses
- Learning progress → Certification: completion triggers
