# vskavi/clipy architecture

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

- Interactive diagram: https://gitdiagram.com/vskavi/clipy
- Repository: https://github.com/vskavi/clipy

## Overview

Clipy is an AI-oriented screen recorder that turns a recording or video into timestamped, agent-readable context. The principal local workflow is capture, transcription, key-moment selection and frame extraction, then an AREC handoff; the desktop also supports camera, voice, annotation, and sharing. The graph includes the desktop UI/native backend and shared capture, transcription, and moment packages. Most source was not sampled, so edges are limited to README-documented workflow or relationships visible in the source index and excerpts.

Main entry points: [`desktop/src-tauri/src/local/mod.rs`](https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/local/mod.rs) (AREC processor), [`desktop/src-tauri/src/recording.rs`](https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/recording.rs) (Recording engine), [`desktop/src/routes/Home.tsx`](https://github.com/vskavi/clipy/blob/main/desktop/src/routes/Home.tsx) (Recorder home), [`desktop/src/lib/bridge.ts`](https://github.com/vskavi/clipy/blob/main/desktop/src/lib/bridge.ts) (Native bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop recorder"]
  node_home["Recorder home<br/>[Home.tsx]"]
  node_bridge["Native bridge<br/>[bridge.ts]"]
  node_commands["Native commands<br/>[commands.rs]"]
  node_recording["Recording engine<br/>[recording.rs]"]
  node_cursor["Cursor tracking<br/>[cursor_track.rs]"]
  node_effects["Camera effects<br/>[EffectsSheet.tsx]"]
  node_settings["Recorder settings<br/>[SettingsSheet.tsx]"]
  node_ui["Recorder controls<br/>[ui.tsx]"]
end

subgraph group_processing["Local processing"]
  node_local_processor["AREC processor<br/>[mod.rs]"]
  node_local_media["Media processing<br/>[media.rs]"]
  node_local_stt["Live transcription<br/>[live_stt.rs]"]
  node_local_edition["Local edition<br/>[edition.rs]"]
  node_stt_models["Speech models<br/>[models.rs]"]
end

subgraph group_shared["Shared packages"]
  node_capture_pkg["Capture package<br/>[capture.ts]"]
  node_transcribe_pkg["Transcription package<br/>[index.ts]"]
  node_moments_pkg["Moment selection<br/>[index.ts]"]
  node_config_pkg["Local configuration<br/>[index.ts]"]
end

subgraph group_agent["Agent handoff"]
  node_arec["AREC recording"]
  node_share_viewer["Share-link viewer"]
end

node_user(("Recorder user"))
node_agent_user(("AI agent"))

node_user -->|"starts recording"| node_home
node_home -->|"requests capture"| node_bridge
node_bridge -.->|"invokes native"| node_commands
node_commands -.->|"controls recording"| node_recording
node_recording -.->|"records interactions"| node_cursor
node_recording -->|"passes recording"| node_local_processor
node_local_processor -.->|"processes media"| node_local_media
node_local_processor -.->|"transcribes audio"| node_local_stt
node_local_stt -.->|"loads models"| node_stt_models
node_local_processor -->|"selects moments"| node_moments_pkg
node_local_processor -->|"builds AREC"| node_arec
node_arec -->|"provides context"| node_agent_user
node_user -->|"records via CLI"| node_capture_pkg
node_capture_pkg -.->|"supplies recording"| node_transcribe_pkg
node_transcribe_pkg -->|"provides transcript"| node_arec
node_user -.->|"configures recorder"| node_settings
node_user -->|"adjusts camera"| node_effects
node_local_edition -.->|"uses settings"| node_config_pkg
node_user -->|"shares recording"| node_share_viewer
node_share_viewer -->|"offers share link"| node_agent_user

click node_home "https://github.com/vskavi/clipy/blob/main/desktop/src/routes/Home.tsx"
click node_bridge "https://github.com/vskavi/clipy/blob/main/desktop/src/lib/bridge.ts"
click node_commands "https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/commands.rs"
click node_recording "https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/recording.rs"
click node_cursor "https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/cursor_track.rs"
click node_effects "https://github.com/vskavi/clipy/blob/main/desktop/src/components/recorder/EffectsSheet.tsx"
click node_settings "https://github.com/vskavi/clipy/blob/main/desktop/src/components/recorder/SettingsSheet.tsx"
click node_ui "https://github.com/vskavi/clipy/blob/main/desktop/src/components/recorder/ui.tsx"
click node_local_processor "https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/local/mod.rs"
click node_local_media "https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/local/media.rs"
click node_local_stt "https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/local/live_stt.rs"
click node_local_edition "https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/local/edition.rs"
click node_stt_models "https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/crates/clipy-local-stt/src/models.rs"
click node_capture_pkg "https://github.com/vskavi/clipy/blob/main/packages/capture/src/capture.ts"
click node_transcribe_pkg "https://github.com/vskavi/clipy/blob/main/packages/transcribe/src/index.ts"
click node_moments_pkg "https://github.com/vskavi/clipy/blob/main/packages/moments/src/index.ts"
click node_config_pkg "https://github.com/vskavi/clipy/blob/main/packages/config/src/index.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_home,node_bridge,node_commands,node_recording,node_cursor,node_effects,node_settings,node_ui,node_user toneBlue
class node_local_processor,node_local_media,node_local_stt,node_local_edition,node_stt_models toneAmber
class node_capture_pkg,node_transcribe_pkg,node_moments_pkg,node_config_pkg toneMint
class node_arec,node_share_viewer toneRose
class node_agent_user toneIndigo
```

## Components

### Desktop recorder

- [Recorder home](https://github.com/vskavi/clipy/blob/main/desktop/src/routes/Home.tsx): `desktop/src/routes/Home.tsx`
- [Native bridge](https://github.com/vskavi/clipy/blob/main/desktop/src/lib/bridge.ts): `desktop/src/lib/bridge.ts`
- [Native commands](https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/commands.rs): `desktop/src-tauri/src/commands.rs`
- [Recording engine](https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/recording.rs): `desktop/src-tauri/src/recording.rs`
- [Cursor tracking](https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/cursor_track.rs): `desktop/src-tauri/src/cursor_track.rs`
- [Camera effects](https://github.com/vskavi/clipy/blob/main/desktop/src/components/recorder/EffectsSheet.tsx): `desktop/src/components/recorder/EffectsSheet.tsx`
- [Recorder settings](https://github.com/vskavi/clipy/blob/main/desktop/src/components/recorder/SettingsSheet.tsx): `desktop/src/components/recorder/SettingsSheet.tsx`
- [Recorder controls](https://github.com/vskavi/clipy/blob/main/desktop/src/components/recorder/ui.tsx): `desktop/src/components/recorder/ui.tsx`

### Local processing

- [AREC processor](https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/local/mod.rs): `desktop/src-tauri/src/local/mod.rs`
- [Media processing](https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/local/media.rs): `desktop/src-tauri/src/local/media.rs`
- [Live transcription](https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/local/live_stt.rs): `desktop/src-tauri/src/local/live_stt.rs`
- [Local edition](https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/src/local/edition.rs): `desktop/src-tauri/src/local/edition.rs`
- [Speech models](https://github.com/vskavi/clipy/blob/main/desktop/src-tauri/crates/clipy-local-stt/src/models.rs): `desktop/src-tauri/crates/clipy-local-stt/src/models.rs`

### Shared packages

- [Capture package](https://github.com/vskavi/clipy/blob/main/packages/capture/src/capture.ts): `packages/capture/src/capture.ts`
- [Transcription package](https://github.com/vskavi/clipy/blob/main/packages/transcribe/src/index.ts): `packages/transcribe/src/index.ts`
- [Moment selection](https://github.com/vskavi/clipy/blob/main/packages/moments/src/index.ts): `packages/moments/src/index.ts`
- [Local configuration](https://github.com/vskavi/clipy/blob/main/packages/config/src/index.ts): `packages/config/src/index.ts`

### Agent handoff

- **AREC recording**
- **Share-link viewer**

### Other components

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

## Connections

- Recorder user → Recorder home: starts recording (evidence: `README.md`)
- Recorder home → Native bridge: requests capture (evidence: `desktop/src/routes/Home.tsx`)
- Native bridge → Native commands: invokes native
- Native commands → Recording engine: controls recording
- Recording engine → Cursor tracking: records interactions
- Recording engine → AREC processor: passes recording (evidence: `desktop/src-tauri/src/local/mod.rs`)
- AREC processor → Media processing: processes media (evidence: `desktop/src-tauri/src/local/mod.rs`)
- AREC processor → Live transcription: transcribes audio (evidence: `desktop/src-tauri/src/local/mod.rs`)
- Live transcription → Speech models: loads models
- AREC processor → Moment selection: selects moments (evidence: `README.md`)
- AREC processor → AREC recording: builds AREC (evidence: `README.md`)
- AREC recording → AI agent: provides context (evidence: `README.md`)
- Recorder user → Capture package: records via CLI (evidence: `README.md`)
- Capture package → Transcription package: supplies recording
- Transcription package → AREC recording: provides transcript (evidence: `README.md`)
- Recorder user → Recorder settings: configures recorder
- Recorder user → Camera effects: adjusts camera (evidence: `README.md`)
- Local edition → Local configuration: uses settings
- Recorder user → Share-link viewer: shares recording (evidence: `README.md`)
- Share-link viewer → AI agent: offers share link (evidence: `README.md`)
