# clipship/clipship.github.io architecture

> Architecture diagram of the GitHub repository clipship/clipship.github.io, 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/clipship/clipship.github.io
- Repository: https://github.com/clipship/clipship.github.io

## Overview

Clipship is a browser-based editor for cutting and converting video clips. Users open or drop a media file, preview and trim it on a timeline, configure audio/video export, then convert and download the result. The graph separates editor interaction, timeline and track controls, export configuration, and FFmpeg processing. Evidence is limited to the README and sampled files; unsampled capabilities are included only where the index or tree supports them, and uncertain connections are omitted.

Main entry points: [`src/lib/components/editor/EditorLoaded.svelte`](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/EditorLoaded.svelte) (Loaded editor), [`src/lib/components/editor/export-dialog/ExportDialog.svelte`](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/export-dialog/ExportDialog.svelte) (Export workflow), [`src/lib/components/editor/timeline-area/TimelineArea.svelte`](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/TimelineArea.svelte) (Timeline view), [`src/lib/components/editor/Editor.svelte`](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/Editor.svelte) (Editor shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_editor["Editor workflow"]
  node_editor["Editor shell<br/>[Editor.svelte]"]
  node_loaded["Loaded editor"]
  node_controls["Playback controls<br/>[ControlArea.svelte]"]
  node_dropzone["File drop<br/>[DropZone.svelte]"]
  node_video["Video preview<br/>[VideoArea.svelte]"]
  node_audio["Audio preview<br/>[Audio.svelte]"]
end

subgraph group_timeline["Timeline and tracks"]
  node_timeline["Timeline view"]
  node_marking["Trim controls"]
  node_intervals["Interval math<br/>[interval-space.ts]"]
  node_trackchannels["Track controls"]
  node_tracktimeline["Track display"]
  node_waveform["Waveform rendering"]
end

subgraph group_export["Export experience"]
  node_exportdialog["Export workflow"]
  node_configure["Export settings"]
  node_progress["Export progress"]
  node_success["Download result"]
  node_formats["Format definitions<br/>[formats.ts]"]
  node_preferences["Export preferences"]
  node_persisted["Persisted state"]
end

subgraph group_processing["Media processing"]
  node_provider["FFmpeg provider"]
  node_api["Conversion API<br/>[ffmpeg-api.ts]"]
end

node_user(("User"))
node_ffmpeg["FFmpeg runtime"]

node_user -->|"edits clips"| node_editor
node_editor -->|"loads editor"| node_loaded
node_loaded -->|"renders controls"| node_controls
node_loaded -->|"handles dropped files"| node_dropzone
node_loaded -->|"renders preview"| node_video
node_loaded -->|"renders track audio"| node_audio
node_loaded -->|"renders timeline"| node_timeline
node_loaded -->|"opens export"| node_exportdialog
node_timeline -->|"renders trim controls"| node_marking
node_timeline -->|"renders track controls"| node_trackchannels
node_timeline -->|"renders track display"| node_tracktimeline
node_tracktimeline -->|"renders waveform"| node_waveform
node_marking -->|"constrains ranges"| node_intervals
node_exportdialog -->|"renders settings"| node_configure
node_exportdialog -->|"renders progress"| node_progress
node_exportdialog -->|"renders result"| node_success
node_exportdialog -->|"requests FFmpeg"| node_provider
node_exportdialog -->|"reads settings"| node_preferences
node_preferences -->|"persists preferences"| node_persisted
node_exportdialog -->|"selects output format"| node_formats
node_provider -->|"loads API"| node_api
node_api -->|"loads and executes"| node_ffmpeg

click node_editor "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/Editor.svelte"
click node_loaded "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/EditorLoaded.svelte"
click node_controls "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/ControlArea.svelte"
click node_dropzone "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/DropZone.svelte"
click node_video "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/VideoArea.svelte"
click node_audio "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/Audio.svelte"
click node_timeline "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/TimelineArea.svelte"
click node_marking "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/TimelineMarkingBar.svelte"
click node_intervals "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/interval-space.ts"
click node_trackchannels "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/TrackChannel.svelte"
click node_tracktimeline "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/TrackTimeline.svelte"
click node_waveform "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/TrackWaveForm.svelte"
click node_exportdialog "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/export-dialog/ExportDialog.svelte"
click node_configure "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/export-dialog/ContentConfigure.svelte"
click node_progress "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/export-dialog/ContentProgress.svelte"
click node_success "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/export-dialog/ContentSuccess.svelte"
click node_formats "https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/formats.ts"
click node_preferences "https://github.com/clipship/clipship.github.io/blob/main/src/lib/client-state/preferences.svelte.ts"
click node_persisted "https://github.com/clipship/clipship.github.io/blob/main/src/lib/client-state/persisted-state.svelte.ts"
click node_provider "https://github.com/clipship/clipship.github.io/blob/main/src/lib/ffmpeg/FFmpegProvider.svelte"
click node_api "https://github.com/clipship/clipship.github.io/blob/main/src/lib/ffmpeg/ffmpeg-api.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_editor,node_loaded,node_controls,node_dropzone,node_video,node_audio,node_user toneBlue
class node_timeline,node_marking,node_intervals,node_trackchannels,node_tracktimeline,node_waveform toneAmber
class node_exportdialog,node_configure,node_progress,node_success,node_formats,node_preferences,node_persisted toneMint
class node_provider,node_api toneRose
class node_ffmpeg toneIndigo
```

## Components

### Editor workflow

- [Editor shell](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/Editor.svelte): `src/lib/components/editor/Editor.svelte`
- [Loaded editor](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/EditorLoaded.svelte): `src/lib/components/editor/EditorLoaded.svelte`
- [Playback controls](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/ControlArea.svelte): `src/lib/components/editor/ControlArea.svelte`
- [File drop](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/DropZone.svelte): `src/lib/components/DropZone.svelte`
- [Video preview](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/VideoArea.svelte): `src/lib/components/editor/VideoArea.svelte`
- [Audio preview](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/Audio.svelte): `src/lib/components/editor/Audio.svelte`

### Timeline and tracks

- [Timeline view](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/TimelineArea.svelte): `src/lib/components/editor/timeline-area/TimelineArea.svelte`
- [Trim controls](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/TimelineMarkingBar.svelte): `src/lib/components/editor/timeline-area/TimelineMarkingBar.svelte`
- [Interval math](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/interval-space.ts): `src/lib/components/editor/timeline-area/interval-space.ts`
- [Track controls](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/TrackChannel.svelte): `src/lib/components/editor/timeline-area/TrackChannel.svelte`
- [Track display](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/TrackTimeline.svelte): `src/lib/components/editor/timeline-area/TrackTimeline.svelte`
- [Waveform rendering](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/timeline-area/TrackWaveForm.svelte): `src/lib/components/editor/timeline-area/TrackWaveForm.svelte`

### Export experience

- [Export workflow](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/export-dialog/ExportDialog.svelte): `src/lib/components/editor/export-dialog/ExportDialog.svelte`
- [Export settings](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/export-dialog/ContentConfigure.svelte): `src/lib/components/editor/export-dialog/ContentConfigure.svelte`
- [Export progress](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/export-dialog/ContentProgress.svelte): `src/lib/components/editor/export-dialog/ContentProgress.svelte`
- [Download result](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/export-dialog/ContentSuccess.svelte): `src/lib/components/editor/export-dialog/ContentSuccess.svelte`
- [Format definitions](https://github.com/clipship/clipship.github.io/blob/main/src/lib/components/editor/formats.ts): `src/lib/components/editor/formats.ts`
- [Export preferences](https://github.com/clipship/clipship.github.io/blob/main/src/lib/client-state/preferences.svelte.ts): `src/lib/client-state/preferences.svelte.ts`
- [Persisted state](https://github.com/clipship/clipship.github.io/blob/main/src/lib/client-state/persisted-state.svelte.ts): `src/lib/client-state/persisted-state.svelte.ts`

### Media processing

- [FFmpeg provider](https://github.com/clipship/clipship.github.io/blob/main/src/lib/ffmpeg/FFmpegProvider.svelte): `src/lib/ffmpeg/FFmpegProvider.svelte`
- [Conversion API](https://github.com/clipship/clipship.github.io/blob/main/src/lib/ffmpeg/ffmpeg-api.ts): `src/lib/ffmpeg/ffmpeg-api.ts`

### Other components

- **User**
- **FFmpeg runtime**

## Connections

- User → Editor shell: edits clips (evidence: `README.md`)
- Editor shell → Loaded editor: loads editor (evidence: `src/lib/components/editor/Editor.svelte`)
- Loaded editor → Playback controls: renders controls (evidence: `src/lib/components/editor/EditorLoaded.svelte`)
- Loaded editor → File drop: handles dropped files (evidence: `src/lib/components/editor/EditorLoaded.svelte`)
- Loaded editor → Video preview: renders preview (evidence: `src/lib/components/editor/EditorLoaded.svelte`)
- Loaded editor → Audio preview: renders track audio (evidence: `src/lib/components/editor/EditorLoaded.svelte`)
- Loaded editor → Timeline view: renders timeline (evidence: `src/lib/components/editor/EditorLoaded.svelte`)
- Loaded editor → Export workflow: opens export (evidence: `src/lib/components/editor/EditorLoaded.svelte`)
- Timeline view → Trim controls: renders trim controls (evidence: `src/lib/components/editor/timeline-area/TimelineArea.svelte`)
- Timeline view → Track controls: renders track controls (evidence: `src/lib/components/editor/timeline-area/TimelineArea.svelte`)
- Timeline view → Track display: renders track display (evidence: `src/lib/components/editor/timeline-area/TimelineArea.svelte`)
- Track display → Waveform rendering: renders waveform (evidence: `src/lib/components/editor/timeline-area/TrackTimeline.svelte`)
- Trim controls → Interval math: constrains ranges (evidence: `src/lib/components/editor/timeline-area/TimelineMarkingBar.svelte`)
- Export workflow → Export settings: renders settings (evidence: `src/lib/components/editor/export-dialog/ExportDialog.svelte`)
- Export workflow → Export progress: renders progress (evidence: `src/lib/components/editor/export-dialog/ExportDialog.svelte`)
- Export workflow → Download result: renders result (evidence: `src/lib/components/editor/export-dialog/ExportDialog.svelte`)
- Export workflow → FFmpeg provider: requests FFmpeg (evidence: `src/lib/components/editor/export-dialog/ExportDialog.svelte`)
- Export workflow → Export preferences: reads settings (evidence: `src/lib/components/editor/export-dialog/ExportDialog.svelte`)
- Export preferences → Persisted state: persists preferences (evidence: `src/lib/client-state/preferences.svelte.ts`)
- Export workflow → Format definitions: selects output format (evidence: `src/lib/components/editor/export-dialog/ExportDialog.svelte`)
- FFmpeg provider → Conversion API: loads API (evidence: `src/lib/ffmpeg/FFmpegProvider.svelte`)
- Conversion API → FFmpeg runtime: loads and executes (evidence: `src/lib/ffmpeg/ffmpeg-api.ts`)
