# rahulw311/interview-question-generator architecture

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

- Interactive diagram: https://gitdiagram.com/rahulw311/interview-question-generator
- Repository: https://github.com/rahulw311/interview-question-generator

## Overview

This is a Flask web app for generating interview questions and answers from a user’s requested quantity, tech stack, and experience level. The main flow is form submission, server-side quantity validation, Gemini generation, and rendering the results. The README documents the user workflow and Gemini integration; source excerpts show the route, generator, and configuration. Template internals and whether the JavaScript validator is loaded are not shown, so that connection is marked unverified.

Main entry points: [`app.py`](https://github.com/rahulw311/interview-question-generator/blob/main/app.py) (Flask routes), [`questionGenerator.py`](https://github.com/rahulw311/interview-question-generator/blob/main/questionGenerator.py) (Question generator), [`templates/index.html`](https://github.com/rahulw311/interview-question-generator/blob/main/templates/index.html) (Input form), [`templates/results.html`](https://github.com/rahulw311/interview-question-generator/blob/main/templates/results.html) (Results view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interaction"]
  node_flask["Flask routes<br/>[app.py]"]
  node_form["Input form<br/>[index.html]"]
  node_validation["Quantity validation"]
  node_results["Results view<br/>[results.html]"]
end

subgraph group_generation["Question generation"]
  node_generator["Question generator"]
end

subgraph group_integration["Model integration"]
  node_credentials["API key config<br/>[config.py]"]
  node_gemini["Gemini model"]
end

node_visitor(("User"))

node_visitor -->|"opens app"| node_flask
node_flask -->|"renders form"| node_form
node_visitor -->|"enters criteria"| node_form
node_form -->|"submits criteria"| node_flask
node_form -.->|"may invoke"| node_validation
node_flask -->|"calls generator"| node_generator
node_generator -->|"reads API key"| node_credentials
node_generator -->|"requests questions"| node_gemini
node_generator -->|"returns generated text"| node_flask
node_flask -->|"renders results"| node_results
node_results -->|"shows questions"| node_visitor

click node_flask "https://github.com/rahulw311/interview-question-generator/blob/main/app.py"
click node_form "https://github.com/rahulw311/interview-question-generator/blob/main/templates/index.html"
click node_validation "https://github.com/rahulw311/interview-question-generator/blob/main/static/js/numberInputValidation.js"
click node_results "https://github.com/rahulw311/interview-question-generator/blob/main/templates/results.html"
click node_generator "https://github.com/rahulw311/interview-question-generator/blob/main/questionGenerator.py"
click node_credentials "https://github.com/rahulw311/interview-question-generator/blob/main/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_flask,node_form,node_validation,node_results,node_visitor toneBlue
class node_generator toneAmber
class node_credentials,node_gemini toneMint
```

## Components

### Web interaction

- [Flask routes](https://github.com/rahulw311/interview-question-generator/blob/main/app.py): `app.py`
- [Input form](https://github.com/rahulw311/interview-question-generator/blob/main/templates/index.html): `templates/index.html`
- [Quantity validation](https://github.com/rahulw311/interview-question-generator/blob/main/static/js/numberInputValidation.js): `static/js/numberInputValidation.js`
- [Results view](https://github.com/rahulw311/interview-question-generator/blob/main/templates/results.html): `templates/results.html`

### Question generation

- [Question generator](https://github.com/rahulw311/interview-question-generator/blob/main/questionGenerator.py): `questionGenerator.py`

### Model integration

- [API key config](https://github.com/rahulw311/interview-question-generator/blob/main/config.py): `config.py`
- **Gemini model**

### Other components

- **User**

## Connections

- User → Flask routes: opens app (evidence: `README.md`)
- Flask routes → Input form: renders form (evidence: `app.py`)
- User → Input form: enters criteria (evidence: `README.md`)
- Input form → Flask routes: submits criteria (evidence: `README.md`)
- Input form → Quantity validation: may invoke
- Flask routes → Question generator: calls generator (evidence: `app.py`)
- Question generator → API key config: reads API key (evidence: `questionGenerator.py`)
- Question generator → Gemini model: requests questions (evidence: `questionGenerator.py`)
- Question generator → Flask routes: returns generated text (evidence: `app.py`)
- Flask routes → Results view: renders results (evidence: `app.py`)
- Results view → User: shows questions (evidence: `README.md`)
