# maheshleo4/vector_quiz architecture

> Architecture diagram of the GitHub repository maheshleo4/vector_quiz, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/maheshleo4/vector_quiz
- Repository: https://github.com/maheshleo4/vector_quiz

## Overview

VectorQuiz is a web app for generating multiple-choice quizzes with Gemini or Groq, then scoring submissions and exporting quiz content. The main flow is user input in the frontend, API validation and generation, and returned questions; scoring and export are separate API operations. The README documents frontend scoring/export features, but the tree contains only index.html, so client-side wiring and implementation details are uncertain. Backend behavior is supported by sampled source.

Main entry points: [`backend/app.py`](https://github.com/maheshleo4/vector_quiz/blob/main/backend/app.py) (API routes), [`backend/llm_config.py`](https://github.com/maheshleo4/vector_quiz/blob/main/backend/llm_config.py) (LLM client), [`frontend/index.html`](https://github.com/maheshleo4/vector_quiz/blob/main/frontend/index.html) (Quiz interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_frontend["Quiz interface<br/>[index.html]"]
end

subgraph group_api["Quiz API"]
  node_api_routes["API routes<br/>[app.py]"]
  node_quiz_validation["Quiz validation<br/>[app.py]"]
  node_scoring["Quiz scoring<br/>[app.py]"]
  node_export["Quiz export<br/>[app.py]"]
  node_env_template["Key template<br/>[llm_config.py]"]
end

subgraph group_generation["Quiz generation"]
  node_llm_client["LLM client<br/>[llm_config.py]"]
  node_model_registry["Model registry<br/>[llm_config.py]"]
  node_prompt_parser["Prompt and parsing<br/>[llm_config.py]"]
  node_provider_clients["Provider clients<br/>[llm_config.py]"]
end

subgraph group_integrations["External providers"]
  node_gemini["Gemini API"]
  node_groq["Groq API"]
end

node_user(("Quiz user"))
node_env_file[".env file"]

node_user -->|"uses"| node_frontend
node_frontend -->|"API requests"| node_api_routes
node_api_routes -->|"generates quizzes"| node_llm_client
node_api_routes -->|"validates submissions"| node_quiz_validation
node_api_routes -->|"scores answers"| node_scoring
node_api_routes -->|"formats exports"| node_export
node_api_routes -->|"creates template"| node_env_template
node_env_template -->|"writes"| node_env_file
node_llm_client -->|"selects model"| node_model_registry
node_llm_client -->|"builds and validates"| node_prompt_parser
node_llm_client -->|"dispatches generation"| node_provider_clients
node_provider_clients -.->|"generates content"| node_gemini
node_provider_clients -.->|"generates content"| node_groq

click node_frontend "https://github.com/maheshleo4/vector_quiz/blob/main/frontend/index.html"
click node_api_routes "https://github.com/maheshleo4/vector_quiz/blob/main/backend/app.py"
click node_quiz_validation "https://github.com/maheshleo4/vector_quiz/blob/main/backend/app.py"
click node_scoring "https://github.com/maheshleo4/vector_quiz/blob/main/backend/app.py"
click node_export "https://github.com/maheshleo4/vector_quiz/blob/main/backend/app.py"
click node_env_template "https://github.com/maheshleo4/vector_quiz/blob/main/backend/llm_config.py"
click node_llm_client "https://github.com/maheshleo4/vector_quiz/blob/main/backend/llm_config.py"
click node_model_registry "https://github.com/maheshleo4/vector_quiz/blob/main/backend/llm_config.py"
click node_prompt_parser "https://github.com/maheshleo4/vector_quiz/blob/main/backend/llm_config.py"
click node_provider_clients "https://github.com/maheshleo4/vector_quiz/blob/main/backend/llm_config.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_frontend,node_user toneBlue
class node_api_routes,node_quiz_validation,node_scoring,node_export,node_env_template toneAmber
class node_llm_client,node_model_registry,node_prompt_parser,node_provider_clients toneMint
class node_gemini,node_groq toneRose
class node_env_file toneIndigo
```

## Components

### Web client

- [Quiz interface](https://github.com/maheshleo4/vector_quiz/blob/main/frontend/index.html): `frontend/index.html`

### Quiz API

- [API routes](https://github.com/maheshleo4/vector_quiz/blob/main/backend/app.py): `backend/app.py`
- [Quiz validation](https://github.com/maheshleo4/vector_quiz/blob/main/backend/app.py): `backend/app.py`
- [Quiz scoring](https://github.com/maheshleo4/vector_quiz/blob/main/backend/app.py): `backend/app.py`
- [Quiz export](https://github.com/maheshleo4/vector_quiz/blob/main/backend/app.py): `backend/app.py`
- [Key template](https://github.com/maheshleo4/vector_quiz/blob/main/backend/llm_config.py): `backend/llm_config.py`

### Quiz generation

- [LLM client](https://github.com/maheshleo4/vector_quiz/blob/main/backend/llm_config.py): `backend/llm_config.py`
- [Model registry](https://github.com/maheshleo4/vector_quiz/blob/main/backend/llm_config.py): `backend/llm_config.py`
- [Prompt and parsing](https://github.com/maheshleo4/vector_quiz/blob/main/backend/llm_config.py): `backend/llm_config.py`
- [Provider clients](https://github.com/maheshleo4/vector_quiz/blob/main/backend/llm_config.py): `backend/llm_config.py`

### External providers

- **Gemini API**
- **Groq API**

### Other components

- **Quiz user**
- **.env file**

## Connections

- Quiz user → Quiz interface: uses
- Quiz interface → API routes: API requests
- API routes → LLM client: generates quizzes
- API routes → Quiz validation: validates submissions
- API routes → Quiz scoring: scores answers
- API routes → Quiz export: formats exports
- API routes → Key template: creates template
- Key template → .env file: writes
- LLM client → Model registry: selects model
- LLM client → Prompt and parsing: builds and validates
- LLM client → Provider clients: dispatches generation
- Provider clients → Gemini API: generates content
- Provider clients → Groq API: generates content
