# kanishkkar2817/eduplus-ai architecture

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

- Interactive diagram: https://gitdiagram.com/kanishkkar2817/eduplus-ai
- Repository: https://github.com/kanishkkar2817/eduplus-ai

## Overview

EduPulse AI is a faculty-and-student early-intervention application. The main workflow is faculty sign-in, cohort and student risk review, concept-level investigation, targeted intervention assignment, student follow-up evidence, and faculty review; students also use learning materials and an AI assistant. The graph includes the documented knowledge-graph, explainability, assessment, and audit capabilities. Relationships for unsampled routes are shown only where the README or source index supports them; those details are not treated as inspected implementation.

Main entry points: [`frontend/src/api.ts`](https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/api.ts) (API client), [`backend/app/main.py`](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/main.py) (FastAPI application), [`frontend/src/App.tsx`](https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/App.tsx) (Web app routes), [`backend/app/api/risk_engine.py`](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/risk_engine.py) (Risk explainability API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["Web app routes<br/>[App.tsx]"]
  node_authui["Session context<br/>[AuthContext.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_faculty_view["Cohort dashboard"]
  node_profile["Student profile"]
  node_student_view["Student hub"]
  node_intervention_view["Intervention workflow"]
  node_graph_view["Knowledge graph view"]
  node_risk_explain["Risk explanations"]
end

subgraph group_api["Academic API"]
  node_api_entry["FastAPI application<br/>[main.py]"]
  node_student_routes["Student records<br/>[students.py]"]
  node_risk_routes["Risk explainability API<br/>[risk_engine.py]"]
  node_graph_routes["Knowledge graph API<br/>[knowledge_graph.py]"]
  node_intervention_routes["Intervention API<br/>[interventions.py]"]
  node_assessment_routes["Assessment API<br/>[assessments.py]"]
end

subgraph group_analysis["Risk and intervention"]
  node_risk_calc["Risk scoring<br/>[risk_scorer.py]"]
  node_graph_service["Graph assembly<br/>[graph_service.py]"]
  node_audit["Audit logging<br/>[audit_service.py]"]
end

subgraph group_foundation["Data and security"]
  node_database[("SQLite database<br/>[database.py]")]
  node_models["Academic records<br/>[models.py]"]
  node_security["JWT and RBAC<br/>[security.py]"]
end

subgraph group_learning["Learning support"]
  node_ai_service["AI assistant engine<br/>[ai_service.py]"]
  node_materials["Study materials<br/>[study_materials.py]"]
end

node_faculty(("Faculty"))
node_student(("Student"))

node_faculty -->|"uses"| node_webapp
node_student -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_faculty_view
node_webapp -->|"routes to"| node_student_view
node_webapp -->|"routes to"| node_profile
node_webapp -->|"routes to"| node_intervention_view
node_faculty_view -->|"requests data"| node_api_client
node_profile -->|"requests records"| node_api_client
node_student_view -->|"requests data"| node_api_client
node_intervention_view -->|"manages tasks"| node_api_client
node_risk_explain -->|"requests evidence"| node_api_client
node_api_client -->|"requests records"| node_student_routes
node_api_client -->|"requests graph"| node_graph_routes
node_api_client -->|"requests tasks"| node_intervention_routes
node_webapp -->|"displays graph"| node_graph_view
node_api_entry -->|"registers"| node_student_routes
node_api_entry -->|"registers"| node_risk_routes
node_api_entry -->|"registers"| node_graph_routes
node_api_entry -->|"registers"| node_intervention_routes
node_api_entry -->|"registers"| node_assessment_routes
node_risk_routes -->|"calculates scores"| node_risk_calc
node_student_routes -->|"calculates scores"| node_risk_calc
node_graph_routes -->|"builds graph"| node_graph_service
node_risk_routes -->|"queries snapshots"| node_database
node_risk_calc -->|"reads academic records"| node_models
node_graph_service -->|"reads relationships"| node_models
node_audit -->|"creates audit log"| node_models
node_models -->|"uses ORM base"| node_database
node_api_entry -.->|"protects routes"| node_security
node_api_entry -->|"registers"| node_materials
node_ai_service -.->|"uses academic context"| node_database
node_student -->|"studies from"| node_materials
node_faculty -->|"reviews model"| node_risk_routes
node_faculty -->|"explores concepts"| node_graph_view
node_student -->|"completes follow-up"| node_intervention_view

click node_webapp "https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/App.tsx"
click node_authui "https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/context/AuthContext.tsx"
click node_api_client "https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/api.ts"
click node_faculty_view "https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/pages/TeacherDashboard.tsx"
click node_profile "https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/pages/StudentProfilePage.tsx"
click node_student_view "https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/pages/StudentDashboard.tsx"
click node_intervention_view "https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/pages/InterventionsPage.tsx"
click node_graph_view "https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/components/KnowledgeGraphView.tsx"
click node_risk_explain "https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/components/WhyFlaggedModal.tsx"
click node_api_entry "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/main.py"
click node_student_routes "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/students.py"
click node_risk_routes "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/risk_engine.py"
click node_graph_routes "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/knowledge_graph.py"
click node_intervention_routes "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/interventions.py"
click node_assessment_routes "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/assessments.py"
click node_risk_calc "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/services/risk_scorer.py"
click node_graph_service "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/services/graph_service.py"
click node_audit "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/services/audit_service.py"
click node_ai_service "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/services/ai_service.py"
click node_materials "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/study_materials.py"
click node_database "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/core/database.py"
click node_models "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/models/models.py"
click node_security "https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/core/security.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_webapp,node_authui,node_api_client,node_faculty_view,node_profile,node_student_view,node_intervention_view,node_graph_view,node_risk_explain toneBlue
class node_api_entry,node_student_routes,node_risk_routes,node_graph_routes,node_intervention_routes,node_assessment_routes toneAmber
class node_risk_calc,node_graph_service,node_audit toneMint
class node_database,node_models,node_security toneRose
class node_ai_service,node_materials,node_faculty,node_student toneIndigo
```

## Components

### Web experience

- [Web app routes](https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Session context](https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [API client](https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/api.ts): `frontend/src/api.ts`
- [Cohort dashboard](https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/pages/TeacherDashboard.tsx): `frontend/src/pages/TeacherDashboard.tsx`
- [Student profile](https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/pages/StudentProfilePage.tsx): `frontend/src/pages/StudentProfilePage.tsx`
- [Student hub](https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/pages/StudentDashboard.tsx): `frontend/src/pages/StudentDashboard.tsx`
- [Intervention workflow](https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/pages/InterventionsPage.tsx): `frontend/src/pages/InterventionsPage.tsx`
- [Knowledge graph view](https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/components/KnowledgeGraphView.tsx): `frontend/src/components/KnowledgeGraphView.tsx`
- [Risk explanations](https://github.com/kanishkkar2817/eduplus-ai/blob/main/frontend/src/components/WhyFlaggedModal.tsx): `frontend/src/components/WhyFlaggedModal.tsx`

### Academic API

- [FastAPI application](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/main.py): `backend/app/main.py`
- [Student records](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/students.py): `backend/app/api/students.py`
- [Risk explainability API](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/risk_engine.py): `backend/app/api/risk_engine.py`
- [Knowledge graph API](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/knowledge_graph.py): `backend/app/api/knowledge_graph.py`
- [Intervention API](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/interventions.py): `backend/app/api/interventions.py`
- [Assessment API](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/assessments.py): `backend/app/api/assessments.py`

### Risk and intervention

- [Risk scoring](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/services/risk_scorer.py): `backend/app/services/risk_scorer.py`
- [Graph assembly](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/services/graph_service.py): `backend/app/services/graph_service.py`
- [Audit logging](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/services/audit_service.py): `backend/app/services/audit_service.py`

### Data and security

- [SQLite database](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/core/database.py): `backend/app/core/database.py`
- [Academic records](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/models/models.py): `backend/app/models/models.py`
- [JWT and RBAC](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/core/security.py): `backend/app/core/security.py`

### Learning support

- [AI assistant engine](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/services/ai_service.py): `backend/app/services/ai_service.py`
- [Study materials](https://github.com/kanishkkar2817/eduplus-ai/blob/main/backend/app/api/study_materials.py): `backend/app/api/study_materials.py`

### Other components

- **Faculty**
- **Student**

## Connections

- Faculty → Web app routes: uses (evidence: `README.md`)
- Student → Web app routes: uses (evidence: `README.md`)
- Web app routes → Cohort dashboard: routes to (evidence: `frontend/src/App.tsx`)
- Web app routes → Student hub: routes to (evidence: `frontend/src/App.tsx`)
- Web app routes → Student profile: routes to (evidence: `frontend/src/App.tsx`)
- Web app routes → Intervention workflow: routes to (evidence: `frontend/src/App.tsx`)
- Cohort dashboard → API client: requests data (evidence: `frontend/src/pages/TeacherDashboard.tsx`)
- Student profile → API client: requests records (evidence: `frontend/src/pages/StudentProfilePage.tsx`)
- Student hub → API client: requests data (evidence: `frontend/src/pages/StudentDashboard.tsx`)
- Intervention workflow → API client: manages tasks (evidence: `frontend/src/pages/InterventionsPage.tsx`)
- Risk explanations → API client: requests evidence (evidence: `frontend/src/components/WhyFlaggedModal.tsx`)
- API client → Student records: requests records (evidence: `frontend/src/api.ts`)
- API client → Knowledge graph API: requests graph (evidence: `frontend/src/api.ts`)
- API client → Intervention API: requests tasks (evidence: `frontend/src/api.ts`)
- Web app routes → Knowledge graph view: displays graph (evidence: `frontend/src/App.tsx`)
- FastAPI application → Student records: registers (evidence: `backend/app/main.py`)
- FastAPI application → Risk explainability API: registers (evidence: `backend/app/main.py`)
- FastAPI application → Knowledge graph API: registers (evidence: `backend/app/main.py`)
- FastAPI application → Intervention API: registers (evidence: `backend/app/main.py`)
- FastAPI application → Assessment API: registers (evidence: `backend/app/main.py`)
- Risk explainability API → Risk scoring: calculates scores (evidence: `backend/app/api/risk_engine.py`)
- Student records → Risk scoring: calculates scores (evidence: `backend/app/api/students.py`)
- Knowledge graph API → Graph assembly: builds graph
- Risk explainability API → SQLite database: queries snapshots (evidence: `backend/app/api/risk_engine.py`)
- Risk scoring → Academic records: reads academic records (evidence: `backend/app/services/risk_scorer.py`)
- Graph assembly → Academic records: reads relationships (evidence: `backend/app/services/graph_service.py`)
- Audit logging → Academic records: creates audit log (evidence: `backend/app/services/audit_service.py`)
- Academic records → SQLite database: uses ORM base (evidence: `backend/app/models/models.py`)
- FastAPI application → JWT and RBAC: protects routes (evidence: `backend/app/main.py`)
- FastAPI application → Study materials: registers (evidence: `backend/app/main.py`)
- AI assistant engine → SQLite database: uses academic context
- Student → Study materials: studies from (evidence: `README.md`)
- Faculty → Risk explainability API: reviews model (evidence: `README.md`)
- Faculty → Knowledge graph view: explores concepts (evidence: `README.md`)
- Student → Intervention workflow: completes follow-up (evidence: `README.md`)
