# abellaa8795/crammbling_enhanced_lms_genai architecture

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

- Interactive diagram: https://gitdiagram.com/abellaa8795/crammbling_enhanced_lms_genai
- Repository: https://github.com/abellaa8795/crammbling_enhanced_lms_genai

## Overview

Crammbling is a learning and collaboration app: users sign in, reach a dashboard, and move among chat, quizzes, classroom, group collaboration, and personalized study tools. The backend provides authentication and distinct chat, social, notification, and personalization services. The excerpts show frontend routing, chat UI/API usage, backend route mounting, and parts of the chat and social workflows. Other route-to-controller and frontend-to-backend links are not shown, so they are omitted; some listed capabilities have unsampled implementation details.

Main entry points: [`client/my-react-app/src/App.jsx`](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/App.jsx) (Route shell), [`server/src/controllers/Chatbot_services/chat.controller.js`](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/controllers/Chatbot_services/chat.controller.js) (Chat workflow), [`server/src/app.js`](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/app.js) (API application), [`server/src/controllers/Social_services/social.controller.js`](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/controllers/Social_services/social.controller.js) (Social handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Learning app"]
  node_app["Route shell<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_chatui["Chat workspace<br/>[chatbot.jsx]"]
  node_chatapi["Chat API client<br/>[chat.js]"]
  node_quiz["Quiz arena<br/>[QuizArena.jsx]"]
  node_classroom["Classroom<br/>[classroom.jsx]"]
  node_groupsui["Group collaboration<br/>[group_collab.jsx]"]
  node_personalized["Personalized study<br/>[personalized.jsx]"]
  node_profile["Profile hub<br/>[ProfileHub.jsx]"]
  node_settings["Shared settings<br/>[Settings.jsx]"]
end

subgraph group_identity["Identity"]
  node_serverapp["API application<br/>[app.js]"]
  node_authroutes["Auth routes"]
  node_authcontrollers["Auth handlers"]
end

subgraph group_chat["Chat service"]
  node_chatroutes["Chat routes"]
  node_chatcontroller["Chat workflow<br/>[chat.controller.js]"]
  node_chatmodel["Chat records<br/>[chat.model.js]"]
  node_promptmodel["Prompt records<br/>[prompt.model.js]"]
  node_summarizer["Context summarizer"]
  node_queue["Request queue<br/>[queue.service.js]"]
  node_ollama["LLM adapter<br/>[ollama.service.js]"]
end

subgraph group_community["Community"]
  node_communityroutes["Social routes"]
  node_socialcontroller["Social handlers"]
  node_socialmodel["Social records<br/>[social.model.js]"]
  node_socialcache["Social cache"]
  node_notification["Notifications"]
end

subgraph group_study["Study planning"]
  node_personalroutes["Personalization routes"]
  node_personalcontrollers["Study handlers"]
  node_personalmodel["Study data"]
  node_calendar["Calendar sync"]
end

node_learner(("Learner"))
node_llm["Ollama service"]
node_database[("Postgres pool<br/>[database.js]")]

node_learner -->|"opens"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_chatui
node_app -->|"routes to"| node_quiz
node_app -->|"routes to"| node_classroom
node_app -->|"routes to"| node_groupsui
node_app -->|"routes to"| node_personalized
node_app -->|"routes to"| node_profile
node_dashboard -->|"renders"| node_quiz
node_dashboard -->|"renders"| node_settings
node_chatui -->|"loads chats"| node_chatapi
node_personalized -->|"renders"| node_settings
node_groupsui -->|"renders"| node_settings
node_serverapp -->|"mounts"| node_authroutes
node_serverapp -->|"mounts"| node_chatroutes
node_serverapp -->|"mounts"| node_communityroutes
node_serverapp -->|"mounts"| node_personalroutes
node_chatcontroller -->|"reads and writes"| node_chatmodel
node_chatcontroller -->|"gets prompt"| node_promptmodel
node_chatcontroller -->|"bounds context"| node_summarizer
node_chatcontroller -->|"checks position"| node_queue
node_chatcontroller -->|"gets cached prompt"| node_ollama
node_ollama -->|"streams request"| node_llm
node_socialcontroller -->|"reads and invalidates"| node_socialcache
node_socialcontroller -->|"loads profile"| node_socialmodel
node_socialcontroller -->|"pushes event"| node_notification
node_personalcontrollers -->|"uses study data"| node_personalmodel
node_personalcontrollers -->|"syncs events"| node_calendar
node_chatmodel -->|"uses pool"| node_database
node_promptmodel -->|"uses pool"| node_database
node_personalmodel -->|"uses pool"| node_database

click node_app "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/App.jsx"
click node_dashboard "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/Dashboard.jsx"
click node_chatui "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/chatbot.jsx"
click node_chatapi "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/api/chat.js"
click node_quiz "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/QuizArena.jsx"
click node_classroom "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/classroom.jsx"
click node_groupsui "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/group_collab.jsx"
click node_personalized "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/personalized.jsx"
click node_profile "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/ProfileHub.jsx"
click node_settings "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/components/Settings.jsx"
click node_serverapp "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/app.js"
click node_authroutes "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/tree/main/server/src/routes/Authentication"
click node_authcontrollers "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/tree/main/server/src/controllers/Authentication"
click node_chatroutes "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/tree/main/server/src/routes/Chatbot_services"
click node_chatcontroller "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/controllers/Chatbot_services/chat.controller.js"
click node_chatmodel "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/models/Chatbot_services/chat.model.js"
click node_promptmodel "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/models/Chatbot_services/prompt.model.js"
click node_summarizer "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/services/Chatbot_services/summarization.service.js"
click node_queue "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/services/Chatbot_services/queue.service.js"
click node_ollama "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/services/Chatbot_services/ollama.service.js"
click node_communityroutes "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/tree/main/server/src/routes/Social_services"
click node_socialcontroller "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/controllers/Social_services/social.controller.js"
click node_socialmodel "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/models/Social_services/social.model.js"
click node_socialcache "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/services/Social_services/socialCache.service.js"
click node_notification "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/services/Notification_services/notificationEvents.service.js"
click node_personalroutes "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/tree/main/server/src/routes/Personalization_services"
click node_personalcontrollers "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/tree/main/server/src/controllers/Personalization_services"
click node_personalmodel "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/models/Personalization_services/personalization.model.js"
click node_calendar "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/services/Personalization_services/googleCalendarSync.service.js"
click node_database "https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/config/database.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_app,node_dashboard,node_chatui,node_chatapi,node_quiz,node_classroom,node_groupsui,node_personalized,node_profile,node_settings toneBlue
class node_serverapp,node_authroutes,node_authcontrollers,node_database toneAmber
class node_chatroutes,node_chatcontroller,node_chatmodel,node_promptmodel,node_summarizer,node_queue,node_ollama toneMint
class node_communityroutes,node_socialcontroller,node_socialmodel,node_socialcache,node_notification toneRose
class node_personalroutes,node_personalcontrollers,node_personalmodel,node_calendar,node_learner,node_llm toneIndigo
```

## Components

### Learning app

- [Route shell](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/App.jsx): `client/my-react-app/src/App.jsx`
- [Dashboard](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/Dashboard.jsx): `client/my-react-app/src/pages/Dashboard.jsx`
- [Chat workspace](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/chatbot.jsx): `client/my-react-app/src/pages/chatbot.jsx`
- [Chat API client](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/api/chat.js): `client/my-react-app/src/api/chat.js`
- [Quiz arena](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/QuizArena.jsx): `client/my-react-app/src/pages/QuizArena.jsx`
- [Classroom](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/classroom.jsx): `client/my-react-app/src/pages/classroom.jsx`
- [Group collaboration](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/group_collab.jsx): `client/my-react-app/src/pages/group_collab.jsx`
- [Personalized study](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/personalized.jsx): `client/my-react-app/src/pages/personalized.jsx`
- [Profile hub](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/pages/ProfileHub.jsx): `client/my-react-app/src/pages/ProfileHub.jsx`
- [Shared settings](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/client/my-react-app/src/components/Settings.jsx): `client/my-react-app/src/components/Settings.jsx`

### Identity

- [API application](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/app.js): `server/src/app.js`
- [Auth routes](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/tree/main/server/src/routes/Authentication): `server/src/routes/Authentication`
- [Auth handlers](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/tree/main/server/src/controllers/Authentication): `server/src/controllers/Authentication`

### Chat service

- [Chat routes](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/tree/main/server/src/routes/Chatbot_services): `server/src/routes/Chatbot_services`
- [Chat workflow](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/controllers/Chatbot_services/chat.controller.js): `server/src/controllers/Chatbot_services/chat.controller.js`
- [Chat records](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/models/Chatbot_services/chat.model.js): `server/src/models/Chatbot_services/chat.model.js`
- [Prompt records](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/models/Chatbot_services/prompt.model.js): `server/src/models/Chatbot_services/prompt.model.js`
- [Context summarizer](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/services/Chatbot_services/summarization.service.js): `server/src/services/Chatbot_services/summarization.service.js`
- [Request queue](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/services/Chatbot_services/queue.service.js): `server/src/services/Chatbot_services/queue.service.js`
- [LLM adapter](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/services/Chatbot_services/ollama.service.js): `server/src/services/Chatbot_services/ollama.service.js`

### Community

- [Social routes](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/tree/main/server/src/routes/Social_services): `server/src/routes/Social_services`
- [Social handlers](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/controllers/Social_services/social.controller.js): `server/src/controllers/Social_services/social.controller.js`
- [Social records](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/models/Social_services/social.model.js): `server/src/models/Social_services/social.model.js`
- [Social cache](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/services/Social_services/socialCache.service.js): `server/src/services/Social_services/socialCache.service.js`
- [Notifications](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/services/Notification_services/notificationEvents.service.js): `server/src/services/Notification_services/notificationEvents.service.js`

### Study planning

- [Personalization routes](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/tree/main/server/src/routes/Personalization_services): `server/src/routes/Personalization_services`
- [Study handlers](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/tree/main/server/src/controllers/Personalization_services): `server/src/controllers/Personalization_services`
- [Study data](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/models/Personalization_services/personalization.model.js): `server/src/models/Personalization_services/personalization.model.js`
- [Calendar sync](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/services/Personalization_services/googleCalendarSync.service.js): `server/src/services/Personalization_services/googleCalendarSync.service.js`

### Other components

- **Learner**
- **Ollama service**
- [Postgres pool](https://github.com/abellaa8795/crammbling_enhanced_lms_genai/blob/main/server/src/config/database.js): `server/src/config/database.js`

## Connections

- Learner → Route shell: opens (evidence: `client/my-react-app/src/App.jsx`)
- Route shell → Dashboard: routes to (evidence: `client/my-react-app/src/App.jsx`)
- Route shell → Chat workspace: routes to (evidence: `client/my-react-app/src/App.jsx`)
- Route shell → Quiz arena: routes to (evidence: `client/my-react-app/src/App.jsx`)
- Route shell → Classroom: routes to (evidence: `client/my-react-app/src/App.jsx`)
- Route shell → Group collaboration: routes to (evidence: `client/my-react-app/src/App.jsx`)
- Route shell → Personalized study: routes to (evidence: `client/my-react-app/src/App.jsx`)
- Route shell → Profile hub: routes to (evidence: `client/my-react-app/src/App.jsx`)
- Dashboard → Quiz arena: renders (evidence: `client/my-react-app/src/pages/Dashboard.jsx`)
- Dashboard → Shared settings: renders (evidence: `client/my-react-app/src/pages/Dashboard.jsx`)
- Chat workspace → Chat API client: loads chats (evidence: `client/my-react-app/src/pages/chatbot.jsx`)
- Personalized study → Shared settings: renders (evidence: `client/my-react-app/src/pages/personalized.jsx`)
- Group collaboration → Shared settings: renders (evidence: `client/my-react-app/src/pages/group_collab.jsx`)
- API application → Auth routes: mounts (evidence: `server/src/app.js`)
- API application → Chat routes: mounts (evidence: `server/src/app.js`)
- API application → Social routes: mounts (evidence: `server/src/app.js`)
- API application → Personalization routes: mounts (evidence: `server/src/app.js`)
- Chat workflow → Chat records: reads and writes (evidence: `server/src/controllers/Chatbot_services/chat.controller.js`)
- Chat workflow → Prompt records: gets prompt (evidence: `server/src/controllers/Chatbot_services/chat.controller.js`)
- Chat workflow → Context summarizer: bounds context (evidence: `server/src/controllers/Chatbot_services/chat.controller.js`)
- Chat workflow → Request queue: checks position (evidence: `server/src/controllers/Chatbot_services/chat.controller.js`)
- Chat workflow → LLM adapter: gets cached prompt (evidence: `server/src/controllers/Chatbot_services/chat.controller.js`)
- LLM adapter → Ollama service: streams request (evidence: `server/src/services/Chatbot_services/ollama.service.js`)
- Social handlers → Social cache: reads and invalidates (evidence: `server/src/controllers/Social_services/social.controller.js`)
- Social handlers → Social records: loads profile (evidence: `server/src/controllers/Social_services/social.controller.js`)
- Social handlers → Notifications: pushes event (evidence: `server/src/controllers/Social_services/social.controller.js`)
- Study handlers → Study data: uses study data (evidence: `server/src/controllers/Personalization_services/studyEvent.controller.js`)
- Study handlers → Calendar sync: syncs events (evidence: `server/src/controllers/Personalization_services/studyEvent.controller.js`)
- Chat records → Postgres pool: uses pool
- Prompt records → Postgres pool: uses pool (evidence: `server/src/models/Chatbot_services/prompt.model.js`)
- Study data → Postgres pool: uses pool (evidence: `server/src/models/Personalization_services/personalization.model.js`)
