# jaywebtech/autoshorts architecture

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

- Interactive diagram: https://gitdiagram.com/jaywebtech/autoshorts
- Repository: https://github.com/jaywebtech/autoshorts
- Video tour (about a minute): https://gitdiagram.com/jaywebtech/autoshorts/video

## Overview

AutoShorts is a local-first desktop studio that turns recordings into ranked short-clip candidates. The user imports media, the Rust backend probes it and extracts audio, transcription and LLM analysis produce candidate moments, and selected moments can be rendered as vertical clips with captions. The UI also manages projects and AI configuration, including local Ollama setup and YouTube downloads. The sampled sources show the main Tauri command layer and core processing modules; some workflow details and frontend command wiring are only documented, so those links cite the README where appropriate.

Main entry points: [`src-tauri/src/lib.rs`](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/lib.rs) (Tauri Commands), [`src-tauri/src/transcription.rs`](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/transcription.rs) (Transcription), [`src-tauri/src/llm.rs`](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/llm.rs) (Moment Analysis), [`src-tauri/src/media.rs`](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/media.rs) (Media Processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_studio["Desktop Studio"]
  node_studio_ui["Studio UI<br/>[main.tsx]"]
end

subgraph group_workflow["Media Workflow"]
  node_commands["Tauri Commands<br/>[lib.rs]"]
  node_youtube["YouTube Import<br/>[lib.rs]"]
  node_project_ops["Project Manager<br/>[lib.rs]"]
  node_media_tools["Media Processing<br/>[media.rs]"]
end

subgraph group_intelligence["AI Services"]
  node_transcription["Transcription<br/>[transcription.rs]"]
  node_moment_analysis["Moment Analysis<br/>[llm.rs]"]
  node_local_setup["Local AI Setup<br/>[lib.rs]"]
end

subgraph group_state["Local State"]
  node_models["Domain Models<br/>[models.rs]"]
  node_database[("SQLite Store<br/>[db.rs]")]
end

node_creator(("Creator"))
node_deepgram["Deepgram"]
node_whisper["Local Whisper"]
node_llm_providers["LLM Providers"]
node_ollama["Ollama"]
node_ffmpeg["FFmpeg Tools"]
node_youtube_source["YouTube"]

node_creator -->|"uses"| node_studio_ui
node_studio_ui -->|"invokes"| node_commands
node_commands -->|"dispatches"| node_project_ops
node_commands -->|"reads and writes"| node_database
node_commands -->|"calls"| node_media_tools
node_commands -->|"calls"| node_transcription
node_commands -->|"calls"| node_moment_analysis
node_commands -->|"uses"| node_models
node_media_tools -->|"runs"| node_ffmpeg
node_transcription -->|"transcribes with"| node_deepgram
node_transcription -->|"runs locally"| node_whisper
node_moment_analysis -->|"requests analysis"| node_llm_providers
node_moment_analysis -->|"requests analysis"| node_ollama
node_commands -->|"manages"| node_local_setup
node_local_setup -->|"checks and installs"| node_ollama
node_commands -->|"dispatches"| node_youtube
node_youtube -->|"downloads from"| node_youtube_source
node_commands -->|"renders clips"| node_media_tools
node_commands -->|"extracts and stores transcript"| node_transcription
node_commands -->|"ranks moments"| node_moment_analysis

click node_studio_ui "https://github.com/jaywebtech/autoshorts/blob/main/src/main.tsx"
click node_commands "https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/lib.rs"
click node_youtube "https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/lib.rs"
click node_project_ops "https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/lib.rs"
click node_media_tools "https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/media.rs"
click node_transcription "https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/transcription.rs"
click node_moment_analysis "https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/llm.rs"
click node_local_setup "https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/lib.rs"
click node_models "https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/models.rs"
click node_database "https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/db.rs"

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_studio_ui toneBlue
class node_commands,node_youtube,node_project_ops,node_media_tools toneAmber
class node_transcription,node_moment_analysis,node_local_setup toneMint
class node_models,node_database toneRose
class node_creator,node_deepgram,node_whisper,node_llm_providers,node_ollama,node_ffmpeg,node_youtube_source toneIndigo
```

## Components

### Desktop Studio

- [Studio UI](https://github.com/jaywebtech/autoshorts/blob/main/src/main.tsx): `src/main.tsx`

### Media Workflow

- [Tauri Commands](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [YouTube Import](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Project Manager](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Media Processing](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/media.rs): `src-tauri/src/media.rs`

### AI Services

- [Transcription](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/transcription.rs): `src-tauri/src/transcription.rs`
- [Moment Analysis](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/llm.rs): `src-tauri/src/llm.rs`
- [Local AI Setup](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### Local State

- [Domain Models](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/models.rs): `src-tauri/src/models.rs`
- [SQLite Store](https://github.com/jaywebtech/autoshorts/blob/main/src-tauri/src/db.rs): `src-tauri/src/db.rs`

### Other components

- **Creator**
- **Deepgram**
- **Local Whisper**
- **LLM Providers**
- **Ollama**
- **FFmpeg Tools**
- **YouTube**

## Connections

- Creator → Studio UI: uses (evidence: `README.md`)
- Studio UI → Tauri Commands: invokes (evidence: `src/main.tsx`)
- Tauri Commands → Project Manager: dispatches (evidence: `src-tauri/src/lib.rs`)
- Tauri Commands → SQLite Store: reads and writes (evidence: `src-tauri/src/lib.rs`)
- Tauri Commands → Media Processing: calls (evidence: `src-tauri/src/lib.rs`)
- Tauri Commands → Transcription: calls (evidence: `src-tauri/src/lib.rs`)
- Tauri Commands → Moment Analysis: calls (evidence: `src-tauri/src/lib.rs`)
- Tauri Commands → Domain Models: uses (evidence: `src-tauri/src/lib.rs`)
- Media Processing → FFmpeg Tools: runs (evidence: `src-tauri/src/media.rs`)
- Transcription → Deepgram: transcribes with (evidence: `src-tauri/src/transcription.rs`)
- Transcription → Local Whisper: runs locally (evidence: `src-tauri/src/transcription.rs`)
- Moment Analysis → LLM Providers: requests analysis (evidence: `src-tauri/src/llm.rs`)
- Moment Analysis → Ollama: requests analysis (evidence: `src-tauri/src/llm.rs`)
- Tauri Commands → Local AI Setup: manages (evidence: `src-tauri/src/lib.rs`)
- Local AI Setup → Ollama: checks and installs (evidence: `src-tauri/src/lib.rs`)
- Tauri Commands → YouTube Import: dispatches (evidence: `src-tauri/src/lib.rs`)
- YouTube Import → YouTube: downloads from (evidence: `README.md`)
- Tauri Commands → Media Processing: renders clips (evidence: `README.md`)
- Tauri Commands → Transcription: extracts and stores transcript (evidence: `README.md`)
- Tauri Commands → Moment Analysis: ranks moments (evidence: `README.md`)
