# naitiksharma014/pathshala-lms-project architecture

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

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

## Overview

Pathshala is a role-based learning-management app: students discover courses, enroll, view lectures, and review learning; teachers create and publish courses and manage lectures. The frontend routes users into these experiences and loads shared user, course, and review state. The backend exposes authentication, course, payment, review, and user routes backed by MongoDB models, with Cloudinary uploads and email support. The sampled sources establish routing and several backend calls, but do not show most frontend-to-backend requests, so those links are omitted.

Main entry points: [`Frontend/src/App.jsx`](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/App.jsx) (Web app routes), [`Backend/index.js`](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/index.js) (Server and routes), [`Backend/controller/courseController.js`](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/controller/courseController.js) (Course and lecture services), [`Backend/controller/authController.js`](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/controller/authController.js) (Authentication services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_webapp["Web app routes<br/>[App.jsx]"]
  node_client_entry["Client bootstrap<br/>[main.jsx]"]
end

subgraph group_identity["Identity"]
  node_auth_pages["Sign up / login<br/>[SignUp.jsx]"]
  node_profile["Profile management<br/>[EditProfile.jsx]"]
  node_user_state["User state<br/>[userSlice.js]"]
  node_firebase_auth["Firebase client<br/>[firebase.js]"]
  node_auth_routes["Authentication routes<br/>[authRoute.js]"]
  node_auth_logic["Authentication services<br/>[authController.js]"]
  node_user_model[("User records<br/>[user.js]")]
  node_mail["Email delivery<br/>[sendMail.js]"]
end

subgraph group_learning["Learning platform"]
  node_course_discovery["Course discovery<br/>[AllCourses.jsx]"]
  node_course_view["Course detail<br/>[ViewCourse.jsx]"]
  node_teacher_courses["Teacher course tools<br/>[Courses.jsx]"]
  node_teacher_edit["Course editing<br/>[EditCourse.jsx]"]
  node_lecture_tools["Lecture authoring<br/>[CreateLecture.jsx]"]
  node_lecture_view["Lecture viewing<br/>[ViewLectures.jsx]"]
  node_search_ui["AI course search<br/>[SearchWithAi.jsx]"]
  node_enrollment_ui["Enrolled courses"]
  node_review_ui["Review display<br/>[ReviewPage.jsx]"]
  node_review_loader["Review loader<br/>[getAllReviews.js]"]
  node_review_state["Review state<br/>[reviewSlice.js]"]
  node_course_logic["Course and lecture services"]
  node_course_model[("Course records<br/>[cousreModel.js]")]
  node_lecture_model[("Lecture records<br/>[lectureModels.js]")]
  node_media_upload["Media uploads<br/>[cloudinary.js]"]
  node_review_logic["Review services"]
  node_review_model[("Review records<br/>[reviewModel.js]")]
  node_order_logic["Enrollment / orders<br/>[orderController.js]"]
  node_search_logic["Course search"]
end

subgraph group_server["API server"]
  node_server_entry["Server and routes<br/>[index.js]"]
  node_course_routes["Course routes<br/>[courseRoute.js]"]
  node_review_routes["Review routes<br/>[reviewRoute.js]"]
  node_user_routes["User routes<br/>[userRoute.js]"]
end

node_learner(("Learner / educator"))

node_learner -->|"opens"| node_client_entry
node_client_entry -->|"renders"| node_webapp
node_webapp -->|"routes to"| node_auth_pages
node_webapp -->|"routes to"| node_profile
node_webapp -->|"routes to"| node_course_discovery
node_webapp -->|"routes to"| node_course_view
node_webapp -->|"routes to"| node_teacher_courses
node_webapp -->|"routes to"| node_teacher_edit
node_webapp -->|"routes to"| node_lecture_tools
node_webapp -->|"routes to"| node_lecture_view
node_webapp -->|"routes to"| node_search_ui
node_webapp -->|"routes to"| node_enrollment_ui
node_webapp -->|"loads"| node_review_loader
node_review_loader -->|"dispatches"| node_review_state
node_review_ui -->|"reads"| node_review_state
node_server_entry -->|"mounts"| node_auth_routes
node_server_entry -->|"mounts"| node_course_routes
node_server_entry -->|"mounts"| node_review_routes
node_server_entry -->|"mounts"| node_user_routes
node_auth_routes -->|"dispatches"| node_auth_logic
node_auth_logic -->|"reads / writes"| node_user_model
node_auth_logic -->|"sends OTP"| node_mail
node_course_routes -->|"dispatches"| node_course_logic
node_course_logic -->|"reads / writes"| node_course_model
node_course_logic -->|"reads / writes"| node_lecture_model
node_course_logic -->|"uploads media"| node_media_upload
node_review_routes -->|"dispatches"| node_review_logic
node_review_logic -->|"reads / updates"| node_course_model
node_review_logic -->|"reads / writes"| node_review_model
node_server_entry -->|"mounts payment routes"| node_order_logic
node_server_entry -->|"mounts course routes"| node_search_logic

click node_webapp "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/App.jsx"
click node_client_entry "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/main.jsx"
click node_auth_pages "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/SignUp.jsx"
click node_profile "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/EditProfile.jsx"
click node_user_state "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/redux/userSlice.js"
click node_firebase_auth "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/utils/firebase.js"
click node_course_discovery "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/AllCourses.jsx"
click node_course_view "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/ViewCourse.jsx"
click node_teacher_courses "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/Educator/Courses.jsx"
click node_teacher_edit "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/Educator/EditCourse.jsx"
click node_lecture_tools "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/Educator/CreateLecture.jsx"
click node_lecture_view "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/ViewLectures.jsx"
click node_search_ui "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/SearchWithAi.jsx"
click node_enrollment_ui "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/MyEnrolledCourses.jsx"
click node_review_ui "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/component/ReviewPage.jsx"
click node_review_loader "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/customHook/getAllReviews.js"
click node_review_state "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/redux/reviewSlice.js"
click node_server_entry "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/index.js"
click node_auth_routes "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/route/authRoute.js"
click node_auth_logic "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/controller/authController.js"
click node_user_model "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/models/user.js"
click node_mail "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/config/sendMail.js"
click node_course_routes "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/route/courseRoute.js"
click node_course_logic "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/controller/courseController.js"
click node_course_model "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/models/cousreModel.js"
click node_lecture_model "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/models/lectureModels.js"
click node_media_upload "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/config/cloudinary.js"
click node_review_routes "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/route/reviewRoute.js"
click node_review_logic "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/controller/reviewController.js"
click node_review_model "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/models/reviewModel.js"
click node_order_logic "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/controller/orderController.js"
click node_search_logic "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/controller/searchController.js"
click node_user_routes "https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/route/userRoute.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_webapp,node_client_entry toneBlue
class node_auth_pages,node_profile,node_user_state,node_firebase_auth,node_auth_routes,node_auth_logic,node_user_model,node_mail toneAmber
class node_course_discovery,node_course_view,node_teacher_courses,node_teacher_edit,node_lecture_tools,node_lecture_view,node_search_ui,node_enrollment_ui,node_review_ui,node_review_loader,node_review_state,node_course_logic,node_course_model,node_lecture_model,node_media_upload,node_review_logic,node_review_model,node_order_logic,node_search_logic toneMint
class node_server_entry,node_course_routes,node_review_routes,node_user_routes toneRose
class node_learner toneIndigo
```

## Components

### Web client

- [Web app routes](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/App.jsx): `Frontend/src/App.jsx`
- [Client bootstrap](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/main.jsx): `Frontend/src/main.jsx`

### Identity

- [Sign up / login](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/SignUp.jsx): `Frontend/src/pages/SignUp.jsx`
- [Profile management](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/EditProfile.jsx): `Frontend/src/pages/EditProfile.jsx`
- [User state](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/redux/userSlice.js): `Frontend/src/redux/userSlice.js`
- [Firebase client](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/utils/firebase.js): `Frontend/src/utils/firebase.js`
- [Authentication routes](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/route/authRoute.js): `Backend/route/authRoute.js`
- [Authentication services](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/controller/authController.js): `Backend/controller/authController.js`
- [User records](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/models/user.js): `Backend/models/user.js`
- [Email delivery](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/config/sendMail.js): `Backend/config/sendMail.js`

### Learning platform

- [Course discovery](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/AllCourses.jsx): `Frontend/src/pages/AllCourses.jsx`
- [Course detail](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/ViewCourse.jsx): `Frontend/src/pages/ViewCourse.jsx`
- [Teacher course tools](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/Educator/Courses.jsx): `Frontend/src/pages/Educator/Courses.jsx`
- [Course editing](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/Educator/EditCourse.jsx): `Frontend/src/pages/Educator/EditCourse.jsx`
- [Lecture authoring](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/Educator/CreateLecture.jsx): `Frontend/src/pages/Educator/CreateLecture.jsx`
- [Lecture viewing](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/ViewLectures.jsx): `Frontend/src/pages/ViewLectures.jsx`
- [AI course search](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/SearchWithAi.jsx): `Frontend/src/pages/SearchWithAi.jsx`
- [Enrolled courses](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/pages/MyEnrolledCourses.jsx): `Frontend/src/pages/MyEnrolledCourses.jsx`
- [Review display](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/component/ReviewPage.jsx): `Frontend/src/component/ReviewPage.jsx`
- [Review loader](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/customHook/getAllReviews.js): `Frontend/src/customHook/getAllReviews.js`
- [Review state](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Frontend/src/redux/reviewSlice.js): `Frontend/src/redux/reviewSlice.js`
- [Course and lecture services](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/controller/courseController.js): `Backend/controller/courseController.js`
- [Course records](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/models/cousreModel.js): `Backend/models/cousreModel.js`
- [Lecture records](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/models/lectureModels.js): `Backend/models/lectureModels.js`
- [Media uploads](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/config/cloudinary.js): `Backend/config/cloudinary.js`
- [Review services](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/controller/reviewController.js): `Backend/controller/reviewController.js`
- [Review records](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/models/reviewModel.js): `Backend/models/reviewModel.js`
- [Enrollment / orders](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/controller/orderController.js): `Backend/controller/orderController.js`
- [Course search](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/controller/searchController.js): `Backend/controller/searchController.js`

### API server

- [Server and routes](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/index.js): `Backend/index.js`
- [Course routes](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/route/courseRoute.js): `Backend/route/courseRoute.js`
- [Review routes](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/route/reviewRoute.js): `Backend/route/reviewRoute.js`
- [User routes](https://github.com/naitiksharma014/pathshala-lms-project/blob/main/Backend/route/userRoute.js): `Backend/route/userRoute.js`

### Other components

- **Learner / educator**

## Connections

- Learner / educator → Client bootstrap: opens (evidence: `Frontend/src/main.jsx`)
- Client bootstrap → Web app routes: renders (evidence: `Frontend/src/main.jsx`)
- Web app routes → Sign up / login: routes to (evidence: `Frontend/src/App.jsx`)
- Web app routes → Profile management: routes to (evidence: `Frontend/src/App.jsx`)
- Web app routes → Course discovery: routes to (evidence: `Frontend/src/App.jsx`)
- Web app routes → Course detail: routes to (evidence: `Frontend/src/App.jsx`)
- Web app routes → Teacher course tools: routes to (evidence: `Frontend/src/App.jsx`)
- Web app routes → Course editing: routes to (evidence: `Frontend/src/App.jsx`)
- Web app routes → Lecture authoring: routes to (evidence: `Frontend/src/App.jsx`)
- Web app routes → Lecture viewing: routes to (evidence: `Frontend/src/App.jsx`)
- Web app routes → AI course search: routes to (evidence: `Frontend/src/App.jsx`)
- Web app routes → Enrolled courses: routes to (evidence: `Frontend/src/App.jsx`)
- Web app routes → Review loader: loads (evidence: `Frontend/src/App.jsx`)
- Review loader → Review state: dispatches (evidence: `Frontend/src/customHook/getAllReviews.js`)
- Review display → Review state: reads (evidence: `Frontend/src/component/ReviewPage.jsx`)
- Server and routes → Authentication routes: mounts (evidence: `Backend/index.js`)
- Server and routes → Course routes: mounts (evidence: `Backend/index.js`)
- Server and routes → Review routes: mounts (evidence: `Backend/index.js`)
- Server and routes → User routes: mounts (evidence: `Backend/index.js`)
- Authentication routes → Authentication services: dispatches (evidence: `Backend/route/authRoute.js`)
- Authentication services → User records: reads / writes (evidence: `Backend/controller/authController.js`)
- Authentication services → Email delivery: sends OTP (evidence: `Backend/controller/authController.js`)
- Course routes → Course and lecture services: dispatches (evidence: `Backend/route/courseRoute.js`)
- Course and lecture services → Course records: reads / writes (evidence: `Backend/controller/courseController.js`)
- Course and lecture services → Lecture records: reads / writes (evidence: `Backend/controller/courseController.js`)
- Course and lecture services → Media uploads: uploads media (evidence: `Backend/controller/courseController.js`)
- Review routes → Review services: dispatches (evidence: `Backend/route/reviewRoute.js`)
- Review services → Course records: reads / updates (evidence: `Backend/controller/reviewController.js`)
- Review services → Review records: reads / writes (evidence: `Backend/controller/reviewController.js`)
- Server and routes → Enrollment / orders: mounts payment routes (evidence: `Backend/index.js`)
- Server and routes → Course search: mounts course routes (evidence: `Backend/index.js`)
