# surya-189251/studypilot-ai architecture

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

- Interactive diagram: https://gitdiagram.com/surya-189251/studypilot-ai
- Repository: https://github.com/surya-189251/studypilot-ai

## Overview

StudyPilot-AI is a web-based study assistant: students work with course materials to get summaries, flashcards, quizzes, source-based answers, and progress-adaptive study plans. The repository is a compact Flask application, with its backend concentrated in App.py and its interface in Index.html. The excerpts show in-memory state and retrieval calls for Q&A and summaries; the README documents the broader capabilities. Connections not demonstrated in the excerpts are marked unverified or supported by the README. Cloudant and COS are described as optional storage integrations.

Main entry points: [`App.py`](https://github.com/surya-189251/studypilot-ai/blob/main/App.py) (Flask application), [`Index.html`](https://github.com/surya-189251/studypilot-ai/blob/main/Index.html) (Study interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Student interface"]
  node_web["Study interface<br/>[Index.html]"]
end

subgraph group_backend["Study assistant backend"]
  node_api["Flask application<br/>[App.py]"]
  node_retrieval["Material retrieval<br/>[App.py]"]
end

subgraph group_learning["Learning features"]
  node_materials["Course materials<br/>[App.py]"]
  node_qa["Source-based Q&amp;A<br/>[App.py]"]
  node_summaries["Summaries<br/>[App.py]"]
  node_flashcards["Flashcards<br/>[App.py]"]
  node_quizzes["Quizzes<br/>[App.py]"]
  node_progress["Progress tracking<br/>[App.py]"]
  node_plans["Study plans<br/>[App.py]"]
end

subgraph group_state["State and integrations"]
  node_state[("In-memory state<br/>[App.py]")]
  node_granite["Granite model"]
  node_cloudant[("Cloudant storage")]
  node_cos[("Cloud Object Storage")]
end

node_student(("Student"))

node_student -->|"uses"| node_web
node_web -.->|"requests"| node_api
node_api -.->|"manages"| node_materials
node_api -->|"provides"| node_qa
node_api -->|"provides"| node_summaries
node_api -->|"provides"| node_flashcards
node_api -->|"provides"| node_quizzes
node_api -->|"tracks"| node_progress
node_api -->|"adapts"| node_plans
node_qa -->|"retrieves materials"| node_retrieval
node_summaries -->|"retrieves materials"| node_retrieval
node_api -.->|"generates content"| node_granite
node_materials -.->|"stores in"| node_state
node_quizzes -.->|"records results"| node_state
node_plans -.->|"uses progress"| node_state
node_state -.->|"optional persistence"| node_cloudant
node_state -.->|"optional persistence"| node_cos

click node_web "https://github.com/surya-189251/studypilot-ai/blob/main/Index.html"
click node_api "https://github.com/surya-189251/studypilot-ai/blob/main/App.py"
click node_materials "https://github.com/surya-189251/studypilot-ai/blob/main/App.py"
click node_retrieval "https://github.com/surya-189251/studypilot-ai/blob/main/App.py"
click node_qa "https://github.com/surya-189251/studypilot-ai/blob/main/App.py"
click node_summaries "https://github.com/surya-189251/studypilot-ai/blob/main/App.py"
click node_flashcards "https://github.com/surya-189251/studypilot-ai/blob/main/App.py"
click node_quizzes "https://github.com/surya-189251/studypilot-ai/blob/main/App.py"
click node_progress "https://github.com/surya-189251/studypilot-ai/blob/main/App.py"
click node_plans "https://github.com/surya-189251/studypilot-ai/blob/main/App.py"
click node_state "https://github.com/surya-189251/studypilot-ai/blob/main/App.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_web toneBlue
class node_api,node_retrieval toneAmber
class node_materials,node_qa,node_summaries,node_flashcards,node_quizzes,node_progress,node_plans toneMint
class node_state,node_granite,node_cloudant,node_cos toneRose
class node_student toneIndigo
```

## Components

### Student interface

- [Study interface](https://github.com/surya-189251/studypilot-ai/blob/main/Index.html): `Index.html`

### Study assistant backend

- [Flask application](https://github.com/surya-189251/studypilot-ai/blob/main/App.py): `App.py`
- [Material retrieval](https://github.com/surya-189251/studypilot-ai/blob/main/App.py): `App.py`

### Learning features

- [Course materials](https://github.com/surya-189251/studypilot-ai/blob/main/App.py): `App.py`
- [Source-based Q&A](https://github.com/surya-189251/studypilot-ai/blob/main/App.py): `App.py`
- [Summaries](https://github.com/surya-189251/studypilot-ai/blob/main/App.py): `App.py`
- [Flashcards](https://github.com/surya-189251/studypilot-ai/blob/main/App.py): `App.py`
- [Quizzes](https://github.com/surya-189251/studypilot-ai/blob/main/App.py): `App.py`
- [Progress tracking](https://github.com/surya-189251/studypilot-ai/blob/main/App.py): `App.py`
- [Study plans](https://github.com/surya-189251/studypilot-ai/blob/main/App.py): `App.py`

### State and integrations

- [In-memory state](https://github.com/surya-189251/studypilot-ai/blob/main/App.py): `App.py`
- **Granite model**
- **Cloudant storage**
- **Cloud Object Storage**

### Other components

- **Student**

## Connections

- Student → Study interface: uses (evidence: `README.md`)
- Study interface → Flask application: requests
- Flask application → Course materials: manages (evidence: `App.py`)
- Flask application → Source-based Q&A: provides (evidence: `README.md`)
- Flask application → Summaries: provides (evidence: `README.md`)
- Flask application → Flashcards: provides (evidence: `README.md`)
- Flask application → Quizzes: provides (evidence: `README.md`)
- Flask application → Progress tracking: tracks (evidence: `README.md`)
- Flask application → Study plans: adapts (evidence: `README.md`)
- Source-based Q&A → Material retrieval: retrieves materials (evidence: `App.py`)
- Summaries → Material retrieval: retrieves materials (evidence: `App.py`)
- Flask application → Granite model: generates content
- Course materials → In-memory state: stores in (evidence: `App.py`)
- Quizzes → In-memory state: records results (evidence: `App.py`)
- Study plans → In-memory state: uses progress (evidence: `App.py`)
- In-memory state → Cloudant storage: optional persistence (evidence: `App.py`)
- In-memory state → Cloud Object Storage: optional persistence (evidence: `App.py`)
