# rsrohan99/presenter architecture

> Architecture diagram of the GitHub repository rsrohan99/presenter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rsrohan99/presenter
- Repository: https://github.com/rsrohan99/presenter

## Overview

##### File structure
- Top-level files:
- run.py      – CLI entry point that accepts a topic and optional flags
- workflow.py – Defines the LlamaIndex Workflow that sequences all agents
- agents/     – Directory of Python modules, each implementing one “agent”
· narrator.py
· slide_maker.py
· structure_creater.py
· structure_creater_from_data.py
· structure_updater.py
· structure_validator.py
· video_creator.py
- models.py   – Data classes or schemas for passing state between agents
- utils.py    – Shared helper functions (file I/O, logging, API wrappers)
- requirements.txt, .env.example, .gitignore, README.md

##### Key insights from README
- Workflow orchestrates:
1. Structure creation & validation
2. Slide content generation
4. HTML slide rendering (markdown-slides & reveal.js)
5. PDF export (DeckTape)
6. Audio narration (ElevenLabs)
7. Video assembly (FFmpeg)
- Outputs are written under `presentations/<presentation_folder>/` as HTML, PDF, MP4.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Core Python Modules
    TopicInput["Topic Input"]:::core
    CLIRunner["CLI Runner"]:::core
    WorkflowEngine["Workflow Engine"]:::core
    Models["Models (Schemas)"]:::core
    Utils["Shared Utilities"]:::core

    subgraph "Agents"
        SC["StructureCreator Agent"]:::core
        SV["StructureValidator Agent"]:::core
        SM["SlideMaker Agent"]:::core
        NA["Narrator Agent"]:::core
        VC["VideoCreator Agent"]:::core
    end

    subgraph "External Services/Tools"
        OpenAI["OpenAI API"]:::external
        MermaidCLI["Mermaid CLI"]:::external
        MarkdownSlides["markdown-slides & reveal.js"]:::external
        DeckTape["DeckTape"]:::external
        ElevenLabs["ElevenLabs API"]:::external
        FFmpeg["FFmpeg"]:::external
    end

    Storage["presentations/<presentation_folder>"]:::storage

    %% Data & Control Flow
    TopicInput --> CLIRunner
    CLIRunner --> WorkflowEngine
    WorkflowEngine --> OpenAI
    WorkflowEngine --> SC
    SC --> SV
    SV --> SM
    WorkflowEngine --> SV
    WorkflowEngine --> SM
    WorkflowEngine --> NA
    WorkflowEngine --> VC
    SM --> MermaidCLI
    SM --> MarkdownSlides
    MarkdownSlides --> DeckTape
    DeckTape --> Storage
    MarkdownSlides --> Storage
    NA --> ElevenLabs
    ElevenLabs --> Storage
    VC --> FFmpeg
    FFmpeg --> Storage

    %% Agents use Models & Utils
    SC --> Models
    SV --> Models
    SM --> Models
    NA --> Models
    VC --> Models

    SC --> Utils
    SV --> Utils
    SM --> Utils
    NA --> Utils
    VC --> Utils

    %% Click Events
    click CLIRunner "https://github.com/rsrohan99/presenter/blob/master/run.py"
    click WorkflowEngine "https://github.com/rsrohan99/presenter/blob/master/workflow.py"
    click SC "https://github.com/rsrohan99/presenter/blob/master/agents/structure_creater.py"
    click SV "https://github.com/rsrohan99/presenter/blob/master/agents/structure_validator.py"
    click SM "https://github.com/rsrohan99/presenter/blob/master/agents/slide_maker.py"
    click NA "https://github.com/rsrohan99/presenter/blob/master/agents/narrator.py"
    click VC "https://github.com/rsrohan99/presenter/blob/master/agents/video_creator.py"
    click Models "https://github.com/rsrohan99/presenter/blob/master/models.py"
    click Utils "https://github.com/rsrohan99/presenter/blob/master/utils.py"

    %% Styles
    classDef core fill:#D0E8FF,stroke:#0366d6,color:#0366d6
    classDef external fill:#E0FFE0,stroke:#2d7d2d,color:#2d7d2d
    classDef storage fill:#FFE0B2,stroke:#d97706,color:#d97706
```
