# openclaw-easy/viralmint architecture

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

- Interactive diagram: https://gitdiagram.com/openclaw-easy/viralmint
- Repository: https://github.com/openclaw-easy/viralmint

## Overview

ViralMint is a local-first creator video pipeline: users discover trends or bring in source footage, analyze and clip it or generate/design a video, then refine and organize outputs. The browser app talks to a FastAPI backend; agents and task runners coordinate work, with local media services, provider integrations, and SQLite-backed state underneath. The README documents major capabilities that were not sampled in source, so those links cite the README; unsampled implementation details are not inferred.

Main entry points: [`backend/core/task_runner.py`](https://github.com/openclaw-easy/viralmint/blob/main/backend/core/task_runner.py) (Task runner), [`frontend/src/App.jsx`](https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/App.jsx) (Web app), [`backend/agents/planner.py`](https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/planner.py) (Planner agent), [`backend/agents/generator.py`](https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/generator.py) (Video generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Creator experience"]
  node_webapp["Web app<br/>[App.jsx]"]
  node_chatui["Chat interface<br/>[Chat.jsx]"]
  node_clipui["Clip Studio<br/>[ClipStudio.jsx]"]
  node_toolui["Editing tools<br/>[Tools.jsx]"]
  node_libraryui["Media library<br/>[Library.jsx]"]
  node_messagingui["Messaging<br/>[Messaging.jsx]"]
end

subgraph group_orchestration["Workflow orchestration"]
  node_api["FastAPI routes<br/>[main.py]"]
  node_planner["Planner agent<br/>[planner.py]"]
  node_taskrunner["Task runner<br/>[task_runner.py]"]
  node_jobhelper["Job tracking<br/>[job_helper.py]"]
  node_ws["Live updates<br/>[ws_manager.py]"]
end

subgraph group_media["Media production"]
  node_clipper["Clip extraction<br/>[clip_extractor.py]"]
  node_generator["Video generation<br/>[generator.py]"]
  node_captions["Caption rendering<br/>[caption_service.py]"]
  node_ffmpeg["Media processing<br/>[ffmpeg_service.py]"]
  node_motion["Motion graphics<br/>[studio_service.py]"]
  node_tools["Tool runners<br/>[tool_runners.py]"]
end

subgraph group_discovery["Discovery and analysis"]
  node_scout["Trend scouting<br/>[scout.py]"]
  node_analyzer["Video analysis<br/>[analyzer.py]"]
  node_downloader["Source downloader<br/>[downloader.py]"]
end

subgraph group_state["State and integrations"]
  node_library["Library index<br/>[library_index.py]"]
  node_database[("SQLite data<br/>[database.py]")]
  node_ai["AI providers<br/>[ai_provider.py]"]
  node_messaging["Channel adapters<br/>[manager.py]"]
end

node_creator(("Creator"))
node_platforms{{"Video platforms"}}
node_localmedia{{"Local media tools"}}

node_creator -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_chatui
node_webapp -->|"routes to"| node_clipui
node_webapp -->|"routes to"| node_toolui
node_webapp -->|"routes to"| node_libraryui
node_webapp -->|"routes to"| node_messagingui
node_chatui -.->|"requests work"| node_api
node_api -.->|"dispatches chat"| node_planner
node_planner -->|"runs tasks"| node_taskrunner
node_taskrunner -->|"dispatches"| node_scout
node_taskrunner -->|"dispatches"| node_downloader
node_taskrunner -->|"dispatches"| node_analyzer
node_clipui -->|"requests clips"| node_clipper
node_downloader -->|"downloads from"| node_platforms
node_scout -->|"discovers trends"| node_platforms
node_analyzer -->|"transcribes with"| node_localmedia
node_taskrunner -->|"dispatches"| node_generator
node_generator -->|"renders captions"| node_captions
node_generator -->|"processes video"| node_ffmpeg
node_motion -->|"renders locally"| node_localmedia
node_toolui -->|"runs tools"| node_tools
node_tools -->|"uses processing"| node_ffmpeg
node_taskrunner -->|"updates jobs"| node_jobhelper
node_jobhelper -->|"writes status"| node_database
node_taskrunner -->|"sends progress"| node_ws
node_ws -.->|"streams updates"| node_chatui
node_libraryui -.->|"loads assets"| node_library
node_library -.->|"indexes state"| node_database
node_planner -->|"requests AI"| node_ai
node_messagingui -->|"commands planner"| node_messaging
node_messaging -.->|"forwards commands"| node_planner
node_messaging -->|"sends alerts"| node_creator

click node_webapp "https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/App.jsx"
click node_chatui "https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/pages/Chat.jsx"
click node_clipui "https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/pages/ClipStudio.jsx"
click node_toolui "https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/pages/Tools.jsx"
click node_libraryui "https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/pages/Library.jsx"
click node_messagingui "https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/pages/Messaging.jsx"
click node_api "https://github.com/openclaw-easy/viralmint/blob/main/backend/main.py"
click node_planner "https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/planner.py"
click node_taskrunner "https://github.com/openclaw-easy/viralmint/blob/main/backend/core/task_runner.py"
click node_jobhelper "https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/job_helper.py"
click node_ws "https://github.com/openclaw-easy/viralmint/blob/main/backend/core/ws_manager.py"
click node_scout "https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/scout.py"
click node_analyzer "https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/analyzer.py"
click node_downloader "https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/downloader.py"
click node_clipper "https://github.com/openclaw-easy/viralmint/blob/main/backend/services/clip_extractor.py"
click node_generator "https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/generator.py"
click node_captions "https://github.com/openclaw-easy/viralmint/blob/main/backend/services/caption_service.py"
click node_ffmpeg "https://github.com/openclaw-easy/viralmint/blob/main/backend/services/ffmpeg_service.py"
click node_motion "https://github.com/openclaw-easy/viralmint/blob/main/backend/services/studio_service.py"
click node_tools "https://github.com/openclaw-easy/viralmint/blob/main/backend/core/tool_runners.py"
click node_library "https://github.com/openclaw-easy/viralmint/blob/main/backend/services/library_index.py"
click node_database "https://github.com/openclaw-easy/viralmint/blob/main/backend/database.py"
click node_ai "https://github.com/openclaw-easy/viralmint/blob/main/backend/core/ai_provider.py"
click node_messaging "https://github.com/openclaw-easy/viralmint/blob/main/backend/messaging/manager.py"

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_webapp,node_chatui,node_clipui,node_toolui,node_libraryui,node_messagingui toneBlue
class node_api,node_planner,node_taskrunner,node_jobhelper,node_ws toneAmber
class node_clipper,node_generator,node_captions,node_ffmpeg,node_motion,node_tools toneMint
class node_scout,node_analyzer,node_downloader toneRose
class node_library,node_database,node_ai,node_messaging,node_creator,node_platforms,node_localmedia toneIndigo
```

## Components

### Creator experience

- [Web app](https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Chat interface](https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/pages/Chat.jsx): `frontend/src/pages/Chat.jsx`
- [Clip Studio](https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/pages/ClipStudio.jsx): `frontend/src/pages/ClipStudio.jsx`
- [Editing tools](https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/pages/Tools.jsx): `frontend/src/pages/Tools.jsx`
- [Media library](https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/pages/Library.jsx): `frontend/src/pages/Library.jsx`
- [Messaging](https://github.com/openclaw-easy/viralmint/blob/main/frontend/src/pages/Messaging.jsx): `frontend/src/pages/Messaging.jsx`

### Workflow orchestration

- [FastAPI routes](https://github.com/openclaw-easy/viralmint/blob/main/backend/main.py): `backend/main.py`
- [Planner agent](https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/planner.py): `backend/agents/planner.py`
- [Task runner](https://github.com/openclaw-easy/viralmint/blob/main/backend/core/task_runner.py): `backend/core/task_runner.py`
- [Job tracking](https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/job_helper.py): `backend/agents/job_helper.py`
- [Live updates](https://github.com/openclaw-easy/viralmint/blob/main/backend/core/ws_manager.py): `backend/core/ws_manager.py`

### Media production

- [Clip extraction](https://github.com/openclaw-easy/viralmint/blob/main/backend/services/clip_extractor.py): `backend/services/clip_extractor.py`
- [Video generation](https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/generator.py): `backend/agents/generator.py`
- [Caption rendering](https://github.com/openclaw-easy/viralmint/blob/main/backend/services/caption_service.py): `backend/services/caption_service.py`
- [Media processing](https://github.com/openclaw-easy/viralmint/blob/main/backend/services/ffmpeg_service.py): `backend/services/ffmpeg_service.py`
- [Motion graphics](https://github.com/openclaw-easy/viralmint/blob/main/backend/services/studio_service.py): `backend/services/studio_service.py`
- [Tool runners](https://github.com/openclaw-easy/viralmint/blob/main/backend/core/tool_runners.py): `backend/core/tool_runners.py`

### Discovery and analysis

- [Trend scouting](https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/scout.py): `backend/agents/scout.py`
- [Video analysis](https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/analyzer.py): `backend/agents/analyzer.py`
- [Source downloader](https://github.com/openclaw-easy/viralmint/blob/main/backend/agents/downloader.py): `backend/agents/downloader.py`

### State and integrations

- [Library index](https://github.com/openclaw-easy/viralmint/blob/main/backend/services/library_index.py): `backend/services/library_index.py`
- [SQLite data](https://github.com/openclaw-easy/viralmint/blob/main/backend/database.py): `backend/database.py`
- [AI providers](https://github.com/openclaw-easy/viralmint/blob/main/backend/core/ai_provider.py): `backend/core/ai_provider.py`
- [Channel adapters](https://github.com/openclaw-easy/viralmint/blob/main/backend/messaging/manager.py): `backend/messaging/manager.py`

### Other components

- **Creator**
- **Video platforms**
- **Local media tools**

## Connections

- Creator → Web app: uses (evidence: `README.md`)
- Web app → Chat interface: routes to (evidence: `frontend/src/App.jsx`)
- Web app → Clip Studio: routes to (evidence: `frontend/src/App.jsx`)
- Web app → Editing tools: routes to (evidence: `frontend/src/App.jsx`)
- Web app → Media library: routes to (evidence: `frontend/src/App.jsx`)
- Web app → Messaging: routes to (evidence: `frontend/src/App.jsx`)
- Chat interface → FastAPI routes: requests work
- FastAPI routes → Planner agent: dispatches chat (evidence: `backend/main.py`)
- Planner agent → Task runner: runs tasks (evidence: `backend/agents/planner.py`)
- Task runner → Trend scouting: dispatches (evidence: `backend/core/task_runner.py`)
- Task runner → Source downloader: dispatches (evidence: `backend/core/task_runner.py`)
- Task runner → Video analysis: dispatches (evidence: `backend/core/task_runner.py`)
- Clip Studio → Clip extraction: requests clips (evidence: `README.md`)
- Source downloader → Video platforms: downloads from (evidence: `README.md`)
- Trend scouting → Video platforms: discovers trends (evidence: `README.md`)
- Video analysis → Local media tools: transcribes with (evidence: `README.md`)
- Task runner → Video generation: dispatches (evidence: `backend/core/task_runner.py`)
- Video generation → Caption rendering: renders captions (evidence: `backend/agents/generator.py`)
- Video generation → Media processing: processes video (evidence: `backend/agents/generator.py`)
- Motion graphics → Local media tools: renders locally (evidence: `README.md`)
- Editing tools → Tool runners: runs tools (evidence: `README.md`)
- Tool runners → Media processing: uses processing (evidence: `backend/core/tool_runners.py`)
- Task runner → Job tracking: updates jobs (evidence: `backend/core/task_runner.py`)
- Job tracking → SQLite data: writes status (evidence: `backend/agents/job_helper.py`)
- Task runner → Live updates: sends progress (evidence: `backend/core/task_runner.py`)
- Live updates → Chat interface: streams updates
- Media library → Library index: loads assets
- Library index → SQLite data: indexes state
- Planner agent → AI providers: requests AI (evidence: `backend/agents/planner.py`)
- Messaging → Channel adapters: commands planner (evidence: `README.md`)
- Channel adapters → Planner agent: forwards commands
- Channel adapters → Creator: sends alerts (evidence: `README.md`)
