# maruthi-gunisetty/innovex-nov16 architecture

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

- Interactive diagram: https://gitdiagram.com/maruthi-gunisetty/innovex-nov16
- Repository: https://github.com/maruthi-gunisetty/innovex-nov16

## Overview

SARVAVIDYA is a Streamlit multi-subject learning platform. Learners authenticate, choose a curriculum track, study lessons and take assessments; assessment responses feed mastery tracking and misconception diagnosis, while dashboards and recommendations surface progress and next steps. Faculty have analytics and management views, and the product also includes global search, SARVA AI, rewards, and Avatarverse. The routing and several module dependencies are documented in the source index; unsampled implementations are represented at their exact tree paths, without assuming unshown calls.

Main entry points: [`app.py`](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/app.py) (Streamlit router), [`database/db.py`](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/database/db.py) (Learning database), [`views/assessment.py`](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/assessment.py) (Assessment), [`views/student_dashboard.py`](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/student_dashboard.py) (Student dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application and access"]
  node_app["Streamlit router<br/>[app.py]"]
  node_authview["Authentication view<br/>[auth.py]"]
  node_auth["Auth service<br/>[auth_service.py]"]
  node_navigation["Navigation<br/>[navigation.py]"]
end

subgraph group_learning["Learning experience"]
  node_subjects["Subjects hub<br/>[subjects_hub.py]"]
  node_library["Learning library<br/>[library.py]"]
  node_assessment["Assessment<br/>[assessment.py]"]
  node_student["Student dashboard"]
  node_learningpath["Learning path<br/>[learning_path.py]"]
  node_teacher["Faculty dashboard"]
end

subgraph group_intelligence["Learning intelligence"]
  node_bkt["Mastery tracking<br/>[bkt.py]"]
  node_misconception["Misconception diagnosis<br/>[misconception.py]"]
  node_recommender["Recommendations<br/>[recommender.py]"]
  node_analytics["Learning analytics<br/>[analytics.py]"]
end

subgraph group_platform["Platform services"]
  node_search["Global search<br/>[search_view.py]"]
  node_searchsvc["Search service<br/>[search_service.py]"]
  node_sarva["SARVA AI assistant<br/>[sarva_ai.py]"]
  node_ai["Gemini AI service<br/>[ai_service.py]"]
  node_askwhy["Ask AI Why<br/>[ask_ai_why.py]"]
  node_rewards["Rewards engine<br/>[rewards_engine.py]"]
  node_rewardsview["Rewards view<br/>[rewards_view.py]"]
  node_avatar["Avatarverse<br/>[avatarverse.py]"]
end

subgraph group_data["Content and persistence"]
  node_course["Course manager<br/>[course_manager.py]"]
  node_seed["Curriculum seed data<br/>[seed_data.py]"]
  node_db[("Learning database<br/>[db.py]")]
end

node_learner(("Learner"))
node_faculty(("Faculty"))
node_gemini{{"Google Gemini"}}

node_learner -->|"opens platform"| node_app
node_faculty -->|"opens platform"| node_app
node_app -->|"routes unauthenticated"| node_authview
node_app -->|"routes learners"| node_student
node_app -->|"routes faculty"| node_teacher
node_authview -->|"uses authentication"| node_auth
node_authview -->|"reads and writes users"| node_db
node_app -->|"renders navigation"| node_navigation
node_navigation -->|"renders search"| node_search
node_app -->|"routes active query"| node_search
node_search -->|"queries results"| node_searchsvc
node_searchsvc -->|"searches learning data"| node_db
node_app -->|"routes page"| node_subjects
node_app -->|"routes page"| node_library
node_app -->|"routes page"| node_assessment
node_app -->|"routes page"| node_learningpath
node_app -->|"routes page"| node_analytics
node_subjects -->|"selects curriculum"| node_course
node_subjects -->|"reads subjects"| node_db
node_library -->|"gets active track"| node_course
node_library -->|"loads lessons"| node_db
node_assessment -->|"records attempts"| node_db
node_assessment -->|"updates mastery"| node_bkt
node_assessment -->|"diagnoses distractors"| node_misconception
node_assessment -->|"requests next steps"| node_recommender
node_assessment -->|"offers explanations"| node_askwhy
node_assessment -->|"awards learning rewards"| node_rewards
node_student -->|"loads progress"| node_db
node_student -->|"summarizes mastery"| node_bkt
node_student -->|"summarizes patterns"| node_misconception
node_student -->|"gets recommendations"| node_recommender
node_student -->|"gets active track"| node_course
node_student -->|"loads rewards"| node_rewards
node_learningpath -->|"uses mastery"| node_bkt
node_learningpath -->|"loads recommendations"| node_recommender
node_learningpath -->|"reads learning state"| node_db
node_teacher -->|"loads class data"| node_db
node_teacher -->|"uses mastery"| node_bkt
node_teacher -->|"reviews diagnoses"| node_misconception
node_teacher -->|"reviews rewards"| node_rewards
node_analytics -->|"loads metrics"| node_db
node_analytics -->|"uses curriculum"| node_course
node_sarva -->|"requests responses"| node_ai
node_sarva -->|"loads learning context"| node_db
node_ai -.->|"calls model"| node_gemini
node_askwhy -->|"requests diagnosis explanation"| node_ai
node_askwhy -->|"uses diagnosis"| node_misconception
node_rewardsview -->|"loads rewards"| node_rewards

click node_app "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/app.py"
click node_authview "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/auth.py"
click node_auth "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/auth_service.py"
click node_navigation "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/components/navigation.py"
click node_subjects "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/subjects_hub.py"
click node_library "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/library.py"
click node_assessment "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/assessment.py"
click node_student "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/student_dashboard.py"
click node_learningpath "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/learning_path.py"
click node_teacher "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/teacher_dashboard.py"
click node_bkt "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/bkt.py"
click node_misconception "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/misconception.py"
click node_recommender "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/recommender.py"
click node_analytics "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/analytics.py"
click node_search "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/components/search_view.py"
click node_searchsvc "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/search_service.py"
click node_sarva "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/components/sarva_ai.py"
click node_ai "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/ai_service.py"
click node_askwhy "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/components/ask_ai_why.py"
click node_rewards "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/rewards_engine.py"
click node_rewardsview "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/rewards_view.py"
click node_avatar "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/avatarverse.py"
click node_course "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/course_manager.py"
click node_seed "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/database/seed_data.py"
click node_db "https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/database/db.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_app,node_authview,node_auth,node_navigation toneBlue
class node_subjects,node_library,node_assessment,node_student,node_learningpath,node_teacher toneAmber
class node_bkt,node_misconception,node_recommender,node_analytics toneMint
class node_search,node_searchsvc,node_sarva,node_ai,node_askwhy,node_rewards,node_rewardsview,node_avatar toneRose
class node_course,node_seed,node_db,node_learner,node_faculty,node_gemini toneIndigo
```

## Components

### Application and access

- [Streamlit router](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/app.py): `app.py`
- [Authentication view](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/auth.py): `views/auth.py`
- [Auth service](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/auth_service.py): `core/auth_service.py`
- [Navigation](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/components/navigation.py): `components/navigation.py`

### Learning experience

- [Subjects hub](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/subjects_hub.py): `views/subjects_hub.py`
- [Learning library](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/library.py): `views/library.py`
- [Assessment](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/assessment.py): `views/assessment.py`
- [Student dashboard](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/student_dashboard.py): `views/student_dashboard.py`
- [Learning path](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/learning_path.py): `views/learning_path.py`
- [Faculty dashboard](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/teacher_dashboard.py): `views/teacher_dashboard.py`

### Learning intelligence

- [Mastery tracking](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/bkt.py): `core/bkt.py`
- [Misconception diagnosis](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/misconception.py): `core/misconception.py`
- [Recommendations](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/recommender.py): `core/recommender.py`
- [Learning analytics](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/analytics.py): `views/analytics.py`

### Platform services

- [Global search](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/components/search_view.py): `components/search_view.py`
- [Search service](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/search_service.py): `core/search_service.py`
- [SARVA AI assistant](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/components/sarva_ai.py): `components/sarva_ai.py`
- [Gemini AI service](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/ai_service.py): `core/ai_service.py`
- [Ask AI Why](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/components/ask_ai_why.py): `components/ask_ai_why.py`
- [Rewards engine](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/rewards_engine.py): `core/rewards_engine.py`
- [Rewards view](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/rewards_view.py): `views/rewards_view.py`
- [Avatarverse](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/views/avatarverse.py): `views/avatarverse.py`

### Content and persistence

- [Course manager](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/core/course_manager.py): `core/course_manager.py`
- [Curriculum seed data](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/database/seed_data.py): `database/seed_data.py`
- [Learning database](https://github.com/maruthi-gunisetty/innovex-nov16/blob/main/database/db.py): `database/db.py`

### Other components

- **Learner**
- **Faculty**
- **Google Gemini**

## Connections

- Learner → Streamlit router: opens platform (evidence: `README.md`)
- Faculty → Streamlit router: opens platform (evidence: `README.md`)
- Streamlit router → Authentication view: routes unauthenticated (evidence: `app.py`)
- Streamlit router → Student dashboard: routes learners (evidence: `app.py`)
- Streamlit router → Faculty dashboard: routes faculty (evidence: `app.py`)
- Authentication view → Auth service: uses authentication (evidence: `views/auth.py`)
- Authentication view → Learning database: reads and writes users (evidence: `views/auth.py`)
- Streamlit router → Navigation: renders navigation (evidence: `app.py`)
- Navigation → Global search: renders search (evidence: `components/navigation.py`)
- Streamlit router → Global search: routes active query (evidence: `app.py`)
- Global search → Search service: queries results (evidence: `components/search_view.py`)
- Search service → Learning database: searches learning data (evidence: `core/search_service.py`)
- Streamlit router → Subjects hub: routes page (evidence: `app.py`)
- Streamlit router → Learning library: routes page (evidence: `app.py`)
- Streamlit router → Assessment: routes page (evidence: `app.py`)
- Streamlit router → Learning path: routes page (evidence: `app.py`)
- Streamlit router → Learning analytics: routes page (evidence: `app.py`)
- Subjects hub → Course manager: selects curriculum (evidence: `views/subjects_hub.py`)
- Subjects hub → Learning database: reads subjects (evidence: `views/subjects_hub.py`)
- Learning library → Course manager: gets active track (evidence: `views/library.py`)
- Learning library → Learning database: loads lessons (evidence: `views/library.py`)
- Assessment → Learning database: records attempts (evidence: `views/assessment.py`)
- Assessment → Mastery tracking: updates mastery (evidence: `views/assessment.py`)
- Assessment → Misconception diagnosis: diagnoses distractors (evidence: `views/assessment.py`)
- Assessment → Recommendations: requests next steps (evidence: `views/assessment.py`)
- Assessment → Ask AI Why: offers explanations (evidence: `views/assessment.py`)
- Assessment → Rewards engine: awards learning rewards (evidence: `views/assessment.py`)
- Student dashboard → Learning database: loads progress (evidence: `views/student_dashboard.py`)
- Student dashboard → Mastery tracking: summarizes mastery (evidence: `views/student_dashboard.py`)
- Student dashboard → Misconception diagnosis: summarizes patterns (evidence: `views/student_dashboard.py`)
- Student dashboard → Recommendations: gets recommendations (evidence: `views/student_dashboard.py`)
- Student dashboard → Course manager: gets active track (evidence: `views/student_dashboard.py`)
- Student dashboard → Rewards engine: loads rewards (evidence: `views/student_dashboard.py`)
- Learning path → Mastery tracking: uses mastery (evidence: `views/learning_path.py`)
- Learning path → Recommendations: loads recommendations (evidence: `views/learning_path.py`)
- Learning path → Learning database: reads learning state (evidence: `views/learning_path.py`)
- Faculty dashboard → Learning database: loads class data (evidence: `views/teacher_dashboard.py`)
- Faculty dashboard → Mastery tracking: uses mastery (evidence: `views/teacher_dashboard.py`)
- Faculty dashboard → Misconception diagnosis: reviews diagnoses (evidence: `views/teacher_dashboard.py`)
- Faculty dashboard → Rewards engine: reviews rewards (evidence: `views/teacher_dashboard.py`)
- Learning analytics → Learning database: loads metrics (evidence: `views/analytics.py`)
- Learning analytics → Course manager: uses curriculum (evidence: `views/analytics.py`)
- SARVA AI assistant → Gemini AI service: requests responses (evidence: `components/sarva_ai.py`)
- SARVA AI assistant → Learning database: loads learning context (evidence: `components/sarva_ai.py`)
- Gemini AI service → Google Gemini: calls model (evidence: `core/ai_service.py`)
- Ask AI Why → Gemini AI service: requests diagnosis explanation (evidence: `components/ask_ai_why.py`)
- Ask AI Why → Misconception diagnosis: uses diagnosis (evidence: `components/ask_ai_why.py`)
- Rewards view → Rewards engine: loads rewards (evidence: `views/rewards_view.py`)
