# rehanali357/ai-video-editor architecture

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

- Interactive diagram: https://gitdiagram.com/rehanali357/ai-video-editor
- Repository: https://github.com/rehanali357/ai-video-editor

## Overview

This is a browser-based slide video editor: users work with slides, add and style text, shapes, images, video, and audio, then preview the composition through Remotion. The sampled editor page mounts the player, which coordinates editing state and editor panels; slide actions and element-specific actions update the slide model, and the composition renders slides and animations. The tree also shows Pixabay and image-search API routes and an Unsplash search component. Those integrations are represented, but their runtime wiring is not established by the excerpts.

Main entry points: [`components/page/editor/player.tsx`](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/player.tsx) (Editor player), [`components/page/editor/layers-panel.tsx`](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/layers-panel.tsx) (Layers panel), [`remotion/composition.tsx`](https://github.com/rehanali357/ai-video-editor/blob/main/remotion/composition.tsx) (Video composition), [`components/page/editor/actions/slide-actions.ts`](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/actions/slide-actions.ts) (Slide actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_dashboard["Project dashboard<br/>[page.tsx]"]
  node_editorpage["Editor page<br/>[page.tsx]"]
end

subgraph group_editing["Editor workspace"]
  node_player["Editor player<br/>[player.tsx]"]
  node_layers["Layers panel<br/>[layers-panel.tsx]"]
  node_canvas["Slide canvas<br/>[slide-canvas.tsx]"]
  node_elementeditor["Element editor"]
  node_shapemenu["Shape menu<br/>[shape-menu.tsx]"]
  node_pixabayui["Pixabay search UI"]
end

subgraph group_model["Slide model and actions"]
  node_slides["Slide data model<br/>[slide.ts]"]
  node_slideactions["Slide actions<br/>[slide-actions.ts]"]
  node_imageactions["Image actions<br/>[image-actions.ts]"]
  node_shapeactions["Shape actions<br/>[shape-actions.ts]"]
  node_textactions["Text actions<br/>[text-actions.ts]"]
  node_animationactions["Animation actions"]
  node_fontsize["Font size extension"]
end

subgraph group_render["Preview and media"]
  node_composition["Video composition<br/>[composition.tsx]"]
  node_remotionroot["Remotion registration<br/>[root.tsx]"]
  node_unsplash["Unsplash search UI"]
  node_imagesearch["Image search API<br/>[route.ts]"]
  node_pixabayapi["Pixabay search API<br/>[route.ts]"]
  node_mediaapi["Media API<br/>[route.ts]"]
end

node_user(("Editor user"))

node_user -->|"opens"| node_dashboard
node_editorpage -->|"renders"| node_player
node_player -->|"previews with"| node_composition
node_player -->|"calls"| node_imageactions
node_player -->|"calls"| node_slideactions
node_player -->|"calls"| node_shapeactions
node_player -->|"calls"| node_textactions
node_player -->|"renders"| node_layers
node_player -->|"renders"| node_canvas
node_player -->|"renders"| node_shapemenu
node_player -->|"renders"| node_pixabayui
node_layers -->|"calls"| node_slideactions
node_layers -->|"calls"| node_shapeactions
node_layers -->|"calls"| node_animationactions
node_slides -->|"creates types for"| node_slideactions
node_composition -->|"applies styles from"| node_animationactions
node_composition -->|"renders"| node_slides
node_remotionroot -->|"registers"| node_composition
node_dashboard -->|"offers project UI"| node_user
node_pixabayui -.->|"searches via"| node_pixabayapi
node_unsplash -.->|"searches via"| node_imagesearch

click node_dashboard "https://github.com/rehanali357/ai-video-editor/blob/main/app/(protected)/dashboard/page.tsx"
click node_editorpage "https://github.com/rehanali357/ai-video-editor/blob/main/app/(protected)/editor/page.tsx"
click node_player "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/player.tsx"
click node_layers "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/layers-panel.tsx"
click node_canvas "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/slide-canvas.tsx"
click node_elementeditor "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/slide-element-editor.tsx"
click node_shapemenu "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/shape-menu.tsx"
click node_pixabayui "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/pixabay-media-search.tsx"
click node_slides "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/types/slide.ts"
click node_slideactions "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/actions/slide-actions.ts"
click node_imageactions "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/actions/image-actions.ts"
click node_shapeactions "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/actions/shape-actions.ts"
click node_textactions "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/actions/text-actions.ts"
click node_animationactions "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/actions/animation-actions.ts"
click node_fontsize "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/lib/font-size-extension.ts"
click node_composition "https://github.com/rehanali357/ai-video-editor/blob/main/remotion/composition.tsx"
click node_remotionroot "https://github.com/rehanali357/ai-video-editor/blob/main/remotion/root.tsx"
click node_unsplash "https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/unsplash-image-search.tsx"
click node_imagesearch "https://github.com/rehanali357/ai-video-editor/blob/main/app/api/images/search/route.ts"
click node_pixabayapi "https://github.com/rehanali357/ai-video-editor/blob/main/app/api/pixabay/search/route.ts"
click node_mediaapi "https://github.com/rehanali357/ai-video-editor/blob/main/app/api/media/route.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_dashboard,node_editorpage,node_user toneBlue
class node_player,node_layers,node_canvas,node_elementeditor,node_shapemenu,node_pixabayui toneAmber
class node_slides,node_slideactions,node_imageactions,node_shapeactions,node_textactions,node_animationactions,node_fontsize toneMint
class node_composition,node_remotionroot,node_unsplash,node_imagesearch,node_pixabayapi,node_mediaapi toneRose
```

## Components

### App entry

- [Project dashboard](https://github.com/rehanali357/ai-video-editor/blob/main/app/(protected)/dashboard/page.tsx): `app/(protected)/dashboard/page.tsx`
- [Editor page](https://github.com/rehanali357/ai-video-editor/blob/main/app/(protected)/editor/page.tsx): `app/(protected)/editor/page.tsx`

### Editor workspace

- [Editor player](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/player.tsx): `components/page/editor/player.tsx`
- [Layers panel](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/layers-panel.tsx): `components/page/editor/layers-panel.tsx`
- [Slide canvas](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/slide-canvas.tsx): `components/page/editor/slide-canvas.tsx`
- [Element editor](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/slide-element-editor.tsx): `components/page/editor/slide-element-editor.tsx`
- [Shape menu](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/shape-menu.tsx): `components/page/editor/shape-menu.tsx`
- [Pixabay search UI](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/pixabay-media-search.tsx): `components/page/editor/pixabay-media-search.tsx`

### Slide model and actions

- [Slide data model](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/types/slide.ts): `components/page/editor/types/slide.ts`
- [Slide actions](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/actions/slide-actions.ts): `components/page/editor/actions/slide-actions.ts`
- [Image actions](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/actions/image-actions.ts): `components/page/editor/actions/image-actions.ts`
- [Shape actions](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/actions/shape-actions.ts): `components/page/editor/actions/shape-actions.ts`
- [Text actions](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/actions/text-actions.ts): `components/page/editor/actions/text-actions.ts`
- [Animation actions](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/actions/animation-actions.ts): `components/page/editor/actions/animation-actions.ts`
- [Font size extension](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/lib/font-size-extension.ts): `components/page/editor/lib/font-size-extension.ts`

### Preview and media

- [Video composition](https://github.com/rehanali357/ai-video-editor/blob/main/remotion/composition.tsx): `remotion/composition.tsx`
- [Remotion registration](https://github.com/rehanali357/ai-video-editor/blob/main/remotion/root.tsx): `remotion/root.tsx`
- [Unsplash search UI](https://github.com/rehanali357/ai-video-editor/blob/main/components/page/editor/unsplash-image-search.tsx): `components/page/editor/unsplash-image-search.tsx`
- [Image search API](https://github.com/rehanali357/ai-video-editor/blob/main/app/api/images/search/route.ts): `app/api/images/search/route.ts`
- [Pixabay search API](https://github.com/rehanali357/ai-video-editor/blob/main/app/api/pixabay/search/route.ts): `app/api/pixabay/search/route.ts`
- [Media API](https://github.com/rehanali357/ai-video-editor/blob/main/app/api/media/route.ts): `app/api/media/route.ts`

### Other components

- **Editor user**

## Connections

- Editor user → Project dashboard: opens (evidence: `app/(protected)/dashboard/page.tsx`)
- Editor page → Editor player: renders (evidence: `app/(protected)/editor/page.tsx`)
- Editor player → Video composition: previews with (evidence: `components/page/editor/player.tsx`)
- Editor player → Image actions: calls (evidence: `components/page/editor/player.tsx`)
- Editor player → Slide actions: calls (evidence: `components/page/editor/player.tsx`)
- Editor player → Shape actions: calls (evidence: `components/page/editor/player.tsx`)
- Editor player → Text actions: calls (evidence: `components/page/editor/player.tsx`)
- Editor player → Layers panel: renders (evidence: `components/page/editor/player.tsx`)
- Editor player → Slide canvas: renders (evidence: `components/page/editor/player.tsx`)
- Editor player → Shape menu: renders (evidence: `components/page/editor/player.tsx`)
- Editor player → Pixabay search UI: renders (evidence: `components/page/editor/player.tsx`)
- Layers panel → Slide actions: calls (evidence: `components/page/editor/layers-panel.tsx`)
- Layers panel → Shape actions: calls (evidence: `components/page/editor/layers-panel.tsx`)
- Layers panel → Animation actions: calls (evidence: `components/page/editor/layers-panel.tsx`)
- Slide data model → Slide actions: creates types for (evidence: `components/page/editor/actions/slide-actions.ts`)
- Video composition → Animation actions: applies styles from (evidence: `remotion/composition.tsx`)
- Video composition → Slide data model: renders (evidence: `remotion/composition.tsx`)
- Remotion registration → Video composition: registers (evidence: `remotion/root.tsx`)
- Project dashboard → Editor user: offers project UI (evidence: `app/(protected)/dashboard/page.tsx`)
- Pixabay search UI → Pixabay search API: searches via
- Unsplash search UI → Image search API: searches via
