# laguna821/achmage-slides-ultra architecture

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

- Interactive diagram: https://gitdiagram.com/laguna821/achmage-slides-ultra
- Repository: https://github.com/laguna821/achmage-slides-ultra

## Overview

Achmage Slides Ultra is an Obsidian plugin that turns Markdown notes into live, layout-aware 1920×1080 slide decks and exports them as self-contained HTML or MP4. The main workflow reads a note, renders and measures its content, splits or adjusts slides to prevent overflow, then presents the deck or exports it. The graph preserves documented themes, typography, settings, navigation, and video stages. Some implementation is unsampled; edges reflect shown imports/calls or README statements, not inferred wiring.

Main entry points: [`src/video/videoExportService.ts`](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoExportService.ts) (Video Export Service), [`src/engine/slideRenderer.ts`](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/engine/slideRenderer.ts) (Slide Renderer), [`src/main.ts`](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/main.ts) (Plugin Entry), [`src/audit/auditLoop.ts`](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/audit/auditLoop.ts) (Overflow Audit)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plugin["Obsidian Plugin"]
  node_plugin["Plugin Entry<br/>[main.ts]"]
  node_settings["Plugin Settings<br/>[settings.ts]"]
  node_preview["Slide Preview"]
  node_html["HTML Deck<br/>[main.ts]"]
end

subgraph group_render["Slide Rendering"]
  node_renderer["Slide Renderer<br/>[slideRenderer.ts]"]
  node_marp["Marp Engine<br/>[marpEngine.ts]"]
  node_themes["Themes and Fonts<br/>[themeRegistry.ts]"]
  node_frontmatter["Note Compatibility"]
end

subgraph group_layout["Layout and Audit"]
  node_templates["Shape Layouts<br/>[shapeTemplates.ts]"]
  node_splitter["Overflow Splitter"]
  node_measurer["Content Measurement<br/>[pretextMeasurer.ts]"]
  node_measurement["Text Metrics"]
  node_audit["Overflow Audit<br/>[auditLoop.ts]"]
  node_probe["Overflow Probe<br/>[overflowProbe.ts]"]
end

subgraph group_video["Video Export"]
  node_exportmodal["Export Controls"]
  node_videoexport["Video Export Service"]
  node_artifact["Audited Video Artifact<br/>[videoArtifact.ts]"]
  node_timeline["Video Timeline<br/>[videoTimeline.ts]"]
  node_compositor["Frame Compositor<br/>[videoCompositor.ts]"]
  node_encoder["H.264 Encoder<br/>[videoEncoder.ts]"]
  node_output["Output Transaction<br/>[videoOutputPath.ts]"]
end

node_author(("Note Author"))
node_obsidian["Obsidian"]
node_filesystem["Local Filesystem"]

node_author -->|"opens note"| node_obsidian
node_obsidian -->|"activates plugin"| node_plugin
node_plugin -->|"configures"| node_settings
node_plugin -->|"opens preview"| node_preview
node_preview -->|"renders note"| node_renderer
node_plugin -->|"creates renderer"| node_renderer
node_renderer -->|"prepares Markdown"| node_frontmatter
node_renderer -->|"renders slides"| node_marp
node_marp -->|"registers themes"| node_themes
node_renderer -->|"applies layouts"| node_templates
node_renderer -->|"splits overflow"| node_splitter
node_splitter -->|"measures blocks"| node_measurer
node_measurer -->|"measures text"| node_measurement
node_preview -->|"audits preview"| node_audit
node_audit -->|"rerenders corrections"| node_renderer
node_audit -->|"probes overflow"| node_probe
node_plugin -->|"exports HTML"| node_html
node_obsidian -->|"opens MP4 export"| node_exportmodal
node_exportmodal -->|"starts export"| node_videoexport
node_videoexport -->|"renders source deck"| node_renderer
node_videoexport -->|"audits slides"| node_audit
node_videoexport -->|"builds snapshot"| node_artifact
node_artifact -->|"checks overflow"| node_audit
node_videoexport -->|"sets hold time"| node_timeline
node_videoexport -->|"composes frames"| node_compositor
node_compositor -->|"uses timing"| node_timeline
node_videoexport -->|"encodes video"| node_encoder
node_encoder -->|"publishes file"| node_output
node_videoexport -->|"commits output"| node_output
node_output -->|"writes locally"| node_filesystem

