# potistudio/aexlo architecture

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

- Interactive diagram: https://gitdiagram.com/potistudio/aexlo
- Repository: https://github.com/potistudio/aexlo

## Overview

aexlo emulates the After Effects plugin runtime so applications can load and render .aex plugins outside After Effects. Its central flow is a CLI or integrating application loading a plugin through the host, configuring parameters and input, then rendering frames. The CLI also offers preset-based tests, benchmarks, checks and interactive previews, with a worker isolating each variant. The graph retains the documented suite and verification-playground capabilities; several suite implementations and CLI/harness internals are unsampled, so those links are shown only where the README or source index supports them.

Main entry points: [`crates/aexlo/src/instance.rs`](https://github.com/potistudio/aexlo/blob/master/crates/aexlo/src/instance.rs) (Host and loader), [`crates/cli/src/main.rs`](https://github.com/potistudio/aexlo/blob/master/crates/cli/src/main.rs) (CLI commands), [`crates/cli/src/toolkit.rs`](https://github.com/potistudio/aexlo/blob/master/crates/cli/src/toolkit.rs) (Toolkit commands), [`crates/cli/src/preview.rs`](https://github.com/potistudio/aexlo/blob/master/crates/cli/src/preview.rs) (Interactive preview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Plugin runtime"]
  node_host["Host and loader<br/>[instance.rs]"]
  node_app_host["Injectable app services<br/>[app.rs]"]
  node_suite_dispatch["Suite dispatch<br/>[mod.rs]"]
  node_suite_impl["SDK suite callbacks"]
  node_diagnostics["Diagnostics<br/>[diagnostics.rs]"]
  node_observer["Runtime observation<br/>[observe.rs]"]
end

subgraph group_cli["CLI and preview"]
  node_cli_main["CLI commands<br/>[main.rs]"]
  node_toolkit["Toolkit commands<br/>[toolkit.rs]"]
  node_preview["Interactive preview<br/>[preview.rs]"]
  node_session["Viewer session<br/>[session.rs]"]
  node_viewer["Browser viewer<br/>[viewer.rs]"]
end

subgraph group_harness["Preset harness"]
  node_manifest["Manifest parsing<br/>[manifest.rs]"]
  node_preset["Preset variants<br/>[preset.rs]"]
  node_worker["Isolated worker<br/>[worker.rs]"]
  node_frame["Frame handling<br/>[frame.rs]"]
  node_golden["Golden comparison<br/>[golden.rs]"]
end

subgraph group_playground["Verification playground"]
  node_probe_runner["Probe harness<br/>[main.rs]"]
  node_probe["Probe plugin<br/>[lib.rs]"]
  node_trace["Trace inspection<br/>[inspect.rs]"]
end

node_user(("Developer or user"))
node_app["Integrating application"]
node_plugin["AE plugin"]

node_user -->|"runs commands"| node_cli_main
node_cli_main -->|"dispatches commands"| node_toolkit
node_cli_main -->|"loads plugin"| node_host
node_toolkit -.->|"resolves presets"| node_manifest
node_manifest -->|"expands variants"| node_preset
node_toolkit -.->|"runs variants"| node_worker
node_worker -->|"loads plugin"| node_host
node_worker -->|"writes frames"| node_frame
node_frame -->|"uses variant data"| node_preset
node_manifest -->|"loads golden settings"| node_golden
node_user -.->|"integrates runtime"| node_app
node_app -.->|"loads and renders"| node_host
node_plugin -.->|"invokes callbacks"| node_host
node_host -->|"uses host services"| node_app_host
node_host -->|"provides suites"| node_suite_dispatch
node_suite_dispatch -->|"dispatches callbacks"| node_suite_impl
node_suite_impl -.->|"emits diagnostics"| node_diagnostics
node_host -->|"emits events"| node_observer
node_user -->|"starts preview"| node_preview
node_preview -->|"configures session"| node_session
node_preview -->|"starts viewer"| node_viewer
node_session -->|"publishes updates"| node_viewer
node_session -.->|"loads plugin"| node_host
node_probe_runner -->|"loads and runs"| node_probe
node_probe_runner -.->|"compares traces"| node_trace

click node_cli_main "https://github.com/potistudio/aexlo/blob/master/crates/cli/src/main.rs"
click node_toolkit "https://github.com/potistudio/aexlo/blob/master/crates/cli/src/toolkit.rs"
click node_preview "https://github.com/potistudio/aexlo/blob/master/crates/cli/src/preview.rs"
click node_session "https://github.com/potistudio/aexlo/blob/master/crates/cli/src/session.rs"
click node_viewer "https://github.com/potistudio/aexlo/blob/master/crates/cli/src/viewer.rs"
click node_manifest "https://github.com/potistudio/aexlo/blob/master/crates/harness/src/manifest.rs"
click node_preset "https://github.com/potistudio/aexlo/blob/master/crates/harness/src/preset.rs"
click node_worker "https://github.com/potistudio/aexlo/blob/master/crates/harness/src/worker.rs"
click node_frame "https://github.com/potistudio/aexlo/blob/master/crates/harness/src/frame.rs"
click node_golden "https://github.com/potistudio/aexlo/blob/master/crates/harness/src/golden.rs"
click node_host "https://github.com/potistudio/aexlo/blob/master/crates/aexlo/src/instance.rs"
click node_app_host "https://github.com/potistudio/aexlo/blob/master/crates/aexlo/src/host/app.rs"
click node_suite_dispatch "https://github.com/potistudio/aexlo/blob/master/crates/aexlo/src/suites/mod.rs"
click node_suite_impl "https://github.com/potistudio/aexlo/tree/master/crates/aexlo/src/suites"
click node_diagnostics "https://github.com/potistudio/aexlo/blob/master/crates/aexlo/src/core/diagnostics.rs"
click node_observer "https://github.com/potistudio/aexlo/blob/master/crates/aexlo/src/observe.rs"
click node_probe_runner "https://github.com/potistudio/aexlo/blob/master/playground/harness/src/main.rs"
click node_probe "https://github.com/potistudio/aexlo/blob/master/playground/probe/src/lib.rs"
click node_trace "https://github.com/potistudio/aexlo/blob/master/playground/probe/src/inspect.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_host,node_app_host,node_suite_dispatch,node_suite_impl,node_diagnostics,node_observer,node_user toneBlue
class node_cli_main,node_toolkit,node_preview,node_session,node_viewer toneAmber
class node_manifest,node_preset,node_worker,node_frame,node_golden toneMint
class node_probe_runner,node_probe,node_trace toneRose
class node_app,node_plugin toneIndigo
```

## Components

### Plugin runtime

- [Host and loader](https://github.com/potistudio/aexlo/blob/master/crates/aexlo/src/instance.rs): `crates/aexlo/src/instance.rs`
- [Injectable app services](https://github.com/potistudio/aexlo/blob/master/crates/aexlo/src/host/app.rs): `crates/aexlo/src/host/app.rs`
- [Suite dispatch](https://github.com/potistudio/aexlo/blob/master/crates/aexlo/src/suites/mod.rs): `crates/aexlo/src/suites/mod.rs`
- [SDK suite callbacks](https://github.com/potistudio/aexlo/tree/master/crates/aexlo/src/suites): `crates/aexlo/src/suites`
- [Diagnostics](https://github.com/potistudio/aexlo/blob/master/crates/aexlo/src/core/diagnostics.rs): `crates/aexlo/src/core/diagnostics.rs`
- [Runtime observation](https://github.com/potistudio/aexlo/blob/master/crates/aexlo/src/observe.rs): `crates/aexlo/src/observe.rs`

### CLI and preview

- [CLI commands](https://github.com/potistudio/aexlo/blob/master/crates/cli/src/main.rs): `crates/cli/src/main.rs`
- [Toolkit commands](https://github.com/potistudio/aexlo/blob/master/crates/cli/src/toolkit.rs): `crates/cli/src/toolkit.rs`
- [Interactive preview](https://github.com/potistudio/aexlo/blob/master/crates/cli/src/preview.rs): `crates/cli/src/preview.rs`
- [Viewer session](https://github.com/potistudio/aexlo/blob/master/crates/cli/src/session.rs): `crates/cli/src/session.rs`
- [Browser viewer](https://github.com/potistudio/aexlo/blob/master/crates/cli/src/viewer.rs): `crates/cli/src/viewer.rs`

### Preset harness

- [Manifest parsing](https://github.com/potistudio/aexlo/blob/master/crates/harness/src/manifest.rs): `crates/harness/src/manifest.rs`
- [Preset variants](https://github.com/potistudio/aexlo/blob/master/crates/harness/src/preset.rs): `crates/harness/src/preset.rs`
- [Isolated worker](https://github.com/potistudio/aexlo/blob/master/crates/harness/src/worker.rs): `crates/harness/src/worker.rs`
- [Frame handling](https://github.com/potistudio/aexlo/blob/master/crates/harness/src/frame.rs): `crates/harness/src/frame.rs`
- [Golden comparison](https://github.com/potistudio/aexlo/blob/master/crates/harness/src/golden.rs): `crates/harness/src/golden.rs`

### Verification playground

- [Probe harness](https://github.com/potistudio/aexlo/blob/master/playground/harness/src/main.rs): `playground/harness/src/main.rs`
- [Probe plugin](https://github.com/potistudio/aexlo/blob/master/playground/probe/src/lib.rs): `playground/probe/src/lib.rs`
- [Trace inspection](https://github.com/potistudio/aexlo/blob/master/playground/probe/src/inspect.rs): `playground/probe/src/inspect.rs`

### Other components

- **Developer or user**
- **Integrating application**
- **AE plugin**

## Connections

- Developer or user → CLI commands: runs commands (evidence: `crates/cli/src/main.rs`)
- CLI commands → Toolkit commands: dispatches commands (evidence: `crates/cli/src/main.rs`)
- CLI commands → Host and loader: loads plugin (evidence: `crates/cli/src/main.rs`)
- Toolkit commands → Manifest parsing: resolves presets
- Manifest parsing → Preset variants: expands variants (evidence: `crates/harness/src/preset.rs`)
- Toolkit commands → Isolated worker: runs variants
- Isolated worker → Host and loader: loads plugin (evidence: `crates/harness/src/worker.rs`)
- Isolated worker → Frame handling: writes frames (evidence: `crates/harness/src/worker.rs`)
- Frame handling → Preset variants: uses variant data (evidence: `crates/harness/src/frame.rs`)
- Manifest parsing → Golden comparison: loads golden settings (evidence: `crates/harness/src/manifest.rs`)
- Developer or user → Integrating application: integrates runtime
- Integrating application → Host and loader: loads and renders (evidence: `README.md`)
- AE plugin → Host and loader: invokes callbacks (evidence: `README.md`)
- Host and loader → Injectable app services: uses host services (evidence: `crates/aexlo/src/instance.rs`)
- Host and loader → Suite dispatch: provides suites (evidence: `crates/aexlo/src/instance.rs`)
- Suite dispatch → SDK suite callbacks: dispatches callbacks (evidence: `crates/aexlo/src/suites/mod.rs`)
- SDK suite callbacks → Diagnostics: emits diagnostics (evidence: `crates/aexlo/src/suites/mod.rs`)
- Host and loader → Runtime observation: emits events (evidence: `crates/aexlo/src/instance.rs`)
- Developer or user → Interactive preview: starts preview (evidence: `crates/cli/src/preview.rs`)
- Interactive preview → Viewer session: configures session (evidence: `crates/cli/src/preview.rs`)
- Interactive preview → Browser viewer: starts viewer (evidence: `crates/cli/src/preview.rs`)
- Viewer session → Browser viewer: publishes updates (evidence: `crates/cli/src/session.rs`)
- Viewer session → Host and loader: loads plugin
- Probe harness → Probe plugin: loads and runs (evidence: `playground/harness/src/main.rs`)
- Probe harness → Trace inspection: compares traces
