# xixihhhh/hotclip architecture

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

- Interactive diagram: https://gitdiagram.com/xixihhhh/hotclip
- Repository: https://github.com/xixihhhh/hotclip

## Overview

HotClip is a local-first desktop and headless tool for turning long videos, livestreams, and audio into reviewed vertical short clips. The main workflow imports media, transcribes or imports subtitles, gathers evidence for AI highlight selection, lets users review candidates, then renders and packages selected clips for publishing. The graph includes documented project persistence and unattended recording workflows. Source excerpts confirm the shared pipeline’s transcription, evidence collection, and export calls; several other capabilities are represented from the README and tree, with uncertain internal wiring omitted.

Main entry points: [`src/core/pipeline.ts`](https://github.com/xixihhhh/hotclip/blob/main/src/core/pipeline.ts) (Shared Pipeline), [`src/main/index.ts`](https://github.com/xixihhhh/hotclip/blob/main/src/main/index.ts) (Electron Main), [`src/renderer/src/App.tsx`](https://github.com/xixihhhh/hotclip/blob/main/src/renderer/src/App.tsx) (Desktop UI), [`src/core/export.ts`](https://github.com/xixihhhh/hotclip/blob/main/src/core/export.ts) (Clip Export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User Interfaces"]
  node_desktop["Desktop UI<br/>[App.tsx]"]
  node_bridge["Typed IPC<br/>[index.ts]"]
  node_main["Electron Main<br/>[index.ts]"]
  node_cli["Headless CLI<br/>[index.ts]"]
  node_mcp["MCP Server<br/>[server.ts]"]
end

subgraph group_workflow["Clip Workflow"]
  node_media["Media Import<br/>[url-import.ts]"]
  node_pipeline["Shared Pipeline<br/>[pipeline.ts]"]
  node_transcribe["Speech Engines<br/>[types.ts]"]
  node_subtitle["Subtitle Import<br/>[subtitle-import.ts]"]
  node_evidence["Media Evidence<br/>[media-evidence.ts]"]
  node_highlights["Highlight Detection<br/>[detect.ts]"]
  node_review["Candidate Review"]
end

subgraph group_render["Creation and Publishing"]
  node_export["Clip Export<br/>[export.ts]"]
  node_reframe["Vertical Reframe<br/>[index.ts]"]
  node_publish["Publish Packages<br/>[publish-pack.ts]"]
end

subgraph group_state["Projects and Automation"]
  node_projects[("Project Workspace")]
  node_watch["Recording Watch<br/>[watch.ts]"]
  node_webhook["Recorder Webhook<br/>[webhook.ts]"]
end

subgraph group_integrations["External Interfaces"]
  node_recorders(("Recorder Apps"))
  node_llm(("LLM Service"))
  node_mediafiles["Local Media"]
end

node_user(("Creator"))

node_user -->|"selects media"| node_desktop
node_desktop -->|"invokes API"| node_bridge
node_bridge -->|"sends IPC"| node_main
node_main -->|"imports URL"| node_media
node_main -->|"requests analysis"| node_pipeline
node_cli -->|"runs workflow"| node_pipeline
node_mcp -->|"runs workflow"| node_pipeline
node_mediafiles -->|"provides media"| node_pipeline
node_pipeline -->|"transcribes media"| node_transcribe
node_pipeline -->|"imports subtitles"| node_subtitle
node_pipeline -->|"collects signals"| node_evidence
node_pipeline -->|"detects clips"| node_highlights
node_pipeline -->|"exports selected clips"| node_export
node_desktop -->|"reviews candidates"| node_review
node_review -->|"requests preview data"| node_bridge
node_main -->|"saves projects"| node_projects
node_recorders -.->|"writes recordings"| node_watch
node_recorders -.->|"sends completion"| node_webhook
node_watch -->|"starts clipping"| node_pipeline
node_webhook -->|"starts clipping"| node_pipeline
node_export -->|"renders vertical"| node_reframe
node_export -->|"prepares packages"| node_publish
node_pipeline -.->|"requests selection"| node_llm

click node_desktop "https://github.com/xixihhhh/hotclip/blob/main/src/renderer/src/App.tsx"
click node_bridge "https://github.com/xixihhhh/hotclip/blob/main/src/preload/index.ts"
click node_main "https://github.com/xixihhhh/hotclip/blob/main/src/main/index.ts"
click node_cli "https://github.com/xixihhhh/hotclip/blob/main/src/cli/index.ts"
click node_mcp "https://github.com/xixihhhh/hotclip/blob/main/src/mcp/server.ts"
click node_media "https://github.com/xixihhhh/hotclip/blob/main/src/core/url-import.ts"
click node_pipeline "https://github.com/xixihhhh/hotclip/blob/main/src/core/pipeline.ts"
click node_transcribe "https://github.com/xixihhhh/hotclip/blob/main/src/core/transcribe/types.ts"
click node_subtitle "https://github.com/xixihhhh/hotclip/blob/main/src/core/subtitle-import.ts"
click node_evidence "https://github.com/xixihhhh/hotclip/blob/main/src/core/media-evidence.ts"
click node_highlights "https://github.com/xixihhhh/hotclip/blob/main/src/core/highlight/detect.ts"
click node_review "https://github.com/xixihhhh/hotclip/blob/main/src/renderer/src/components/ClipReviewModal.tsx"
click node_projects "https://github.com/xixihhhh/hotclip/blob/main/src/core/project-workspace.ts"
click node_watch "https://github.com/xixihhhh/hotclip/blob/main/src/core/watch.ts"
click node_webhook "https://github.com/xixihhhh/hotclip/blob/main/src/core/webhook.ts"
click node_export "https://github.com/xixihhhh/hotclip/blob/main/src/core/export.ts"
click node_reframe "https://github.com/xixihhhh/hotclip/blob/main/src/core/reframe/index.ts"
click node_publish "https://github.com/xixihhhh/hotclip/blob/main/src/core/publish-pack.ts"

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_desktop,node_bridge,node_main,node_cli,node_mcp toneBlue
class node_media,node_pipeline,node_transcribe,node_subtitle,node_evidence,node_highlights,node_review toneAmber
class node_export,node_reframe,node_publish toneMint
class node_projects,node_watch,node_webhook toneRose
class node_recorders,node_llm,node_mediafiles,node_user toneIndigo
```

## Components

### User Interfaces

- [Desktop UI](https://github.com/xixihhhh/hotclip/blob/main/src/renderer/src/App.tsx): `src/renderer/src/App.tsx`
- [Typed IPC](https://github.com/xixihhhh/hotclip/blob/main/src/preload/index.ts): `src/preload/index.ts`
- [Electron Main](https://github.com/xixihhhh/hotclip/blob/main/src/main/index.ts): `src/main/index.ts`
- [Headless CLI](https://github.com/xixihhhh/hotclip/blob/main/src/cli/index.ts): `src/cli/index.ts`
- [MCP Server](https://github.com/xixihhhh/hotclip/blob/main/src/mcp/server.ts): `src/mcp/server.ts`

### Clip Workflow

- [Media Import](https://github.com/xixihhhh/hotclip/blob/main/src/core/url-import.ts): `src/core/url-import.ts`
- [Shared Pipeline](https://github.com/xixihhhh/hotclip/blob/main/src/core/pipeline.ts): `src/core/pipeline.ts`
- [Speech Engines](https://github.com/xixihhhh/hotclip/blob/main/src/core/transcribe/types.ts): `src/core/transcribe/types.ts`
- [Subtitle Import](https://github.com/xixihhhh/hotclip/blob/main/src/core/subtitle-import.ts): `src/core/subtitle-import.ts`
- [Media Evidence](https://github.com/xixihhhh/hotclip/blob/main/src/core/media-evidence.ts): `src/core/media-evidence.ts`
- [Highlight Detection](https://github.com/xixihhhh/hotclip/blob/main/src/core/highlight/detect.ts): `src/core/highlight/detect.ts`
- [Candidate Review](https://github.com/xixihhhh/hotclip/blob/main/src/renderer/src/components/ClipReviewModal.tsx): `src/renderer/src/components/ClipReviewModal.tsx`

### Creation and Publishing

- [Clip Export](https://github.com/xixihhhh/hotclip/blob/main/src/core/export.ts): `src/core/export.ts`
- [Vertical Reframe](https://github.com/xixihhhh/hotclip/blob/main/src/core/reframe/index.ts): `src/core/reframe/index.ts`
- [Publish Packages](https://github.com/xixihhhh/hotclip/blob/main/src/core/publish-pack.ts): `src/core/publish-pack.ts`

### Projects and Automation

- [Project Workspace](https://github.com/xixihhhh/hotclip/blob/main/src/core/project-workspace.ts): `src/core/project-workspace.ts`
- [Recording Watch](https://github.com/xixihhhh/hotclip/blob/main/src/core/watch.ts): `src/core/watch.ts`
- [Recorder Webhook](https://github.com/xixihhhh/hotclip/blob/main/src/core/webhook.ts): `src/core/webhook.ts`

### External Interfaces

- **Recorder Apps**
- **LLM Service**
- **Local Media**

### Other components

- **Creator**

## Connections

- Creator → Desktop UI: selects media
- Desktop UI → Typed IPC: invokes API
- Typed IPC → Electron Main: sends IPC
- Electron Main → Media Import: imports URL
- Electron Main → Shared Pipeline: requests analysis
- Headless CLI → Shared Pipeline: runs workflow
- MCP Server → Shared Pipeline: runs workflow
- Local Media → Shared Pipeline: provides media
- Shared Pipeline → Speech Engines: transcribes media
- Shared Pipeline → Subtitle Import: imports subtitles
- Shared Pipeline → Media Evidence: collects signals
- Shared Pipeline → Highlight Detection: detects clips
- Shared Pipeline → Clip Export: exports selected clips
- Desktop UI → Candidate Review: reviews candidates
- Candidate Review → Typed IPC: requests preview data
- Electron Main → Project Workspace: saves projects
- Recorder Apps → Recording Watch: writes recordings
- Recorder Apps → Recorder Webhook: sends completion
- Recording Watch → Shared Pipeline: starts clipping
- Recorder Webhook → Shared Pipeline: starts clipping
- Clip Export → Vertical Reframe: renders vertical
- Clip Export → Publish Packages: prepares packages
- Shared Pipeline → LLM Service: requests selection