click node_plugin "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/main.ts"
click node_settings "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/settings.ts"
click node_preview "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/view/slidePreviewView.ts"
click node_renderer "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/engine/slideRenderer.ts"
click node_marp "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/engine/marpEngine.ts"
click node_themes "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/themes/themeRegistry.ts"
click node_frontmatter "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/preprocessor/frontmatterInjector.ts"
click node_templates "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/preprocessor/shapeTemplates.ts"
click node_splitter "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/preprocessor/overflowSplitter.ts"
click node_measurer "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/preprocessor/pretextMeasurer.ts"
click node_measurement "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/measurement/PretextMeasurementEngine.ts"
click node_audit "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/audit/auditLoop.ts"
click node_probe "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/audit/overflowProbe.ts"
click node_html "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/main.ts"
click node_exportmodal "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoExportModal.ts"
click node_videoexport "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoExportService.ts"
click node_artifact "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoArtifact.ts"
click node_timeline "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoTimeline.ts"
click node_compositor "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoCompositor.ts"
click node_encoder "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoEncoder.ts"
click node_output "https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoOutputPath.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_plugin,node_settings,node_preview,node_html toneBlue
class node_renderer,node_marp,node_themes,node_frontmatter toneAmber
class node_templates,node_splitter,node_measurer,node_measurement,node_audit,node_probe toneMint
class node_exportmodal,node_videoexport,node_artifact,node_timeline,node_compositor,node_encoder,node_output toneRose
class node_author,node_obsidian,node_filesystem toneIndigo
```

## Components

### Obsidian Plugin

- [Plugin Entry](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/main.ts): `src/main.ts`
- [Plugin Settings](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/settings.ts): `src/settings.ts`
- [Slide Preview](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/view/slidePreviewView.ts): `src/view/slidePreviewView.ts`
- [HTML Deck](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/main.ts): `src/main.ts`

### Slide Rendering

- [Slide Renderer](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/engine/slideRenderer.ts): `src/engine/slideRenderer.ts`
- [Marp Engine](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/engine/marpEngine.ts): `src/engine/marpEngine.ts`
- [Themes and Fonts](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/themes/themeRegistry.ts): `src/themes/themeRegistry.ts`
- [Note Compatibility](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/preprocessor/frontmatterInjector.ts): `src/preprocessor/frontmatterInjector.ts`

### Layout and Audit

- [Shape Layouts](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/preprocessor/shapeTemplates.ts): `src/preprocessor/shapeTemplates.ts`
- [Overflow Splitter](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/preprocessor/overflowSplitter.ts): `src/preprocessor/overflowSplitter.ts`
- [Content Measurement](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/preprocessor/pretextMeasurer.ts): `src/preprocessor/pretextMeasurer.ts`
- [Text Metrics](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/measurement/PretextMeasurementEngine.ts): `src/measurement/PretextMeasurementEngine.ts`
- [Overflow Audit](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/audit/auditLoop.ts): `src/audit/auditLoop.ts`
- [Overflow Probe](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/audit/overflowProbe.ts): `src/audit/overflowProbe.ts`

### Video Export

- [Export Controls](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoExportModal.ts): `src/video/videoExportModal.ts`
- [Video Export Service](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoExportService.ts): `src/video/videoExportService.ts`
- [Audited Video Artifact](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoArtifact.ts): `src/video/videoArtifact.ts`
- [Video Timeline](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoTimeline.ts): `src/video/videoTimeline.ts`
- [Frame Compositor](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoCompositor.ts): `src/video/videoCompositor.ts`
- [H.264 Encoder](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoEncoder.ts): `src/video/videoEncoder.ts`
- [Output Transaction](https://github.com/laguna821/achmage-slides-ultra/blob/codex/release-1.2.0-mp4-export/src/video/videoOutputPath.ts): `src/video/videoOutputPath.ts`

### Other components

- **Note Author**
- **Obsidian**
- **Local Filesystem**

## Connections

- Note Author → Obsidian: opens note (evidence: `README.md`)
- Obsidian → Plugin Entry: activates plugin (evidence: `README.md`)
- Plugin Entry → Plugin Settings: configures (evidence: `src/main.ts`)
- Plugin Entry → Slide Preview: opens preview (evidence: `src/main.ts`)
- Slide Preview → Slide Renderer: renders note (evidence: `src/view/slidePreviewView.ts`)
- Plugin Entry → Slide Renderer: creates renderer (evidence: `src/main.ts`)
- Slide Renderer → Note Compatibility: prepares Markdown (evidence: `src/engine/slideRenderer.ts`)
- Slide Renderer → Marp Engine: renders slides (evidence: `src/engine/slideRenderer.ts`)
- Marp Engine → Themes and Fonts: registers themes (evidence: `src/engine/marpEngine.ts`)
- Slide Renderer → Shape Layouts: applies layouts (evidence: `src/engine/slideRenderer.ts`)
- Slide Renderer → Overflow Splitter: splits overflow (evidence: `src/engine/slideRenderer.ts`)
- Overflow Splitter → Content Measurement: measures blocks (evidence: `src/preprocessor/overflowSplitter.ts`)
- Content Measurement → Text Metrics: measures text (evidence: `src/preprocessor/pretextMeasurer.ts`)
- Slide Preview → Overflow Audit: audits preview (evidence: `src/view/slidePreviewView.ts`)
- Overflow Audit → Slide Renderer: rerenders corrections (evidence: `src/audit/auditLoop.ts`)
- Overflow Audit → Overflow Probe: probes overflow (evidence: `src/audit/auditLoop.ts`)
- Plugin Entry → HTML Deck: exports HTML (evidence: `README.md`)
- Obsidian → Export Controls: opens MP4 export (evidence: `README.md`)
- Export Controls → Video Export Service: starts export (evidence: `src/video/videoExportModal.ts`)
- Video Export Service → Slide Renderer: renders source deck (evidence: `src/video/videoExportService.ts`)
- Video Export Service → Overflow Audit: audits slides (evidence: `src/video/videoExportService.ts`)
- Video Export Service → Audited Video Artifact: builds snapshot (evidence: `src/video/videoExportService.ts`)
- Audited Video Artifact → Overflow Audit: checks overflow (evidence: `src/video/videoArtifact.ts`)
- Video Export Service → Video Timeline: sets hold time (evidence: `src/video/videoExportService.ts`)
- Video Export Service → Frame Compositor: composes frames (evidence: `src/video/videoExportService.ts`)
- Frame Compositor → Video Timeline: uses timing (evidence: `src/video/videoCompositor.ts`)
- Video Export Service → H.264 Encoder: encodes video (evidence: `src/video/videoExportService.ts`)
- H.264 Encoder → Output Transaction: publishes file (evidence: `src/video/videoEncoder.ts`)
- Video Export Service → Output Transaction: commits output (evidence: `src/video/videoExportService.ts`)
- Output Transaction → Local Filesystem: writes locally (evidence: `README.md`)
