# jatin-mehra119/ai-powered-podcast-to-blog-generator architecture

> Architecture diagram of the GitHub repository jatin-mehra119/ai-powered-podcast-to-blog-generator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jatin-mehra119/ai-powered-podcast-to-blog-generator
- Repository: https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator

## Overview

##### Project Type and Purpose
- This is a full-stack AI-powered content generation application with both a web-based interface and CLI.
- Purpose: Convert podcast audio into blog posts, SEO metadata, FAQs, social posts, newsletters, and quotes by orchestrating a transcription service (Whisper), an LLM API (Groq), and optional web research (Tavily).

##### File-Structure Analysis
- Top-Level Files:
- api.py – FastAPI application entry point
- main.py – CLI entry point
- requirements.txt, Dockerfile, .github/workflows – deployment/configuration
- Directories:
- frontend/ – static HTML, CSS, JS for drag-and-drop UI
- modules/ – core processing logic split into:
– preprocessing.py (audio cleanup + Whisper transcription)
– models.py (abstractions for LLM calls)
– content_generation.py (SEO, FAQ, quotes, social, newsletter)
– generate_blog.py (blog post builder)
- (README mentions output/, temp/, logs/ but they are created at runtime)

##### Key Architecture Insights from README
- Asynchronous processing and real-time progress updates
- Two modes of invocation: HTTP API + web UI, and CLI
- External dependencies: Whisper Large v3 Turbo, Groq API, optional Tavily API

1. User Interfaces
– Web Browser (frontend: index.html, script.js, styles.css)
– Command-Line Client (main.py)
2. API Layer
– FastAPI Server (api.py)
3. Processing Pipeline (modules/)
– Preprocessor (transcription via Whisper)
– Content Generators (blog, SEO, FAQ, social, newsletter, quotes)
– Model Adapters (Groq API calls, optional Tavily lookup)
4. Storage
– Temporary Storage (temp/)
– Output Storage (output/)
– Logs (logs/)
5. External Services
– Whisper Large v3 Turbo
– Groq LLM API
– Optional Tavily Web-Research API

1. User → API Layer: upload audio + options
2. API Layer → Temp Storage: save uploaded file
3. API Layer → Preprocessor → Whisper Service → transcript
4. Preprocessor → Processing Pipeline
5. Pipeline → Groq API (for text generation)
6. Pipeline → Tavily API (optional research)
7. Pipeline → Output Storage (generated assets)
8. API Layer → User: real-time status + download links
9. CLI Client → modules (same pipeline) → local file output

c. Architectural Patterns and Principles:
- Layered Architecture: UI, application/API, domain logic, infrastructure
- Modularization: separate modules for concerns (transcription vs. blog vs. SEO)
- Pluggable Adapters: model.py abstracts LLM & research APIs
- Asynchronous/Background Processing: avoid blocking HTTP requests for long audio jobs

d. Relevant Technologies/Frameworks (annotate each component):
- FastAPI (HTTP server, background tasks)
- Uvicorn (ASGI server)
- Whisper Large v3 Turbo (audio transcription)
- Groq API (LLM for content generation)
- Tavily API (web research)
- HTML/CSS/JavaScript (frontend)
- Python 3.9+, Pydantic (data validation), asyncio (concurrency)

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "User Interfaces"
        HTML["index.html"]:::frontend
        JS["script.js"]:::frontend
        CSS["styles.css"]:::frontend
        CLI["Command-Line Client"]:::ui
    end

    subgraph "API Layer"
        API["FastAPI Server"]:::backend
    end

    subgraph "Processing Pipeline"
        Pre["Preprocessor"]:::backend
        Models["Model Adapters"]:::backend
        Content["Content Generators"]:::backend
        Blog["Blog Post Builder"]:::backend
    end

    subgraph "Storage"
        Temp["Temp Storage"]:::storage
        Output["Output Storage"]:::storage
        Logs["Logs"]:::storage
    end

    subgraph "External Services"
        Whisper["Whisper Large v3 Turbo"]:::external
        Groq["Groq LLM API"]:::external
        Tavily["Tavily Web-Research API"]:::external
    end

    subgraph "Deployment & Configuration"
        Req["requirements.txt"]:::config
        Docker["Dockerfile"]:::config
        Workflow[".github/workflows/sync_to_hf.yaml"]:::config
    end

    HTML -->|"POST /upload"| API
    JS -->|"coordinates upload"| API
    CSS -->|"styles UI"| HTML
    CLI -->|"invoke pipeline"| Pre

    API -->|"save audio"| Temp
    API -->|"enqueue job"| Pre
    API -->|"real-time updates"| HTML
    API -->|"download links"| HTML

    Pre -->|"transcript request"| Whisper
    Whisper -->|"transcript JSON"| Pre
    Pre -->|"clean transcript"| Models
    Models -->|"LLM Generation"| Groq
    Models -->|"optional research"| Tavily
    Models -->|"structured data"| Content
    Content -->|"generate assets"| Output
    Content -->|"build blog"| Blog
    Blog -->|"blog post MD"| Output

    CLI -->|"generate files"| Output

    classDef frontend fill:#f2f2f2,stroke:#666;color:#000
    classDef ui fill:#d9d9d9,stroke:#666;color:#000
    classDef backend fill:#cce5ff,stroke:#339;color:#000
    classDef storage fill:#ccffcc,stroke:#393;color:#000
    classDef external fill:#ffddb3,stroke:#f90;color:#000
    classDef config fill:#e0e0e0,stroke:#666,color:#000

    click HTML "https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator/blob/main/frontend/index.html"
    click JS "https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator/blob/main/frontend/js/script.js"
    click CSS "https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator/blob/main/frontend/css/styles.css"
    click CLI "https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator/blob/main/main.py"
    click API "https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator/blob/main/api.py"
    click Pre "https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator/blob/main/modules/preprocessing.py"
    click Models "https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator/blob/main/modules/models.py"
    click Content "https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator/blob/main/modules/content_generation.py"
    click Blog "https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator/blob/main/modules/generate_blog.py"
    click Req "https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator/blob/main/requirements.txt"
    click Docker "https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator/tree/main/Dockerfile"
    click Workflow "https://github.com/jatin-mehra119/ai-powered-podcast-to-blog-generator/blob/main/.github/workflows/sync_to_hf.yaml"
```
