# shashivardan-jarpati/gradgenie-ai architecture

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

- Interactive diagram: https://gitdiagram.com/shashivardan-jarpati/gradgenie-ai
- Repository: https://github.com/shashivardan-jarpati/gradgenie-ai

## Overview

GradGenie AI is a Streamlit academic assistant. Students choose an engineering branch and study mode, submit a question, and receive exam-oriented AI help. The app combines branch context and mode-specific instructions in prompts sent through OpenRouter. The README documents tutor explanations, backlog plans, short doubt answers, and several exam-output formats; these are grouped as distinct capabilities rather than separate services. The source excerpt ends during the model call, so response handling and display details are not independently verified.

Main entry points: [`app.py`](https://github.com/shashivardan-jarpati/gradgenie-ai/blob/main/app.py) (Study interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Student experience"]
  node_interface["Study interface<br/>[app.py]"]
  node_answer["Study answer<br/>[app.py]"]
end

subgraph group_generation["Answer generation"]
  node_branch["Branch context<br/>[app.py]"]
  node_prompt["Prompt assembly<br/>[app.py]"]
  node_openrouter{{"OpenRouter LLM"}}
end

subgraph group_capabilities["Study capabilities"]
  node_modes["Study modes<br/>[app.py]"]
end

node_student(("Student"))

node_student -->|"submits question"| node_interface
node_interface -->|"selects branch"| node_branch
node_interface -->|"selects mode"| node_modes
node_branch -->|"adds context"| node_prompt
node_modes -->|"sets instructions"| node_prompt
node_prompt -->|"sends prompt"| node_openrouter
node_openrouter -.->|"generates answer"| node_answer
node_modes -->|"formats study help"| node_answer

click node_interface "https://github.com/shashivardan-jarpati/gradgenie-ai/blob/main/app.py"
click node_branch "https://github.com/shashivardan-jarpati/gradgenie-ai/blob/main/app.py"
click node_modes "https://github.com/shashivardan-jarpati/gradgenie-ai/blob/main/app.py"
click node_prompt "https://github.com/shashivardan-jarpati/gradgenie-ai/blob/main/app.py"
click node_answer "https://github.com/shashivardan-jarpati/gradgenie-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_interface,node_answer toneBlue
class node_branch,node_prompt,node_openrouter toneAmber
class node_modes toneMint
class node_student toneIndigo
```

## Components

### Student experience

- [Study interface](https://github.com/shashivardan-jarpati/gradgenie-ai/blob/main/app.py): `app.py`
- [Study answer](https://github.com/shashivardan-jarpati/gradgenie-ai/blob/main/app.py): `app.py`

### Answer generation

- [Branch context](https://github.com/shashivardan-jarpati/gradgenie-ai/blob/main/app.py): `app.py`
- [Prompt assembly](https://github.com/shashivardan-jarpati/gradgenie-ai/blob/main/app.py): `app.py`
- **OpenRouter LLM**

### Study capabilities

- [Study modes](https://github.com/shashivardan-jarpati/gradgenie-ai/blob/main/app.py): `app.py`

### Other components

- **Student**

## Connections

- Student → Study interface: submits question (evidence: `README.md`)
- Study interface → Branch context: selects branch (evidence: `app.py`)
- Study interface → Study modes: selects mode (evidence: `app.py`)
- Branch context → Prompt assembly: adds context (evidence: `app.py`)
- Study modes → Prompt assembly: sets instructions (evidence: `app.py`)
- Prompt assembly → OpenRouter LLM: sends prompt (evidence: `app.py`)
- OpenRouter LLM → Study answer: generates answer
- Study modes → Study answer: formats study help (evidence: `README.md`)
