# rajat-wyrm/lms-system architecture

> Architecture diagram of the GitHub repository rajat-wyrm/lms-system, 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/rajat-wyrm/lms-system
- Repository: https://github.com/rajat-wyrm/lms-system

## Overview

Course Compass is a multi-application learning management system: student and instructor workflows run through a React portal, while administrators use a separate console; both call the Express API for platform data. The backend handles authentication, course and enrollment operations, reviews, notifications, and persistence. A separate notebook-learning API supports document-grounded chat and study activities through retrieval and generation. README documents the main portal/API/database relationships; AI endpoint and service relationships are supported by the supplied source index and excerpts. Several backend and UI internals were not sampled, so their links are omitted where not evidenced.

Main entry points: [`backend/src/app.js`](https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/app.js) (Express API), [`admin/src/routes/AppRouter.jsx`](https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/routes/AppRouter.jsx) (Admin routes), [`AI/api/app/main.py`](https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/main.py) (Notebook API), [`course-compass-main/src/routes/AppRouter.tsx`](https://github.com/rajat-wyrm/lms-system/blob/main/course-compass-main/src/routes/AppRouter.tsx) (Portal routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Learning portal"]
  node_portal_app["Student portal<br/>[App.tsx]"]
  node_portal_routes["Portal routes<br/>[AppRouter.tsx]"]
  node_course_learning["Course learning<br/>[CoursePlayer.tsx]"]
  node_instructor_tools["Instructor tools<br/>[ManageCourse.tsx]"]
end

subgraph group_admin["Admin console"]
  node_admin_app["Admin console<br/>[App.jsx]"]
  node_admin_routes["Admin routes<br/>[AppRouter.jsx]"]
  node_admin_courses["Course management<br/>[Courses.jsx]"]
  node_admin_people["User management<br/>[Users.jsx]"]
  node_admin_reviews["Review moderation<br/>[Reviews.jsx]"]
  node_admin_notifications["Notifications<br/>[Notifications.jsx]"]
  node_admin_analytics["Platform analytics<br/>[Analytics.jsx]"]
end

subgraph group_backend["LMS backend"]
  node_express_api["Express API<br/>[app.js]"]
  node_course_services["Course services"]
  node_enrollment["Enrollment and progress"]
  node_reviews["Reviews"]
  node_notifications_service["Notification service"]
  node_email_jobs["Email jobs<br/>[email.queue.js]"]
end

subgraph group_ai["Notebook learning"]
  node_notebook_api["Notebook API<br/>[main.py]"]
  node_study_endpoints["Study endpoints<br/>[chat.py]"]
  node_document_ingest["Document ingestion<br/>[document.py]"]
  node_quiz_assignment["Quizzes and assignments<br/>[quiz.py]"]
  node_rag["RAG generation<br/>[rag_service.py]"]
  node_chroma[("Vector retrieval<br/>[chroma_store.py]")]
  node_embedding["Embedding model"]
  node_sqlite[("Notebook database<br/>[session.py]")]
end

subgraph group_storage["Persistence and services"]
  node_prisma["Prisma database access<br/>[db.js]"]
  node_postgres[("PostgreSQL")]
  node_redis[("Redis cache<br/>[redis.service.js]")]
end

node_learner(("Learners"))
node_instructor(("Instructors"))
node_administrator(("Administrators"))

node_learner -->|"uses"| node_portal_app
node_instructor -->|"uses"| node_portal_app
node_portal_app -->|"loads"| node_portal_routes
node_portal_routes -.->|"routes to"| node_course_learning
node_portal_routes -.->|"routes to"| node_instructor_tools
node_course_learning -.->|"uses REST"| node_express_api
node_instructor_tools -.->|"uses REST"| node_express_api
node_administrator -->|"uses"| node_admin_app
node_admin_app -->|"loads"| node_admin_routes
node_admin_routes -->|"routes to"| node_admin_courses
node_admin_routes -->|"routes to"| node_admin_people
node_admin_routes -->|"routes to"| node_admin_reviews
node_admin_routes -->|"routes to"| node_admin_notifications
node_admin_routes -->|"routes to"| node_admin_analytics
node_admin_courses -.->|"uses API"| node_express_api
node_admin_people -.->|"uses API"| node_express_api
node_admin_reviews -.->|"uses API"| node_express_api
node_admin_notifications -.->|"uses API"| node_express_api
node_admin_analytics -.->|"uses API"| node_express_api
node_express_api -.->|"routes requests"| node_course_services
node_express_api -.->|"routes requests"| node_enrollment
node_express_api -->|"routes requests"| node_reviews
node_enrollment -->|"reads and writes"| node_prisma
node_reviews -->|"reads and writes"| node_prisma
node_prisma -->|"connects"| node_postgres
node_enrollment -->|"clears cache"| node_redis
node_reviews -->|"creates notice"| node_notifications_service
node_notebook_api -->|"mounts routes"| node_study_endpoints
node_notebook_api -->|"mounts routes"| node_document_ingest
node_notebook_api -->|"mounts routes"| node_quiz_assignment
node_study_endpoints -->|"calls"| node_rag
node_document_ingest -->|"stores documents"| node_chroma
node_quiz_assignment -->|"calls"| node_rag
node_rag -->|"retrieves context"| node_chroma
node_chroma -->|"embeds queries"| node_embedding
node_notebook_api -->|"initializes tables"| node_sqlite

click node_portal_app "https://github.com/rajat-wyrm/lms-system/blob/main/course-compass-main/src/App.tsx"
click node_portal_routes "https://github.com/rajat-wyrm/lms-system/blob/main/course-compass-main/src/routes/AppRouter.tsx"
click node_course_learning "https://github.com/rajat-wyrm/lms-system/blob/main/course-compass-main/src/pages/Courses/CoursePlayer.tsx"
click node_instructor_tools "https://github.com/rajat-wyrm/lms-system/blob/main/course-compass-main/src/pages/Portal/ManageCourse.tsx"
click node_admin_app "https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/App.jsx"
click node_admin_routes "https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/routes/AppRouter.jsx"
click node_admin_courses "https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/pages/Dashboard/Admin/Courses.jsx"
click node_admin_people "https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/pages/Dashboard/Admin/Users.jsx"
click node_admin_reviews "https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/pages/Dashboard/Admin/Reviews.jsx"
click node_admin_notifications "https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/pages/Dashboard/Admin/Notifications.jsx"
click node_admin_analytics "https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/pages/Dashboard/Admin/Analytics.jsx"
click node_express_api "https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/app.js"
click node_course_services "https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/controllers/courses.controller.js"
click node_enrollment "https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/controllers/enrollment.controller.js"
click node_reviews "https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/controllers/review.controller.js"
click node_notifications_service "https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/notification.service.js"
click node_email_jobs "https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/queues/email.queue.js"
click node_prisma "https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/config/db.js"
click node_redis "https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/services/redis.service.js"
click node_notebook_api "https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/main.py"
click node_study_endpoints "https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/api/chat.py"
click node_document_ingest "https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/api/document.py"
click node_quiz_assignment "https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/api/quiz.py"
click node_rag "https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/services/rag_service.py"
click node_chroma "https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/vectorstore/chroma_store.py"
click node_embedding "https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/get_embedding_function.py"
click node_sqlite "https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/db/session.py"

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_portal_app,node_portal_routes,node_course_learning,node_instructor_tools toneBlue
class node_admin_app,node_admin_routes,node_admin_courses,node_admin_people,node_admin_reviews,node_admin_notifications,node_admin_analytics toneAmber
class node_express_api,node_course_services,node_enrollment,node_reviews,node_notifications_service,node_email_jobs toneMint
class node_notebook_api,node_study_endpoints,node_document_ingest,node_quiz_assignment,node_rag,node_chroma,node_embedding,node_sqlite toneRose
class node_prisma,node_postgres,node_redis,node_learner,node_instructor,node_administrator toneIndigo
```

## Components

### Learning portal

- [Student portal](https://github.com/rajat-wyrm/lms-system/blob/main/course-compass-main/src/App.tsx): `course-compass-main/src/App.tsx`
- [Portal routes](https://github.com/rajat-wyrm/lms-system/blob/main/course-compass-main/src/routes/AppRouter.tsx): `course-compass-main/src/routes/AppRouter.tsx`
- [Course learning](https://github.com/rajat-wyrm/lms-system/blob/main/course-compass-main/src/pages/Courses/CoursePlayer.tsx): `course-compass-main/src/pages/Courses/CoursePlayer.tsx`
- [Instructor tools](https://github.com/rajat-wyrm/lms-system/blob/main/course-compass-main/src/pages/Portal/ManageCourse.tsx): `course-compass-main/src/pages/Portal/ManageCourse.tsx`

### Admin console

- [Admin console](https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/App.jsx): `admin/src/App.jsx`
- [Admin routes](https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/routes/AppRouter.jsx): `admin/src/routes/AppRouter.jsx`
- [Course management](https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/pages/Dashboard/Admin/Courses.jsx): `admin/src/pages/Dashboard/Admin/Courses.jsx`
- [User management](https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/pages/Dashboard/Admin/Users.jsx): `admin/src/pages/Dashboard/Admin/Users.jsx`
- [Review moderation](https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/pages/Dashboard/Admin/Reviews.jsx): `admin/src/pages/Dashboard/Admin/Reviews.jsx`
- [Notifications](https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/pages/Dashboard/Admin/Notifications.jsx): `admin/src/pages/Dashboard/Admin/Notifications.jsx`
- [Platform analytics](https://github.com/rajat-wyrm/lms-system/blob/main/admin/src/pages/Dashboard/Admin/Analytics.jsx): `admin/src/pages/Dashboard/Admin/Analytics.jsx`

### LMS backend

- [Express API](https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/app.js): `backend/src/app.js`
- [Course services](https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/controllers/courses.controller.js): `backend/src/controllers/courses.controller.js`
- [Enrollment and progress](https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/controllers/enrollment.controller.js): `backend/src/controllers/enrollment.controller.js`
- [Reviews](https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/controllers/review.controller.js): `backend/src/controllers/review.controller.js`
- [Notification service](https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/notification.service.js): `backend/src/notification.service.js`
- [Email jobs](https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/queues/email.queue.js): `backend/src/queues/email.queue.js`

### Notebook learning

- [Notebook API](https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/main.py): `AI/api/app/main.py`
- [Study endpoints](https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/api/chat.py): `AI/api/app/api/chat.py`
- [Document ingestion](https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/api/document.py): `AI/api/app/api/document.py`
- [Quizzes and assignments](https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/api/quiz.py): `AI/api/app/api/quiz.py`
- [RAG generation](https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/services/rag_service.py): `AI/api/app/services/rag_service.py`
- [Vector retrieval](https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/vectorstore/chroma_store.py): `AI/api/app/vectorstore/chroma_store.py`
- [Embedding model](https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/get_embedding_function.py): `AI/api/get_embedding_function.py`
- [Notebook database](https://github.com/rajat-wyrm/lms-system/blob/main/AI/api/app/db/session.py): `AI/api/app/db/session.py`

### Persistence and services

- [Prisma database access](https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/config/db.js): `backend/src/config/db.js`
- **PostgreSQL**
- [Redis cache](https://github.com/rajat-wyrm/lms-system/blob/main/backend/src/services/redis.service.js): `backend/src/services/redis.service.js`

### Other components

- **Learners**
- **Instructors**
- **Administrators**

## Connections

- Learners → Student portal: uses (evidence: `README.md`)
- Instructors → Student portal: uses (evidence: `README.md`)
- Student portal → Portal routes: loads (evidence: `course-compass-main/src/App.tsx`)
- Portal routes → Course learning: routes to (evidence: `README.md`)
- Portal routes → Instructor tools: routes to (evidence: `README.md`)
- Course learning → Express API: uses REST (evidence: `README.md`)
- Instructor tools → Express API: uses REST (evidence: `README.md`)
- Administrators → Admin console: uses (evidence: `README.md`)
- Admin console → Admin routes: loads (evidence: `admin/src/App.jsx`)
- Admin routes → Course management: routes to (evidence: `admin/src/routes/AppRouter.jsx`)
- Admin routes → User management: routes to (evidence: `admin/src/routes/AppRouter.jsx`)
- Admin routes → Review moderation: routes to (evidence: `admin/src/routes/AppRouter.jsx`)
- Admin routes → Notifications: routes to (evidence: `admin/src/routes/AppRouter.jsx`)
- Admin routes → Platform analytics: routes to (evidence: `admin/src/routes/AppRouter.jsx`)
- Course management → Express API: uses API (evidence: `README.md`)
- User management → Express API: uses API (evidence: `README.md`)
- Review moderation → Express API: uses API (evidence: `README.md`)
- Notifications → Express API: uses API (evidence: `README.md`)
- Platform analytics → Express API: uses API (evidence: `README.md`)
- Express API → Course services: routes requests (evidence: `backend/src/app.js`)
- Express API → Enrollment and progress: routes requests (evidence: `backend/src/app.js`)
- Express API → Reviews: routes requests
- Enrollment and progress → Prisma database access: reads and writes (evidence: `backend/src/controllers/enrollment.controller.js`)
- Reviews → Prisma database access: reads and writes (evidence: `backend/src/controllers/review.controller.js`)
- Prisma database access → PostgreSQL: connects (evidence: `backend/src/config/db.js`)
- Enrollment and progress → Redis cache: clears cache (evidence: `backend/src/controllers/enrollment.controller.js`)
- Reviews → Notification service: creates notice (evidence: `backend/src/controllers/review.controller.js`)
- Notebook API → Study endpoints: mounts routes (evidence: `AI/api/app/main.py`)
- Notebook API → Document ingestion: mounts routes (evidence: `AI/api/app/main.py`)
- Notebook API → Quizzes and assignments: mounts routes (evidence: `AI/api/app/main.py`)
- Study endpoints → RAG generation: calls (evidence: `AI/api/app/api/chat.py`)
- Document ingestion → Vector retrieval: stores documents (evidence: `AI/api/app/api/document.py`)
- Quizzes and assignments → RAG generation: calls (evidence: `AI/api/app/api/quiz.py`)
- RAG generation → Vector retrieval: retrieves context (evidence: `AI/api/app/services/rag_service.py`)
- Vector retrieval → Embedding model: embeds queries (evidence: `AI/api/app/vectorstore/chroma_store.py`)
- Notebook API → Notebook database: initializes tables (evidence: `AI/api/app/main.py`)
