# 100x-engineers100/discord_v3 architecture

> Architecture diagram of the GitHub repository 100x-engineers100/discord_v3, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/100x-engineers100/discord_v3
- Repository: https://github.com/100x-engineers100/discord_v3

## Overview

##### Project type and purpose
- This is a single‐service Python “Discord bot” project whose primary job is to provide transcription data, PowerPoint data, and scraped resources via Discord.
- Key indicators: a single bot.py entrypoint, data/ folder for storing artifacts, requirements.txt listing Python libraries, and a Procfile for Heroku deployment.

##### File structure
- Top‐level files:
- bot.py – the main application
- requirements.txt – dependency list (e.g., discord.py, speech recognition, pptx, BeautifulSoup/Scrapy)
- Procfile – Heroku web worker declaration
- data/ – persistent storage of transcripts, PPT exports, scraped resources
- No separate “frontend” folder – the “frontend” is effectively the Discord UI.
- No database config – the project currently uses the file system under data/.

##### README for additional insights
- The README calls out three types of data: Transcription, PPT, and scraped resources.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "External Services"
        Users["Users & Discord Server"]:::external
        DiscordAPI["Discord API / Gateway"]:::external
        SpeechAPI["Speech-to-Text API"]:::external
        WebTargets["Web Targets (Scraping)"]:::external
    end

    subgraph "Bot Application (Heroku Worker)"
        BotApp["Bot Application"]:::bot
        CommandHandler["Command Handler"]:::bot
        Transcription["Transcription Module"]:::bot
        PPTModule["PPT Extraction Module"]:::bot
        Scraper["Scraper Module"]:::bot
    end

    DataStore["File Storage (data/)"]:::storage
    DataFile["Example Data File (data/file.txt)"]:::storage

    subgraph "Repository Files"
        Procfile["Procfile"]:::config
        Requirements["requirements.txt"]:::config
        Readme["README.md"]:::config
    end

    %% Data flow
    Users -->|"command/voice payload"| DiscordAPI
    DiscordAPI -->|"event"| CommandHandler
    CommandHandler -->|"invoke transcribe"| Transcription
    CommandHandler -->|"invoke ppt extract"| PPTModule
    CommandHandler -->|"invoke scrape"| Scraper

    Transcription -->|"transcript.txt"| DataStore
    PPTModule -->|"slides.json"| DataStore
    Scraper -->|"resources.html"| DataStore

    DataStore --> DataFile

    Transcription -->|"API request"| SpeechAPI
    Scraper -->|"HTTP request"| WebTargets

    CommandHandler -->|"response"| DiscordAPI
    DiscordAPI --> Users

    BotApp --> CommandHandler
    BotApp --> Transcription
    BotApp --> PPTModule
    BotApp --> Scraper
    BotApp --> DataStore

    %% Repository files relation
    BotApp --- Procfile
    BotApp --- Requirements
    BotApp --- Readme

    %% Click events
    click BotApp "https://github.com/100x-engineers100/discord_v3/blob/main/bot.py"
    click CommandHandler "https://github.com/100x-engineers100/discord_v3/blob/main/bot.py"
    click Transcription "https://github.com/100x-engineers100/discord_v3/blob/main/bot.py"
    click PPTModule "https://github.com/100x-engineers100/discord_v3/blob/main/bot.py"
    click Scraper "https://github.com/100x-engineers100/discord_v3/blob/main/bot.py"
    click DataStore "https://github.com/100x-engineers100/discord_v3/tree/main/data/"
    click DataFile "https://github.com/100x-engineers100/discord_v3/blob/main/data/file.txt"
    click Procfile "https://github.com/100x-engineers100/discord_v3/tree/main/Procfile"
    click Requirements "https://github.com/100x-engineers100/discord_v3/blob/main/requirements.txt"
    click Readme "https://github.com/100x-engineers100/discord_v3/blob/main/README.md"

    %% Styles
    classDef external fill:#D0E6FF,stroke:#0366D6,stroke-width:1px
    classDef bot fill:#DFFFE0,stroke:#228B22,stroke-width:1px
    classDef storage fill:#FFF4B2,stroke:#DAA520,stroke-width:1px
    classDef config fill:#E2E2E2,stroke:#888888,stroke-width:1px
```
