# barveshakthar/ai-education-mentor architecture

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

- Interactive diagram: https://gitdiagram.com/barveshakthar/ai-education-mentor
- Repository: https://github.com/barveshakthar/ai-education-mentor

## Overview

The repository is an AI education mentor web application for student retention, combining student and faculty management, marks entry, learning materials, and academic chatbot support. The main user-to-result flow is a student submitting a question to the Flask chatbot, which processes it with an intent model and returns a response; voice queries add speech recognition and spoken output. Faculty registration/login and student profile access are distinct workflows. The source excerpts show these Flask routes and separate Node services, but do not establish how the pages invoke them or how the Node services are deployed together.

Main entry points: [`bot.py`](https://github.com/barveshakthar/ai-education-mentor/blob/master/bot.py) (Flask app routes), [`Studentlogin.js`](https://github.com/barveshakthar/ai-education-mentor/blob/master/Studentlogin.js) (Student login), [`server.js`](https://github.com/barveshakthar/ai-education-mentor/blob/master/server.js) (Student records), [`Facultyregistration.js`](https://github.com/barveshakthar/ai-education-mentor/blob/master/Facultyregistration.js) (Faculty registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web and accounts"]
  node_flask["Flask app routes<br/>[bot.py]"]
  node_student_records["Student records<br/>[server.js]"]
  node_student_login["Student login<br/>[Studentlogin.js]"]
  node_profile["Student profile"]
  node_faculty_registration["Faculty registration"]
  node_faculty_login["Faculty login<br/>[Facultylogin.js]"]
end

subgraph group_learning["Learning support"]
  node_marks["Marks entry API<br/>[mark.js]"]
  node_dashboard["Learning dashboard<br/>[dashboard.html]"]
  node_learning_page["Learning materials<br/>[learning.html]"]
  node_syllabus["Syllabus page<br/>[Syllabus.html]"]
  node_risk_page["Risk page<br/>[Risk.html]"]
  node_help_desk["Help desk page<br/>[ind.html]"]
end

subgraph group_mentor["AI mentor"]
  node_chat_api["Chat response route<br/>[bot.py]"]
  node_nlp["Intent processing<br/>[bot.py]"]
  node_intent_data["Chat intents<br/>[bot.json]"]
  node_model["Chatbot model<br/>[chatbot_model1.h5]"]
  node_speech["Speech input/output<br/>[bot.py]"]
end

subgraph group_data["Application data"]
  node_mongo[("MongoDB")]
end

node_student(("Student"))
node_faculty(("Faculty"))
node_voice_service["Google speech recognition"]

node_student -->|"submits credentials"| node_student_login
node_student_login -->|"looks up record"| node_mongo
node_student_login -->|"renders profile"| node_profile
node_student -.->|"submits details"| node_student_records
node_student_records -->|"saves record"| node_mongo
node_faculty -->|"registers"| node_faculty_registration
node_faculty_registration -->|"stores account"| node_mongo
node_faculty -->|"submits credentials"| node_faculty_login
node_faculty_login -->|"checks account"| node_mongo
node_faculty -.->|"enters marks"| node_marks
node_marks -->|"saves marks"| node_mongo
node_faculty -.->|"shares materials"| node_dashboard
node_flask -->|"serves page"| node_dashboard
node_flask -->|"serves page"| node_syllabus
node_flask -->|"serves page"| node_help_desk
node_student -.->|"asks question"| node_chat_api
node_chat_api -->|"processes input"| node_nlp
node_nlp -->|"loads intents"| node_intent_data
node_nlp -->|"predicts intent"| node_model
node_student -.->|"speaks query"| node_speech
node_speech -->|"recognizes speech"| node_voice_service
node_chat_api -->|"uses voice mode"| node_speech

click node_flask "https://github.com/barveshakthar/ai-education-mentor/blob/master/bot.py"
click node_student_records "https://github.com/barveshakthar/ai-education-mentor/blob/master/server.js"
click node_student_login "https://github.com/barveshakthar/ai-education-mentor/blob/master/Studentlogin.js"
click node_profile "https://github.com/barveshakthar/ai-education-mentor/blob/master/templates/student_profile.html"
click node_faculty_registration "https://github.com/barveshakthar/ai-education-mentor/blob/master/Facultyregistration.js"
click node_faculty_login "https://github.com/barveshakthar/ai-education-mentor/blob/master/Facultylogin.js"
click node_marks "https://github.com/barveshakthar/ai-education-mentor/blob/master/mark.js"
click node_dashboard "https://github.com/barveshakthar/ai-education-mentor/blob/master/dashboard.html"
click node_learning_page "https://github.com/barveshakthar/ai-education-mentor/blob/master/learning.html"
click node_syllabus "https://github.com/barveshakthar/ai-education-mentor/blob/master/Syllabus.html"
click node_risk_page "https://github.com/barveshakthar/ai-education-mentor/blob/master/Risk.html"
click node_help_desk "https://github.com/barveshakthar/ai-education-mentor/blob/master/templates/ind.html"
click node_chat_api "https://github.com/barveshakthar/ai-education-mentor/blob/master/bot.py"
click node_nlp "https://github.com/barveshakthar/ai-education-mentor/blob/master/bot.py"
click node_intent_data "https://github.com/barveshakthar/ai-education-mentor/blob/master/bot.json"
click node_model "https://github.com/barveshakthar/ai-education-mentor/blob/master/chatbot_model1.h5"
click node_speech "https://github.com/barveshakthar/ai-education-mentor/blob/master/bot.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_flask,node_student_records,node_student_login,node_profile,node_faculty_registration,node_faculty_login toneBlue
class node_marks,node_dashboard,node_learning_page,node_syllabus,node_risk_page,node_help_desk toneAmber
class node_chat_api,node_nlp,node_intent_data,node_model,node_speech toneMint
class node_mongo toneRose
class node_student,node_faculty,node_voice_service toneIndigo
```

## Components

### Web and accounts

- [Flask app routes](https://github.com/barveshakthar/ai-education-mentor/blob/master/bot.py): `bot.py`
- [Student records](https://github.com/barveshakthar/ai-education-mentor/blob/master/server.js): `server.js`
- [Student login](https://github.com/barveshakthar/ai-education-mentor/blob/master/Studentlogin.js): `Studentlogin.js`
- [Student profile](https://github.com/barveshakthar/ai-education-mentor/blob/master/templates/student_profile.html): `templates/student_profile.html`
- [Faculty registration](https://github.com/barveshakthar/ai-education-mentor/blob/master/Facultyregistration.js): `Facultyregistration.js`
- [Faculty login](https://github.com/barveshakthar/ai-education-mentor/blob/master/Facultylogin.js): `Facultylogin.js`

### Learning support

- [Marks entry API](https://github.com/barveshakthar/ai-education-mentor/blob/master/mark.js): `mark.js`
- [Learning dashboard](https://github.com/barveshakthar/ai-education-mentor/blob/master/dashboard.html): `dashboard.html`
- [Learning materials](https://github.com/barveshakthar/ai-education-mentor/blob/master/learning.html): `learning.html`
- [Syllabus page](https://github.com/barveshakthar/ai-education-mentor/blob/master/Syllabus.html): `Syllabus.html`
- [Risk page](https://github.com/barveshakthar/ai-education-mentor/blob/master/Risk.html): `Risk.html`
- [Help desk page](https://github.com/barveshakthar/ai-education-mentor/blob/master/templates/ind.html): `templates/ind.html`

### AI mentor

- [Chat response route](https://github.com/barveshakthar/ai-education-mentor/blob/master/bot.py): `bot.py`
- [Intent processing](https://github.com/barveshakthar/ai-education-mentor/blob/master/bot.py): `bot.py`
- [Chat intents](https://github.com/barveshakthar/ai-education-mentor/blob/master/bot.json): `bot.json`
- [Chatbot model](https://github.com/barveshakthar/ai-education-mentor/blob/master/chatbot_model1.h5): `chatbot_model1.h5`
- [Speech input/output](https://github.com/barveshakthar/ai-education-mentor/blob/master/bot.py): `bot.py`

### Application data

- **MongoDB**

### Other components

- **Student**
- **Faculty**
- **Google speech recognition**

## Connections

- Student → Student login: submits credentials (evidence: `Studentlogin.js`)
- Student login → MongoDB: looks up record (evidence: `Studentlogin.js`)
- Student login → Student profile: renders profile (evidence: `Studentlogin.js`)
- Student → Student records: submits details
- Student records → MongoDB: saves record (evidence: `server.js`)
- Faculty → Faculty registration: registers (evidence: `Facultyregistration.js`)
- Faculty registration → MongoDB: stores account (evidence: `Facultyregistration.js`)
- Faculty → Faculty login: submits credentials (evidence: `Facultylogin.js`)
- Faculty login → MongoDB: checks account (evidence: `Facultylogin.js`)
- Faculty → Marks entry API: enters marks (evidence: `README.md`)
- Marks entry API → MongoDB: saves marks (evidence: `mark.js`)
- Faculty → Learning dashboard: shares materials (evidence: `README.md`)
- Flask app routes → Learning dashboard: serves page (evidence: `bot.py`)
- Flask app routes → Syllabus page: serves page (evidence: `bot.py`)
- Flask app routes → Help desk page: serves page (evidence: `bot.py`)
- Student → Chat response route: asks question
- Chat response route → Intent processing: processes input (evidence: `bot.py`)
- Intent processing → Chat intents: loads intents (evidence: `bot.py`)
- Intent processing → Chatbot model: predicts intent (evidence: `bot.py`)
- Student → Speech input/output: speaks query
- Speech input/output → Google speech recognition: recognizes speech (evidence: `bot.py`)
- Chat response route → Speech input/output: uses voice mode (evidence: `bot.py`)
