# flovys/ribbonsave architecture

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

- Interactive diagram: https://gitdiagram.com/flovys/ribbonsave
- Repository: https://github.com/flovys/ribbonsave

## Overview

RibbonSave is a full-stack social-media downloader. A user submits a supported media URL; the React app requests metadata, presents available video, audio, or image options, and sends a selected download request. The backend extracts media information and serves downloadable files, including photo ZIP archives; the browser records completed downloads in localStorage. The README documents support for TikTok, Instagram, X/Twitter, and Facebook, plus carousel previews and bulk downloads. Backend internals are only partially excerpted, so some documented capabilities are shown without speculative internal call links.

Main entry points: [`frontend/src/App.jsx`](https://github.com/flovys/ribbonsave/blob/main/frontend/src/App.jsx) (App orchestration), [`backend/main.py`](https://github.com/flovys/ribbonsave/blob/main/backend/main.py) (File download endpoints), [`frontend/src/components/UrlInputCard.jsx`](https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/UrlInputCard.jsx) (URL submission), [`frontend/src/components/VideoResultCard.jsx`](https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/VideoResultCard.jsx) (Media options and previews)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_app["App orchestration<br/>[App.jsx]"]
  node_url_input["URL submission<br/>[UrlInputCard.jsx]"]
  node_loading["Loading state<br/>[LoadingBow.jsx]"]
  node_result_card["Media options and previews"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_footer["Footer<br/>[Footer.jsx]"]
end

subgraph group_backend["Download API"]
  node_info_api["Metadata endpoint<br/>[main.py]"]
  node_download_api["File download endpoints<br/>[main.py]"]
end

subgraph group_media["Media processing"]
  node_platform_extraction["Platform extraction<br/>[main.py]"]
  node_zip_packaging["Photo ZIP packaging<br/>[main.py]"]
end

subgraph group_history["Download history"]
  node_recent_storage[("Recent-download storage<br/>[App.jsx]")]
  node_recent_view["Recent downloads view"]
end

node_user(("User"))
node_platforms{{"Social platforms"}}
node_browser(("Browser downloads"))

node_user -->|"submits URL"| node_url_input
node_app -->|"renders"| node_url_input
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_footer
node_app -->|"renders"| node_loading
node_app -->|"renders"| node_result_card
node_app -->|"renders"| node_recent_view
node_url_input -->|"submits URL"| node_app
node_app -->|"requests metadata"| node_info_api
node_info_api -->|"extracts media info"| node_platform_extraction
node_platform_extraction -.->|"fetches media"| node_platforms
node_result_card -.->|"requests download"| node_app
node_app -->|"posts download request"| node_download_api
node_download_api -.->|"packages ZIP"| node_zip_packaging
node_download_api -.->|"streams file"| node_browser
node_app -->|"starts browser download"| node_browser
node_app -->|"writes history"| node_recent_storage
node_recent_view -->|"reads history"| node_recent_storage

click node_app "https://github.com/flovys/ribbonsave/blob/main/frontend/src/App.jsx"
click node_url_input "https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/UrlInputCard.jsx"
click node_loading "https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/LoadingBow.jsx"
click node_result_card "https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/VideoResultCard.jsx"
click node_navbar "https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/Navbar.jsx"
click node_footer "https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/Footer.jsx"
click node_info_api "https://github.com/flovys/ribbonsave/blob/main/backend/main.py"
click node_platform_extraction "https://github.com/flovys/ribbonsave/blob/main/backend/main.py"
click node_download_api "https://github.com/flovys/ribbonsave/blob/main/backend/main.py"
click node_zip_packaging "https://github.com/flovys/ribbonsave/blob/main/backend/main.py"
click node_recent_storage "https://github.com/flovys/ribbonsave/blob/main/frontend/src/App.jsx"
click node_recent_view "https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/RecentDownloads.jsx"

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_url_input,node_loading,node_result_card,node_navbar,node_footer,node_user,node_browser toneBlue
class node_info_api,node_download_api toneAmber
class node_platform_extraction,node_zip_packaging toneMint
class node_recent_storage,node_recent_view toneRose
class node_platforms toneIndigo
```

## Components

### Web interface

- [App orchestration](https://github.com/flovys/ribbonsave/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [URL submission](https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/UrlInputCard.jsx): `frontend/src/components/UrlInputCard.jsx`
- [Loading state](https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/LoadingBow.jsx): `frontend/src/components/LoadingBow.jsx`
- [Media options and previews](https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/VideoResultCard.jsx): `frontend/src/components/VideoResultCard.jsx`
- [Navigation](https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [Footer](https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/Footer.jsx): `frontend/src/components/Footer.jsx`

### Download API

- [Metadata endpoint](https://github.com/flovys/ribbonsave/blob/main/backend/main.py): `backend/main.py`
- [File download endpoints](https://github.com/flovys/ribbonsave/blob/main/backend/main.py): `backend/main.py`

### Media processing

- [Platform extraction](https://github.com/flovys/ribbonsave/blob/main/backend/main.py): `backend/main.py`
- [Photo ZIP packaging](https://github.com/flovys/ribbonsave/blob/main/backend/main.py): `backend/main.py`

### Download history

- [Recent-download storage](https://github.com/flovys/ribbonsave/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Recent downloads view](https://github.com/flovys/ribbonsave/blob/main/frontend/src/components/RecentDownloads.jsx): `frontend/src/components/RecentDownloads.jsx`

### Other components

- **User**
- **Social platforms**
- **Browser downloads**

## Connections

- User → URL submission: submits URL (evidence: `frontend/src/components/UrlInputCard.jsx`)
- App orchestration → URL submission: renders (evidence: `frontend/src/App.jsx`)
- App orchestration → Navigation: renders (evidence: `frontend/src/App.jsx`)
- App orchestration → Footer: renders (evidence: `frontend/src/App.jsx`)
- App orchestration → Loading state: renders (evidence: `frontend/src/App.jsx`)
- App orchestration → Media options and previews: renders (evidence: `frontend/src/App.jsx`)
- App orchestration → Recent downloads view: renders (evidence: `frontend/src/App.jsx`)
- URL submission → App orchestration: submits URL (evidence: `frontend/src/App.jsx`)
- App orchestration → Metadata endpoint: requests metadata (evidence: `frontend/src/App.jsx`)
- Metadata endpoint → Platform extraction: extracts media info (evidence: `backend/main.py`)
- Platform extraction → Social platforms: fetches media (evidence: `README.md`)
- Media options and previews → App orchestration: requests download (evidence: `README.md`)
- App orchestration → File download endpoints: posts download request (evidence: `frontend/src/App.jsx`)
- File download endpoints → Photo ZIP packaging: packages ZIP (evidence: `README.md`)
- File download endpoints → Browser downloads: streams file (evidence: `README.md`)
- App orchestration → Browser downloads: starts browser download (evidence: `frontend/src/App.jsx`)
- App orchestration → Recent-download storage: writes history (evidence: `frontend/src/App.jsx`)
- Recent downloads view → Recent-download storage: reads history (evidence: `frontend/src/components/RecentDownloads.jsx`)
