# arpan-jain-2006/clipy architecture

> Architecture diagram of the GitHub repository arpan-jain-2006/clipy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arpan-jain-2006/clipy
- Repository: https://github.com/arpan-jain-2006/clipy

## Overview

Clipy combines a desktop recorder with local transcription and moment extraction, producing shareable and agent-readable recordings. The principal flow is user-selected capture through native recording, transcript and moment processing, then local export or cloud sharing. The graph retains documented AI/video-ingestion and agent integrations, but sampled evidence is limited; unsampled feature links are omitted rather than inferred.

Main entry points: [`desktop/src-tauri/src/local/mod.rs`](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/src/local/mod.rs) (Local runtime), [`desktop/src/lib/bridge.ts`](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/lib/bridge.ts) (Native bridge), [`desktop/src-tauri/src/commands.rs`](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/src/commands.rs) (Native commands), [`desktop/src-tauri/src/recording.rs`](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/src/recording.rs) (Recording runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop experience"]
  node_app["App routes<br/>[App.tsx]"]
  node_home["Recording setup<br/>[Home.tsx]"]
  node_settings["Recorder settings<br/>[SettingsSheet.tsx]"]
  node_bridge["Native bridge<br/>[bridge.ts]"]
  node_localui["Local preferences"]
end

subgraph group_capture["Capture and recording"]
  node_commands["Native commands<br/>[commands.rs]"]
  node_recording["Recording runtime<br/>[recording.rs]"]
  node_capturekit["Capture engine<br/>[capture.ts]"]
  node_ffmpeg["FFmpeg arguments<br/>[ffmpegArgs.ts]"]
  node_cursor["Cursor tracking<br/>[cursor_track.rs]"]
end

subgraph group_local["Local intelligence"]
  node_localapi["Local runtime<br/>[mod.rs]"]
  node_stt["Local speech recognition<br/>[engine.rs]"]
  node_audio["Audio preparation<br/>[audio.rs]"]
  node_config["Local configuration<br/>[index.ts]"]
  node_moments["Moment planning<br/>[index.ts]"]
  node_model["Model provider<br/>[llm.ts]"]
end

subgraph group_output["Recording outputs"]
  node_arec["AREC handoff<br/>[transcript.rs]"]
  node_share["Share destination"]
  node_viewer["Recording viewer<br/>[Viewer.tsx]"]
end

subgraph group_agent["Agent integrations"]
  node_video["Video or screen"]
  node_watch["Watch workflow"]
  node_plugin["Record plugin<br/>[register.tsx]"]
end

node_person(("Recorder"))
node_agent(("AI agent"))

node_person -->|"uses"| node_app
node_app -->|"routes to"| node_home
node_home -->|"requests capture"| node_bridge
node_settings -->|"updates settings"| node_bridge
node_bridge -->|"invokes"| node_commands
node_commands -.->|"dispatches"| node_recording
node_recording -.->|"captures media"| node_capturekit
node_capturekit -->|"builds arguments"| node_ffmpeg
node_recording -.->|"tracks pointer"| node_cursor
node_commands -->|"dispatches local"| node_localapi
node_localapi -.->|"runs transcription"| node_stt
node_stt -->|"processes audio"| node_audio
node_localui -->|"configures"| node_config
node_localapi -.->|"plans moments"| node_moments
node_moments -->|"requests model"| node_model
node_localapi -.->|"builds handoff"| node_arec
node_arec -->|"provides context"| node_agent
node_localapi -.->|"offers destination"| node_share
node_share -.->|"opens recording"| node_viewer
node_video -->|"submits video"| node_watch
node_watch -->|"returns context"| node_agent
node_plugin -.->|"starts recording"| node_bridge
node_person -->|"initiates"| node_plugin

click node_app "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/App.tsx"
click node_home "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/routes/Home.tsx"
click node_settings "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/components/recorder/SettingsSheet.tsx"
click node_bridge "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/lib/bridge.ts"
click node_commands "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/src/commands.rs"
click node_recording "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/src/recording.rs"
click node_capturekit "https://github.com/arpan-jain-2006/clipy/blob/main/packages/capture/src/capture.ts"
click node_ffmpeg "https://github.com/arpan-jain-2006/clipy/blob/main/packages/capture/src/ffmpegArgs.ts"
click node_cursor "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/src/cursor_track.rs"
click node_localapi "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/src/local/mod.rs"
click node_stt "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/crates/clipy-local-stt/src/engine.rs"
click node_audio "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/crates/clipy-local-stt/src/audio.rs"
click node_config "https://github.com/arpan-jain-2006/clipy/blob/main/packages/config/src/index.ts"
click node_moments "https://github.com/arpan-jain-2006/clipy/blob/main/packages/moments/src/index.ts"
click node_model "https://github.com/arpan-jain-2006/clipy/blob/main/packages/moments/src/llm.ts"
click node_localui "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/edition-local/LocalPreferences.tsx"
click node_arec "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/crates/clipy-local-edition/src/transcript.rs"
click node_share "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/edition-local/LocalDestination.tsx"
click node_viewer "https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/routes/Viewer.tsx"
click node_plugin "https://github.com/arpan-jain-2006/clipy/blob/main/plugins/clipy-record/hooks/register.tsx"

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_home,node_settings,node_bridge,node_localui toneBlue
class node_commands,node_recording,node_capturekit,node_ffmpeg,node_cursor toneAmber
class node_localapi,node_stt,node_audio,node_config,node_moments,node_model toneMint
class node_arec,node_share,node_viewer toneRose
class node_video,node_watch,node_plugin,node_person,node_agent toneIndigo
```

## Components

### Desktop experience

- [App routes](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/App.tsx): `desktop/src/App.tsx`
- [Recording setup](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/routes/Home.tsx): `desktop/src/routes/Home.tsx`
- [Recorder settings](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/components/recorder/SettingsSheet.tsx): `desktop/src/components/recorder/SettingsSheet.tsx`
- [Native bridge](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/lib/bridge.ts): `desktop/src/lib/bridge.ts`
- [Local preferences](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/edition-local/LocalPreferences.tsx): `desktop/src/edition-local/LocalPreferences.tsx`

### Capture and recording

- [Native commands](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/src/commands.rs): `desktop/src-tauri/src/commands.rs`
- [Recording runtime](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/src/recording.rs): `desktop/src-tauri/src/recording.rs`
- [Capture engine](https://github.com/arpan-jain-2006/clipy/blob/main/packages/capture/src/capture.ts): `packages/capture/src/capture.ts`
- [FFmpeg arguments](https://github.com/arpan-jain-2006/clipy/blob/main/packages/capture/src/ffmpegArgs.ts): `packages/capture/src/ffmpegArgs.ts`
- [Cursor tracking](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/src/cursor_track.rs): `desktop/src-tauri/src/cursor_track.rs`

### Local intelligence

- [Local runtime](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/src/local/mod.rs): `desktop/src-tauri/src/local/mod.rs`
- [Local speech recognition](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/crates/clipy-local-stt/src/engine.rs): `desktop/src-tauri/crates/clipy-local-stt/src/engine.rs`
- [Audio preparation](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/crates/clipy-local-stt/src/audio.rs): `desktop/src-tauri/crates/clipy-local-stt/src/audio.rs`
- [Local configuration](https://github.com/arpan-jain-2006/clipy/blob/main/packages/config/src/index.ts): `packages/config/src/index.ts`
- [Moment planning](https://github.com/arpan-jain-2006/clipy/blob/main/packages/moments/src/index.ts): `packages/moments/src/index.ts`
- [Model provider](https://github.com/arpan-jain-2006/clipy/blob/main/packages/moments/src/llm.ts): `packages/moments/src/llm.ts`

### Recording outputs

- [AREC handoff](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src-tauri/crates/clipy-local-edition/src/transcript.rs): `desktop/src-tauri/crates/clipy-local-edition/src/transcript.rs`
- [Share destination](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/edition-local/LocalDestination.tsx): `desktop/src/edition-local/LocalDestination.tsx`
- [Recording viewer](https://github.com/arpan-jain-2006/clipy/blob/main/desktop/src/routes/Viewer.tsx): `desktop/src/routes/Viewer.tsx`

### Agent integrations

- **Video or screen**
- **Watch workflow**
- [Record plugin](https://github.com/arpan-jain-2006/clipy/blob/main/plugins/clipy-record/hooks/register.tsx): `plugins/clipy-record/hooks/register.tsx`

### Other components

- **Recorder**
- **AI agent**

## Connections

- Recorder → App routes: uses (evidence: `README.md`)
- App routes → Recording setup: routes to (evidence: `desktop/src/App.tsx`)
- Recording setup → Native bridge: requests capture (evidence: `desktop/src/routes/Home.tsx`)
- Recorder settings → Native bridge: updates settings (evidence: `desktop/src/components/recorder/SettingsSheet.tsx`)
- Native bridge → Native commands: invokes (evidence: `desktop/src/lib/bridge.ts`)
- Native commands → Recording runtime: dispatches
- Recording runtime → Capture engine: captures media
- Capture engine → FFmpeg arguments: builds arguments (evidence: `packages/capture/src/capture.ts`)
- Recording runtime → Cursor tracking: tracks pointer
- Native commands → Local runtime: dispatches local (evidence: `desktop/src-tauri/src/local/mod.rs`)
- Local runtime → Local speech recognition: runs transcription
- Local speech recognition → Audio preparation: processes audio (evidence: `desktop/src-tauri/crates/clipy-local-stt/src/engine.rs`)
- Local preferences → Local configuration: configures (evidence: `desktop/src/edition-local/LocalPreferences.tsx`)
- Local runtime → Moment planning: plans moments
- Moment planning → Model provider: requests model (evidence: `packages/moments/src/index.ts`)
- Local runtime → AREC handoff: builds handoff
- AREC handoff → AI agent: provides context (evidence: `README.md`)
- Local runtime → Share destination: offers destination
- Share destination → Recording viewer: opens recording
- Video or screen → Watch workflow: submits video (evidence: `README.md`)
- Watch workflow → AI agent: returns context (evidence: `README.md`)
- Record plugin → Native bridge: starts recording
- Recorder → Record plugin: initiates (evidence: `README.md`)
