# eneelkant/66-deck-agent architecture

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

- Interactive diagram: https://gitdiagram.com/eneelkant/66-deck-agent
- Repository: https://github.com/eneelkant/66-deck-agent

## Overview

66° Deck Agent is a Google Slides add-on that creates editable, on-brand slides inside the presentation already open, and can rebrand an existing deck in place. The main workflow starts in the sidebar, then orchestrates research, content planning, template matching, layout and fit checking, and rendering. Supporting capabilities include brand profiles, reference-library matching, and a reusable shape kit. Edges are based on the README’s architecture and workflow; source excerpts do not expose the Apps Script runtime implementation, so unsampled details are not inferred.

Main entry points: [`src/Code.gs`](https://github.com/eneelkant/66-deck-agent/blob/main/src/Code.gs) (Add-on orchestration), [`src/Generator.html`](https://github.com/eneelkant/66-deck-agent/blob/main/src/Generator.html) (Generator sidebar), [`src/Reference.gs`](https://github.com/eneelkant/66-deck-agent/blob/main/src/Reference.gs) (Template matching), [`src/EngineRenderer.gs`](https://github.com/eneelkant/66-deck-agent/blob/main/src/EngineRenderer.gs) (Slide renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Slides Interface"]
  node_sidebar["Generator sidebar<br/>[Generator.html]"]
end

subgraph group_workflow["Create Workflow"]
  node_orchestrator["Add-on orchestration<br/>[Code.gs]"]
  node_research["Research<br/>[Code.gs]"]
  node_planning["Content planning<br/>[Code.gs]"]
end

subgraph group_design["Brand And Design"]
  node_matching["Template matching<br/>[Reference.gs]"]
  node_layout["Layout and fit<br/>[Engine.gs]"]
  node_renderer["Slide renderer<br/>[EngineRenderer.gs]"]
  node_brand["Brand profile<br/>[Brand.gs]"]
  node_rebrand["In-place rebrand<br/>[Rebrand.gs]"]
  node_shape_kit["Shape kit<br/>[ShapeKit.gs]"]
end

subgraph group_services["External Services"]
  node_vertex["Vertex AI Gemini"]
  node_scite["Scite research"]
end

node_user(("Slides user"))
node_source_docs["Source documents"]
node_presentation[("Active presentation")]
node_drive[("Google Drive")]

node_user -->|"opens"| node_sidebar
node_sidebar -->|"starts generation"| node_orchestrator
node_sidebar -->|"uploads"| node_source_docs
node_orchestrator -->|"runs research"| node_research
node_research -.->|"queries first"| node_scite
node_research -.->|"falls back"| node_vertex
node_orchestrator -->|"writes plan"| node_planning
node_planning -->|"generates content"| node_vertex
node_orchestrator -->|"matches designs"| node_matching
node_orchestrator -->|"checks fit"| node_layout
node_orchestrator -->|"renders slides"| node_renderer
node_renderer -->|"inserts slides"| node_presentation
node_user -->|"requests restyle"| node_rebrand
node_rebrand -->|"restyles in place"| node_presentation
node_matching -.->|"loads references"| node_drive
node_orchestrator -.->|"uses brand"| node_brand

click node_sidebar "https://github.com/eneelkant/66-deck-agent/blob/main/src/Generator.html"
click node_orchestrator "https://github.com/eneelkant/66-deck-agent/blob/main/src/Code.gs"
click node_research "https://github.com/eneelkant/66-deck-agent/blob/main/src/Code.gs"
click node_planning "https://github.com/eneelkant/66-deck-agent/blob/main/src/Code.gs"
click node_matching "https://github.com/eneelkant/66-deck-agent/blob/main/src/Reference.gs"
click node_layout "https://github.com/eneelkant/66-deck-agent/blob/main/src/Engine.gs"
click node_renderer "https://github.com/eneelkant/66-deck-agent/blob/main/src/EngineRenderer.gs"
click node_brand "https://github.com/eneelkant/66-deck-agent/blob/main/src/Brand.gs"
click node_rebrand "https://github.com/eneelkant/66-deck-agent/blob/main/src/Rebrand.gs"
click node_shape_kit "https://github.com/eneelkant/66-deck-agent/blob/main/src/ShapeKit.gs"

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_sidebar,node_user toneBlue
class node_orchestrator,node_research,node_planning,node_presentation,node_drive toneAmber
class node_matching,node_layout,node_renderer,node_brand,node_rebrand,node_shape_kit toneMint
class node_vertex,node_scite toneRose
class node_source_docs toneIndigo
```

## Components

### Slides Interface

- [Generator sidebar](https://github.com/eneelkant/66-deck-agent/blob/main/src/Generator.html): `src/Generator.html`

### Create Workflow

- [Add-on orchestration](https://github.com/eneelkant/66-deck-agent/blob/main/src/Code.gs): `src/Code.gs`
- [Research](https://github.com/eneelkant/66-deck-agent/blob/main/src/Code.gs): `src/Code.gs`
- [Content planning](https://github.com/eneelkant/66-deck-agent/blob/main/src/Code.gs): `src/Code.gs`

### Brand And Design

- [Template matching](https://github.com/eneelkant/66-deck-agent/blob/main/src/Reference.gs): `src/Reference.gs`
- [Layout and fit](https://github.com/eneelkant/66-deck-agent/blob/main/src/Engine.gs): `src/Engine.gs`
- [Slide renderer](https://github.com/eneelkant/66-deck-agent/blob/main/src/EngineRenderer.gs): `src/EngineRenderer.gs`
- [Brand profile](https://github.com/eneelkant/66-deck-agent/blob/main/src/Brand.gs): `src/Brand.gs`
- [In-place rebrand](https://github.com/eneelkant/66-deck-agent/blob/main/src/Rebrand.gs): `src/Rebrand.gs`
- [Shape kit](https://github.com/eneelkant/66-deck-agent/blob/main/src/ShapeKit.gs): `src/ShapeKit.gs`

### External Services

- **Vertex AI Gemini**
- **Scite research**

### Other components

- **Slides user**
- **Source documents**
- **Active presentation**
- **Google Drive**

## Connections

- Slides user → Generator sidebar: opens (evidence: `README.md`)
- Generator sidebar → Add-on orchestration: starts generation (evidence: `README.md`)
- Generator sidebar → Source documents: uploads (evidence: `README.md`)
- Add-on orchestration → Research: runs research (evidence: `README.md`)
- Research → Scite research: queries first (evidence: `README.md`)
- Research → Vertex AI Gemini: falls back (evidence: `README.md`)
- Add-on orchestration → Content planning: writes plan (evidence: `README.md`)
- Content planning → Vertex AI Gemini: generates content (evidence: `README.md`)
- Add-on orchestration → Template matching: matches designs (evidence: `README.md`)
- Add-on orchestration → Layout and fit: checks fit (evidence: `README.md`)
- Add-on orchestration → Slide renderer: renders slides (evidence: `README.md`)
- Slide renderer → Active presentation: inserts slides (evidence: `README.md`)
- Slides user → In-place rebrand: requests restyle (evidence: `README.md`)
- In-place rebrand → Active presentation: restyles in place (evidence: `README.md`)
- Template matching → Google Drive: loads references (evidence: `README.md`)
- Add-on orchestration → Brand profile: uses brand (evidence: `README.md`)
