# shreya661/edubridge-ai-human-like-school-assistant architecture

> Architecture diagram of the GitHub repository shreya661/edubridge-ai-human-like-school-assistant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shreya661/edubridge-ai-human-like-school-assistant
- Repository: https://github.com/shreya661/edubridge-ai-human-like-school-assistant

## Overview

XYZ AI is a role-aware school assistant. Users sign in, then submit chat or voice requests; the backend interprets requests, checks permissions and resource ownership, dispatches permitted operations, and returns persona- and language-aware responses. Its other major product branches include tutoring and quizzes, staff escalation, school calendar and analytics, voice/avatar interaction, and role guidance. The README documents the core request flow; sampled source confirms session and NLU behavior, but most router-to-service wiring is not shown, so uncertain links are omitted.

Main entry points: [`backend/app/main.py`](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/main.py) (FastAPI application), [`backend/static/app.js`](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/static/app.js) (Web interface), [`backend/app/nlu/service.py`](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/nlu/service.py) (Request interpretation), [`backend/app/routing/dispatcher.py`](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/routing/dispatcher.py) (Tool dispatcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_ui["Web interface<br/>[app.js]"]
  node_app["FastAPI application<br/>[main.py]"]
end

subgraph group_conversation["Conversation workflow"]
  node_nlu["Request interpretation<br/>[service.py]"]
  node_llm["LLM client<br/>[llm_client.py]"]
  node_conversation_mgr[("Conversation context<br/>[manager.py]")]
  node_dispatcher["Tool dispatcher<br/>[dispatcher.py]"]
end

subgraph group_trust["Identity and access"]
  node_auth["Authentication<br/>[router.py]"]
  node_sessions[("Session store<br/>[session_manager.py]")]
  node_identity["Session identity<br/>[dependencies.py]"]
  node_authz["Authorization gate<br/>[engine.py]"]
  node_ownership["Ownership rules<br/>[ownership.py]"]
  node_guides["Role guidance"]
end

subgraph group_school["School services"]
  node_attendance["Attendance service<br/>[service.py]"]
  node_domain[("School domain data<br/>[repositories.py]")]
  node_analytics["Attendance analytics<br/>[router.py]"]
  node_escalation["Staff escalation<br/>[escalation.py]"]
  node_calendar["Calendar and timetables<br/>[router.py]"]
end

subgraph group_interaction["Learning and media"]
  node_chatbot["Tutor and quizzes<br/>[service.py]"]
  node_livechat["Teacher live chat<br/>[live_chat.py]"]
  node_i18n["Language support<br/>[language_router.py]"]
  node_voice["Speech services<br/>[router.py]"]
  node_avatar["Avatar and lip-sync<br/>[provider.py]"]
end

node_user(("School user"))
node_provider["LLM provider"]

node_user -->|"submits request"| node_ui
node_ui -->|"calls API"| node_app
node_app -->|"routes login"| node_auth
node_auth -->|"creates session"| node_sessions
node_app -->|"checks identity"| node_identity
node_identity -->|"reads session"| node_sessions
node_app -->|"routes request"| node_nlu
node_nlu -->|"loads context"| node_conversation_mgr
node_nlu -->|"interprets message"| node_llm
node_llm -.->|"requests completion"| node_provider
node_nlu -->|"checks request"| node_authz
node_authz -->|"validates scope"| node_ownership
node_nlu -->|"dispatches allowed intent"| node_dispatcher
node_dispatcher -->|"invokes tool"| node_attendance
node_dispatcher -->|"invokes tool"| node_analytics
node_dispatcher -->|"invokes tool"| node_escalation
node_attendance -->|"reads school data"| node_domain
node_analytics -->|"reads school data"| node_domain
node_app -->|"routes calendar requests"| node_calendar
node_app -->|"routes guidance requests"| node_guides
node_app -->|"routes tutor requests"| node_chatbot
node_chatbot -->|"offers staff chat"| node_livechat
node_app -->|"routes speech requests"| node_voice
node_app -->|"routes avatar requests"| node_avatar
node_ui -->|"sends audio requests"| node_voice
node_ui -->|"requests avatar"| node_avatar
node_ui -->|"requests language support"| node_i18n

click node_ui "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/static/app.js"
click node_app "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/main.py"
click node_auth "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/auth/router.py"
click node_sessions "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/session/session_manager.py"
click node_identity "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/session/dependencies.py"
click node_nlu "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/nlu/service.py"
click node_llm "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/nlu/llm_client.py"
click node_conversation_mgr "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/conversation/manager.py"
click node_authz "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/authz/engine.py"
click node_ownership "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/authz/ownership.py"
click node_dispatcher "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/routing/dispatcher.py"
click node_attendance "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/attendance/service.py"
click node_domain "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/domain/repositories.py"
click node_analytics "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/analytics/router.py"
click node_escalation "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/mock_api/escalation.py"
click node_calendar "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/calendar/router.py"
click node_guides "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/domain/role_guides_router.py"
click node_chatbot "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/chatbot/service.py"
click node_livechat "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/chatbot/live_chat.py"
click node_i18n "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/i18n/language_router.py"
click node_voice "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/voice/router.py"
click node_avatar "https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/avatar/provider.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_ui,node_app,node_user toneBlue
class node_nlu,node_llm,node_conversation_mgr,node_dispatcher toneAmber
class node_auth,node_sessions,node_identity,node_authz,node_ownership,node_guides toneMint
class node_attendance,node_domain,node_analytics,node_escalation,node_calendar toneRose
class node_chatbot,node_livechat,node_i18n,node_voice,node_avatar,node_provider toneIndigo
```

## Components

### User experience

- [Web interface](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/static/app.js): `backend/static/app.js`
- [FastAPI application](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/main.py): `backend/app/main.py`

### Conversation workflow

- [Request interpretation](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/nlu/service.py): `backend/app/nlu/service.py`
- [LLM client](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/nlu/llm_client.py): `backend/app/nlu/llm_client.py`
- [Conversation context](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/conversation/manager.py): `backend/app/conversation/manager.py`
- [Tool dispatcher](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/routing/dispatcher.py): `backend/app/routing/dispatcher.py`

### Identity and access

- [Authentication](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/auth/router.py): `backend/app/auth/router.py`
- [Session store](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/session/session_manager.py): `backend/app/session/session_manager.py`
- [Session identity](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/session/dependencies.py): `backend/app/session/dependencies.py`
- [Authorization gate](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/authz/engine.py): `backend/app/authz/engine.py`
- [Ownership rules](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/authz/ownership.py): `backend/app/authz/ownership.py`
- [Role guidance](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/domain/role_guides_router.py): `backend/app/domain/role_guides_router.py`

### School services

- [Attendance service](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/attendance/service.py): `backend/app/attendance/service.py`
- [School domain data](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/domain/repositories.py): `backend/app/domain/repositories.py`
- [Attendance analytics](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/analytics/router.py): `backend/app/analytics/router.py`
- [Staff escalation](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/mock_api/escalation.py): `backend/app/mock_api/escalation.py`
- [Calendar and timetables](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/calendar/router.py): `backend/app/calendar/router.py`

### Learning and media

- [Tutor and quizzes](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/chatbot/service.py): `backend/app/chatbot/service.py`
- [Teacher live chat](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/chatbot/live_chat.py): `backend/app/chatbot/live_chat.py`
- [Language support](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/i18n/language_router.py): `backend/app/i18n/language_router.py`
- [Speech services](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/voice/router.py): `backend/app/voice/router.py`
- [Avatar and lip-sync](https://github.com/shreya661/edubridge-ai-human-like-school-assistant/blob/master/backend/app/avatar/provider.py): `backend/app/avatar/provider.py`

### Other components

- **School user**
- **LLM provider**

## Connections

- School user → Web interface: submits request
- Web interface → FastAPI application: calls API
- FastAPI application → Authentication: routes login
- Authentication → Session store: creates session
- FastAPI application → Session identity: checks identity
- Session identity → Session store: reads session
- FastAPI application → Request interpretation: routes request
- Request interpretation → Conversation context: loads context
- Request interpretation → LLM client: interprets message
- LLM client → LLM provider: requests completion
- Request interpretation → Authorization gate: checks request
- Authorization gate → Ownership rules: validates scope
- Request interpretation → Tool dispatcher: dispatches allowed intent
- Tool dispatcher → Attendance service: invokes tool
- Tool dispatcher → Attendance analytics: invokes tool
- Tool dispatcher → Staff escalation: invokes tool
- Attendance service → School domain data: reads school data
- Attendance analytics → School domain data: reads school data
- FastAPI application → Calendar and timetables: routes calendar requests
- FastAPI application → Role guidance: routes guidance requests
- FastAPI application → Tutor and quizzes: routes tutor requests
- Tutor and quizzes → Teacher live chat: offers staff chat
- FastAPI application → Speech services: routes speech requests
- FastAPI application → Avatar and lip-sync: routes avatar requests
- Web interface → Speech services: sends audio requests
- Web interface → Avatar and lip-sync: requests avatar
- Web interface → Language support: requests language support
