# parkavisit2427/ai-content-generator architecture

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

- Interactive diagram: https://gitdiagram.com/parkavisit2427/ai-content-generator
- Repository: https://github.com/parkavisit2427/ai-content-generator

## Overview

AI Educational Content Generator is a React-and-Flask application for turning a learner’s topic and preferences into educational material. The main workflow collects topic, education level, content type, and tone; submits them to the Flask generation endpoint; builds a prompt; requests Gemini content; and displays the returned text. The README also names notes, summaries, quizzes, and flashcards as supported output types. The repository contains other React client directories, but the sampled apps are starter screens, not additional generator workflows.

Main entry points: [`server/app.py`](https://github.com/parkavisit2427/ai-content-generator/blob/main/server/app.py) (Generate endpoint), [`client/src/App.js`](https://github.com/parkavisit2427/ai-content-generator/blob/main/client/src/App.js) (Generator form and output)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Learner experience"]
  node_generator_ui["Generator form and output<br/>[App.js]"]
end

subgraph group_generation["Content generation"]
  node_generate_endpoint["Generate endpoint<br/>[app.py]"]
  node_prompt["Prompt construction<br/>[app.py]"]
end

subgraph group_provider["AI provider"]
  node_gemini["Gemini generation<br/>[app.py]"]
end

node_learner(("Learner"))

node_learner -->|"sets preferences"| node_generator_ui
node_generator_ui -->|"posts request"| node_generate_endpoint
node_generate_endpoint -->|"builds prompt"| node_prompt
node_prompt -->|"requests content"| node_gemini
node_generate_endpoint -->|"returns content"| node_generator_ui

click node_generator_ui "https://github.com/parkavisit2427/ai-content-generator/blob/main/client/src/App.js"
click node_generate_endpoint "https://github.com/parkavisit2427/ai-content-generator/blob/main/server/app.py"
click node_prompt "https://github.com/parkavisit2427/ai-content-generator/blob/main/server/app.py"
click node_gemini "https://github.com/parkavisit2427/ai-content-generator/blob/main/server/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_generator_ui toneBlue
class node_generate_endpoint,node_prompt toneAmber
class node_gemini toneMint
class node_learner toneIndigo
```

## Components

### Learner experience

- [Generator form and output](https://github.com/parkavisit2427/ai-content-generator/blob/main/client/src/App.js): `client/src/App.js`

### Content generation

- [Generate endpoint](https://github.com/parkavisit2427/ai-content-generator/blob/main/server/app.py): `server/app.py`
- [Prompt construction](https://github.com/parkavisit2427/ai-content-generator/blob/main/server/app.py): `server/app.py`

### AI provider

- [Gemini generation](https://github.com/parkavisit2427/ai-content-generator/blob/main/server/app.py): `server/app.py`

### Other components

- **Learner**

## Connections

- Learner → Generator form and output: sets preferences (evidence: `client/src/App.js`)
- Generator form and output → Generate endpoint: posts request (evidence: `client/src/App.js`)
- Generate endpoint → Prompt construction: builds prompt (evidence: `server/app.py`)
- Prompt construction → Gemini generation: requests content (evidence: `server/app.py`)
- Generate endpoint → Generator form and output: returns content (evidence: `client/src/App.js`)
