# zaina-almaarouf/ai-study-assistant architecture

> Architecture diagram of the GitHub repository zaina-almaarouf/ai-study-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/zaina-almaarouf/ai-study-assistant
- Repository: https://github.com/zaina-almaarouf/ai-study-assistant

## Overview

AI Study Assistant is a small Streamlit application for turning pasted study notes into summaries, beginner-friendly explanations, or practice quizzes. The user enters notes and selects an action in app.py; that same module checks for input, sends an action-specific prompt to the local Ollama Llama 3.2 model, and displays its response. The README documents these capabilities and local model setup; the graph reflects the sampled app source, with no separate domain or storage layers.

Main entry points: [`app.py`](https://github.com/zaina-almaarouf/ai-study-assistant/blob/main/app.py) (Study assistant UI and actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Study assistant"]
  node_app["Study assistant UI and actions<br/>[app.py]"]
  node_summarize["Summarize notes<br/>[app.py]"]
  node_explain["Explain concepts<br/>[app.py]"]
  node_quiz["Generate quiz<br/>[app.py]"]
end

subgraph group_generation["AI generation"]
  node_ollama["Ollama local model"]
  node_llama["Llama 3.2"]
end

node_student(("Student"))

node_student -->|"enters notes"| node_app
node_student -->|"selects action"| node_app
node_app -->|"dispatches"| node_summarize
node_app -->|"dispatches"| node_explain
node_app -->|"dispatches"| node_quiz
node_summarize -->|"sends prompt"| node_ollama
node_explain -->|"sends prompt"| node_ollama
node_quiz -->|"sends prompt"| node_ollama
node_ollama -->|"runs model"| node_llama
node_ollama -->|"returns response"| node_summarize
node_ollama -->|"returns response"| node_explain
node_ollama -->|"returns response"| node_quiz
node_summarize -->|"displays result"| node_app
node_explain -->|"displays result"| node_app
node_quiz -->|"displays result"| node_app
node_app -->|"shows result"| node_student

click node_app "https://github.com/zaina-almaarouf/ai-study-assistant/blob/main/app.py"
click node_summarize "https://github.com/zaina-almaarouf/ai-study-assistant/blob/main/app.py"
click node_explain "https://github.com/zaina-almaarouf/ai-study-assistant/blob/main/app.py"
click node_quiz "https://github.com/zaina-almaarouf/ai-study-assistant/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_app,node_summarize,node_explain,node_quiz toneBlue
class node_ollama,node_llama toneAmber
class node_student toneIndigo
```

## Components

### Study assistant

- [Study assistant UI and actions](https://github.com/zaina-almaarouf/ai-study-assistant/blob/main/app.py): `app.py`
- [Summarize notes](https://github.com/zaina-almaarouf/ai-study-assistant/blob/main/app.py): `app.py`
- [Explain concepts](https://github.com/zaina-almaarouf/ai-study-assistant/blob/main/app.py): `app.py`
- [Generate quiz](https://github.com/zaina-almaarouf/ai-study-assistant/blob/main/app.py): `app.py`

### AI generation

- **Ollama local model**
- **Llama 3.2**

### Other components

- **Student**

## Connections

- Student → Study assistant UI and actions: enters notes
- Student → Study assistant UI and actions: selects action
- Study assistant UI and actions → Summarize notes: dispatches
- Study assistant UI and actions → Explain concepts: dispatches
- Study assistant UI and actions → Generate quiz: dispatches
- Summarize notes → Ollama local model: sends prompt
- Explain concepts → Ollama local model: sends prompt
- Generate quiz → Ollama local model: sends prompt
- Ollama local model → Llama 3.2: runs model
- Ollama local model → Summarize notes: returns response
- Ollama local model → Explain concepts: returns response
- Ollama local model → Generate quiz: returns response
- Summarize notes → Study assistant UI and actions: displays result
- Explain concepts → Study assistant UI and actions: displays result
- Generate quiz → Study assistant UI and actions: displays result
- Study assistant UI and actions → Student: shows result
