# mansi-upadhyay-12/ai-powered-summarizer architecture

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

- Interactive diagram: https://gitdiagram.com/mansi-upadhyay-12/ai-powered-summarizer
- Repository: https://github.com/mansi-upadhyay-12/ai-powered-summarizer

## Overview

The README describes a single-page summarizer supporting plain text, YouTube transcripts, and PDFs, with selectable summary detail. It documents client-side extraction, a serverless Groq request, and rendering in the UI. The supplied file tree omits the documented `src/` and `api/` files, so those nodes have null paths; relationships below are based on README statements, not inspected implementation excerpts.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Input handling"]
  node_text["Plain text input"]
  node_youtube["YouTube input"]
  node_transcript["Transcript fetch"]
  node_pdf["PDF extraction"]
end

subgraph group_app["Summarization app"]
  node_app["React frontend"]
  node_length["Length selection"]
  node_api["Summarize function"]
  node_renderer["Summary renderer"]
end

subgraph group_services["External services"]
  node_groq["Groq API"]
  node_transcript_service["Transcript API"]
end

node_user(("User"))

node_user -->|"submits input"| node_app
node_app -->|"accepts text"| node_text
node_app -->|"accepts URL"| node_youtube
node_youtube -->|"fetches captions"| node_transcript
node_transcript -->|"requests transcript"| node_transcript_service
node_app -->|"extracts text"| node_pdf
node_user -->|"selects length"| node_length
node_app -->|"posts input"| node_api
node_api -->|"forwards request"| node_groq
node_groq -->|"returns summary"| node_api
node_api -->|"returns response"| node_app
node_app -->|"renders summary"| node_renderer

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_text,node_youtube,node_transcript,node_pdf,node_user toneBlue
class node_app,node_length,node_api,node_renderer toneAmber
class node_groq,node_transcript_service toneMint
```

## Components

### Input handling

- **Plain text input**
- **YouTube input**
- **Transcript fetch**
- **PDF extraction**

### Summarization app

- **React frontend**
- **Length selection**
- **Summarize function**
- **Summary renderer**

### External services

- **Groq API**
- **Transcript API**

### Other components

- **User**

## Connections

- User → React frontend: submits input (evidence: `README.md`)
- React frontend → Plain text input: accepts text (evidence: `README.md`)
- React frontend → YouTube input: accepts URL (evidence: `README.md`)
- YouTube input → Transcript fetch: fetches captions (evidence: `README.md`)
- Transcript fetch → Transcript API: requests transcript (evidence: `README.md`)
- React frontend → PDF extraction: extracts text (evidence: `README.md`)
- User → Length selection: selects length (evidence: `README.md`)
- React frontend → Summarize function: posts input (evidence: `README.md`)
- Summarize function → Groq API: forwards request (evidence: `README.md`)
- Groq API → Summarize function: returns summary (evidence: `README.md`)
- Summarize function → React frontend: returns response (evidence: `README.md`)
- React frontend → Summary renderer: renders summary (evidence: `README.md`)
