# cilusqyoi/youtube-script-generator architecture

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

- Interactive diagram: https://gitdiagram.com/cilusqyoi/youtube-script-generator
- Repository: https://github.com/cilusqyoi/youtube-script-generator

## Overview

This small Streamlit app takes a topic, tone, and duration, calls the script-generation function, and displays the returned script. The generator formats those inputs into a prompt requesting a hook, introduction, main content, and conclusion with a CTA, then requests content from Gemini. The graph reflects the sampled app and generator code; README capabilities are included where documented, but no separate implementation for them is inferred.

Main entry points: [`app.py`](https://github.com/cilusqyoi/youtube-script-generator/blob/main/app.py) (Streamlit interface), [`script_generator.py`](https://github.com/cilusqyoi/youtube-script-generator/blob/main/script_generator.py) (Prompt and generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_app["Streamlit interface<br/>[app.py]"]
end

subgraph group_generation["Script generation"]
  node_generator["Prompt and generation"]
end

subgraph group_ai["AI service"]
  node_gemini["Gemini API"]
end

node_user(("User"))

node_user -->|"enters inputs"| node_app
node_app -->|"requests script"| node_generator
node_generator -->|"sends prompt"| node_gemini
node_gemini -->|"returns content"| node_generator
node_generator -->|"returns script"| node_app
node_app -->|"displays script"| node_user

click node_app "https://github.com/cilusqyoi/youtube-script-generator/blob/main/app.py"
click node_generator "https://github.com/cilusqyoi/youtube-script-generator/blob/main/script_generator.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_user toneBlue
class node_generator toneAmber
class node_gemini toneMint
```

## Components

### User interface

- [Streamlit interface](https://github.com/cilusqyoi/youtube-script-generator/blob/main/app.py): `app.py`

### Script generation

- [Prompt and generation](https://github.com/cilusqyoi/youtube-script-generator/blob/main/script_generator.py): `script_generator.py`

### AI service

- **Gemini API**

### Other components

- **User**

## Connections

- User → Streamlit interface: enters inputs (evidence: `app.py`)
- Streamlit interface → Prompt and generation: requests script (evidence: `app.py`)
- Prompt and generation → Gemini API: sends prompt (evidence: `script_generator.py`)
- Gemini API → Prompt and generation: returns content (evidence: `script_generator.py`)
- Prompt and generation → Streamlit interface: returns script (evidence: `app.py`)
- Streamlit interface → User: displays script (evidence: `app.py`)
