# owainlewis/vertica architecture

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

- Interactive diagram: https://gitdiagram.com/owainlewis/vertica
- Repository: https://github.com/owainlewis/vertica

## Overview

Vertica is a local-first studio for authoring image and video carousels, managing reusable media, and exporting slides or reels. Users create or open a deck in the library, edit its content and design, preview it through the shared slide renderer, then export files. The API persists deck documents and media as bucket objects; video routes also process uploads and render exports. The README documents the broader export and video capabilities, while sampled source excerpts and the SOURCE INDEX support the implementation links shown here; some unsampled route and subsystem details are therefore linked only where documented.

Main entry points: [`app/editor.tsx`](https://github.com/owainlewis/vertica/blob/main/app/editor.tsx) (Deck editor), [`server/video.ts`](https://github.com/owainlewis/vertica/blob/main/server/video.ts) (Video processing and export routes), [`app/slide.tsx`](https://github.com/owainlewis/vertica/blob/main/app/slide.tsx) (Slide renderer), [`app/dashboard.tsx`](https://github.com/owainlewis/vertica/blob/main/app/dashboard.tsx) (Carousel library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Deck authoring"]
  node_app["App navigation<br/>[app.tsx]"]
  node_gallery["Carousel library<br/>[dashboard.tsx]"]
  node_composer["Deck composer<br/>[composer.tsx]"]
  node_model["Deck model<br/>[carousel.ts]"]
  node_editor["Deck editor<br/>[editor.tsx]"]
  node_inspector["Design inspector<br/>[inspector.tsx]"]
  node_history["Undo history<br/>[use-history.ts]"]
end

subgraph group_media["Media and rendering"]
  node_media_ui["Media library and picker<br/>[media-gallery.tsx]"]
  node_image_store["Image cache and client store<br/>[image-store.ts]"]
  node_video_picker["Video picker<br/>[video-picker.tsx]"]
  node_video_client["Video upload client<br/>[video-client.ts]"]
  node_renderer["Slide renderer<br/>[slide.tsx]"]
  node_diagram["Diagram renderer<br/>[drawn-diagram.ts]"]
  node_video_background["Video background preview"]
end

subgraph group_exports["Export"]
  node_export["Image and PDF export<br/>[export.ts]"]
  node_video_export["Video carousel and reel export"]
end

subgraph group_backend["API and storage"]
  node_api_client["API client<br/>[api-client.ts]"]
  node_api["HTTP API routes<br/>[api.ts]"]
  node_video_routes["Video processing and export routes<br/>[video.ts]"]
  node_store["Deck and media object store<br/>[store.ts]"]
  node_bucket[("Bucket storage adapter<br/>[bucket.ts]")]
  node_auth["Optional password gate<br/>[auth.ts]"]
end

node_user(("User"))
node_ffmpeg["FFmpeg and ffprobe"]

node_user -->|"uses"| node_app
node_app -->|"shows library"| node_gallery
node_app -->|"opens deck"| node_editor
node_gallery -->|"creates deck"| node_composer
node_composer -->|"parses or generates"| node_model
node_editor -->|"edits deck"| node_model
node_editor -->|"shows panels"| node_inspector
node_editor -->|"tracks changes"| node_history
node_editor -->|"renders preview"| node_renderer
node_gallery -->|"renders cards"| node_renderer
node_inspector -->|"updates design"| node_model
node_editor -->|"opens image picker"| node_media_ui
node_editor -->|"opens video picker"| node_video_picker
node_media_ui -->|"uploads and resolves"| node_image_store
node_api_client -->|"persists and loads images"| node_image_store
node_video_picker -->|"uploads clips"| node_video_client
node_renderer -->|"draws diagrams"| node_diagram
node_renderer -->|"previews footage"| node_video_background
node_editor -->|"loads and saves decks"| node_api_client
node_gallery -->|"lists decks"| node_api_client
node_editor -->|"starts exports"| node_export
node_export -->|"rasterizes slides"| node_renderer
node_export -->|"requests video rendering"| node_video_client
node_export -->|"exports video decks"| node_video_export
node_api_client -->|"calls API"| node_api
node_video_client -->|"uploads and requests frames"| node_video_routes
node_api -->|"reads and writes objects"| node_store
node_api -->|"checks access"| node_auth
node_api -->|"routes video requests"| node_video_routes
node_video_routes -->|"checks media references"| node_store
node_store -->|"stores deck and media objects"| node_bucket
node_video_routes -->|"reads and writes video objects"| node_bucket
node_video_routes -.->|"processes and renders video"| node_ffmpeg
node_bucket -.->|"uses cloud storage optionally"| node_ffmpeg

click node_app "https://github.com/owainlewis/vertica/blob/main/app/app.tsx"
click node_gallery "https://github.com/owainlewis/vertica/blob/main/app/dashboard.tsx"
click node_composer "https://github.com/owainlewis/vertica/blob/main/app/composer.tsx"
click node_model "https://github.com/owainlewis/vertica/blob/main/app/carousel.ts"
click node_editor "https://github.com/owainlewis/vertica/blob/main/app/editor.tsx"
click node_inspector "https://github.com/owainlewis/vertica/blob/main/app/inspector.tsx"
click node_history "https://github.com/owainlewis/vertica/blob/main/app/use-history.ts"
click node_media_ui "https://github.com/owainlewis/vertica/blob/main/app/media-gallery.tsx"
click node_image_store "https://github.com/owainlewis/vertica/blob/main/app/image-store.ts"
click node_video_picker "https://github.com/owainlewis/vertica/blob/main/app/video-picker.tsx"
click node_video_client "https://github.com/owainlewis/vertica/blob/main/app/video-client.ts"
click node_renderer "https://github.com/owainlewis/vertica/blob/main/app/slide.tsx"
click node_diagram "https://github.com/owainlewis/vertica/blob/main/app/drawn-diagram.ts"
click node_video_background "https://github.com/owainlewis/vertica/blob/main/app/video-background.tsx"
click node_export "https://github.com/owainlewis/vertica/blob/main/app/export.ts"
click node_video_export "https://github.com/owainlewis/vertica/blob/main/app/video-carousel-export.ts"
click node_api_client "https://github.com/owainlewis/vertica/blob/main/app/api-client.ts"
click node_api "https://github.com/owainlewis/vertica/blob/main/server/api.ts"
click node_video_routes "https://github.com/owainlewis/vertica/blob/main/server/video.ts"
click node_store "https://github.com/owainlewis/vertica/blob/main/server/store.ts"
click node_bucket "https://github.com/owainlewis/vertica/blob/main/server/bucket.ts"
click node_auth "https://github.com/owainlewis/vertica/blob/main/server/auth.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_app,node_gallery,node_composer,node_model,node_editor,node_inspector,node_history,node_user toneBlue
class node_media_ui,node_image_store,node_video_picker,node_video_client,node_renderer,node_diagram,node_video_background toneAmber
class node_export,node_video_export toneMint
class node_api_client,node_api,node_video_routes,node_store,node_bucket,node_auth toneRose
class node_ffmpeg toneIndigo
```

## Components

### Deck authoring

- [App navigation](https://github.com/owainlewis/vertica/blob/main/app/app.tsx): `app/app.tsx`
- [Carousel library](https://github.com/owainlewis/vertica/blob/main/app/dashboard.tsx): `app/dashboard.tsx`
- [Deck composer](https://github.com/owainlewis/vertica/blob/main/app/composer.tsx): `app/composer.tsx`
- [Deck model](https://github.com/owainlewis/vertica/blob/main/app/carousel.ts): `app/carousel.ts`
- [Deck editor](https://github.com/owainlewis/vertica/blob/main/app/editor.tsx): `app/editor.tsx`
- [Design inspector](https://github.com/owainlewis/vertica/blob/main/app/inspector.tsx): `app/inspector.tsx`
- [Undo history](https://github.com/owainlewis/vertica/blob/main/app/use-history.ts): `app/use-history.ts`

### Media and rendering

- [Media library and picker](https://github.com/owainlewis/vertica/blob/main/app/media-gallery.tsx): `app/media-gallery.tsx`
- [Image cache and client store](https://github.com/owainlewis/vertica/blob/main/app/image-store.ts): `app/image-store.ts`
- [Video picker](https://github.com/owainlewis/vertica/blob/main/app/video-picker.tsx): `app/video-picker.tsx`
- [Video upload client](https://github.com/owainlewis/vertica/blob/main/app/video-client.ts): `app/video-client.ts`
- [Slide renderer](https://github.com/owainlewis/vertica/blob/main/app/slide.tsx): `app/slide.tsx`
- [Diagram renderer](https://github.com/owainlewis/vertica/blob/main/app/drawn-diagram.ts): `app/drawn-diagram.ts`
- [Video background preview](https://github.com/owainlewis/vertica/blob/main/app/video-background.tsx): `app/video-background.tsx`

### Export

- [Image and PDF export](https://github.com/owainlewis/vertica/blob/main/app/export.ts): `app/export.ts`
- [Video carousel and reel export](https://github.com/owainlewis/vertica/blob/main/app/video-carousel-export.ts): `app/video-carousel-export.ts`

### API and storage

- [API client](https://github.com/owainlewis/vertica/blob/main/app/api-client.ts): `app/api-client.ts`
- [HTTP API routes](https://github.com/owainlewis/vertica/blob/main/server/api.ts): `server/api.ts`
- [Video processing and export routes](https://github.com/owainlewis/vertica/blob/main/server/video.ts): `server/video.ts`
- [Deck and media object store](https://github.com/owainlewis/vertica/blob/main/server/store.ts): `server/store.ts`
- [Bucket storage adapter](https://github.com/owainlewis/vertica/blob/main/server/bucket.ts): `server/bucket.ts`
- [Optional password gate](https://github.com/owainlewis/vertica/blob/main/server/auth.ts): `server/auth.ts`

### Other components

- **User**
- **FFmpeg and ffprobe**

## Connections

- User → App navigation: uses
- App navigation → Carousel library: shows library (evidence: `app/app.tsx`)
- App navigation → Deck editor: opens deck (evidence: `app/app.tsx`)
- Carousel library → Deck composer: creates deck (evidence: `app/dashboard.tsx`)
- Deck composer → Deck model: parses or generates (evidence: `app/composer.tsx`)
- Deck editor → Deck model: edits deck (evidence: `app/editor.tsx`)
- Deck editor → Design inspector: shows panels (evidence: `app/editor.tsx`)
- Deck editor → Undo history: tracks changes (evidence: `app/editor.tsx`)
- Deck editor → Slide renderer: renders preview (evidence: `app/editor.tsx`)
- Carousel library → Slide renderer: renders cards (evidence: `app/dashboard.tsx`)
- Design inspector → Deck model: updates design (evidence: `app/inspector.tsx`)
- Deck editor → Media library and picker: opens image picker (evidence: `app/editor.tsx`)
- Deck editor → Video picker: opens video picker (evidence: `app/editor.tsx`)
- Media library and picker → Image cache and client store: uploads and resolves (evidence: `app/media-gallery.tsx`)
- API client → Image cache and client store: persists and loads images (evidence: `app/api-client.ts`)
- Video picker → Video upload client: uploads clips (evidence: `app/video-picker.tsx`)
- Slide renderer → Diagram renderer: draws diagrams (evidence: `app/slide.tsx`)
- Slide renderer → Video background preview: previews footage (evidence: `app/slide.tsx`)
- Deck editor → API client: loads and saves decks (evidence: `app/editor.tsx`)
- Carousel library → API client: lists decks (evidence: `app/dashboard.tsx`)
- Deck editor → Image and PDF export: starts exports (evidence: `app/editor.tsx`)
- Image and PDF export → Slide renderer: rasterizes slides
- Image and PDF export → Video upload client: requests video rendering (evidence: `app/export.ts`)
- Image and PDF export → Video carousel and reel export: exports video decks (evidence: `app/export.ts`)
- API client → HTTP API routes: calls API
- Video upload client → Video processing and export routes: uploads and requests frames (evidence: `app/video-client.ts`)
- HTTP API routes → Deck and media object store: reads and writes objects (evidence: `server/api.ts`)
- HTTP API routes → Optional password gate: checks access (evidence: `server/api.ts`)
- HTTP API routes → Video processing and export routes: routes video requests (evidence: `server/api.ts`)
- Video processing and export routes → Deck and media object store: checks media references (evidence: `server/video.ts`)
- Deck and media object store → Bucket storage adapter: stores deck and media objects (evidence: `server/store.ts`)
- Video processing and export routes → Bucket storage adapter: reads and writes video objects (evidence: `server/video.ts`)
- Video processing and export routes → FFmpeg and ffprobe: processes and renders video
- Bucket storage adapter → FFmpeg and ffprobe: uses cloud storage optionally
