# ashtarcommunications/verbatim architecture

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

- Interactive diagram: https://gitdiagram.com/ashtarcommunications/verbatim
- Repository: https://github.com/ashtarcommunications/verbatim

## Overview

1. **Repository shape**
   Verbatim is not one app but a small product suite. The repo contains the main desktop Word-based application, a separate cross-platform timer, a documentation site, and a large amount of packaging/release material for Windows and macOS.

2. **Primary runtime: Microsoft Word + VBA**
   The core desktop product lives under `desktop/` and is implemented as Word templates and VBA modules (`.dotm`, `.xltm`, `.bas`, `.cls`, `.frm`). It only runs in “full” desktop Office with VBA support. The Word document/template itself is the host process; the code executes inside Word rather than as an external app.

3. **Desktop entrypoints and shell**
   The main orchestration points are `ThisDocument.doccls`, `Startup.bas`, `Ribbon.bas`, `UI.bas`, and `Globals.bas`. These wire Word lifecycle events, ribbon commands, startup behavior, shared state, and user-facing controls into the rest of the VBA modules.

4. **Desktop feature modules**
   The VBA code is organized by feature area: formatting and evidence handling (`Formatting`, `Flow`, `Shrink`, `Condense`), paperless debate workflow (`Paperless`, `QuickCards`, `Caselist`, `View`, `VirtualTub`), integrations (`Search`, `OCR`, `HTTP`, `JSONTools`, `Plugins`), and local environment helpers (`Filesystem`, `Registry`, `Settings`, `Troubleshooting`, `License`, `Audio`).

5. **Forms/UI boundary**
   User interaction happens through VBA forms such as settings, tutorial/help, login, progress, stats, caselist, quick cards, setup wizard, and troubleshooters. These forms are the UI layer over the document-processing logic and are embedded in the Word template.

6. **Data flow inside the desktop app**
   The typical flow is: Word events or ribbon actions trigger VBA modules; those modules read/write documents, folders, and settings; some operations call out to external helpers for search, OCR, or plugin actions; results are then surfaced back in Word through forms or document edits. The document/tub/caselist structure is the main domain boundary.

7. **External helpers and bundled tools**
   `desktop/plugins/` contains standalone executables and scripts such as cite/import helpers and navigation utilities, plus bundled third-party tools like Everything search and OCR capture binaries. These are treated as optional adjuncts to the Word macros, not part of the core VBA runtime.

8. **Platform-specific packaging**
   `desktop/install/` and `desktop/release/` show that desktop distribution is built separately per platform. Windows uses NSIS installers and helper EXEs; macOS uses `.pkg`, `.app`, and AppleScript-based assets. The repo includes generated installer outputs and platform bundles alongside source.

9. **Setup validation**
   `desktop/setup/Verbatim Setup Check` is a separate .NET 6 Windows application used during installation/verification. It acts as a prerequisite checker/diagnostic companion for the desktop suite rather than part of the Word macro runtime.

10. **Multiple desktop variants**
   The repo keeps more than one Word-template variant: the main `desktop/src`, an older/alternate `desktop/flow/src`, and reduced `desktop/mini` templates. They share the same overall architecture but ship different feature sets and startup templates.

11. **Timer subsystem**
   `timer/` is an independent cross-platform debate timer built with Tauri. Its front end is a web bundle (`dist/`), while the backend is Rust under `src-tauri/`. It is packaged separately into desktop installers for macOS, Windows, and Linux.

12. **Documentation subsystem**
   `docs/` is a Docusaurus site for the product manuals and guides. It is a separate Node-based documentation deployment and does not participate in the runtime of the desktop app or timer.

13. **Build/release boundary**
   A lot of the tree is generated output: release folders, installers, packaged apps, and build artifacts. For an architecture diagram, it helps to separate source subsystems from distribution artifacts, because the repo intentionally stores both the code and the shipped bundles for multiple platforms.

Main entry points: [`desktop/src/ThisDocument.doccls`](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/ThisDocument.doccls) (Entry shell), [`desktop/src/Paperless.bas`](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Paperless.bas) (Paperless), [`desktop/release/6.0.0/Debate.dotm`](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/release/6.0.0/Debate.dotm) (Released bundles), [`desktop/Debate.dotm`](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/Debate.dotm) (Debate template)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop suite"]
  node_debate_template["Debate template<br/>Word VBA host<br/>[Debate.dotm]"]
  node_debate_startup["Startup template<br/>Word VBA bootstrap<br/>[DebateStartup.dotm]"]
  node_desktop_entry["Entry shell<br/>Word event/ribbon core"]
  node_desktop_startup["Startup<br/>bootstrap logic<br/>[Startup.bas]"]
  node_desktop_ribbon["Ribbon<br/>command surface<br/>[Ribbon.bas]"]
  node_desktop_ui["UI layer<br/>forms and dialogs<br/>[UI.bas]"]
  node_desktop_globals["Globals<br/>shared state<br/>[Globals.bas]"]
  node_desktop_paperless["Paperless<br/>debate workflow<br/>[Paperless.bas]"]
  node_desktop_formatting["Formatting<br/>[Formatting.bas]"]
  node_desktop_flow["Flow<br/>[Flow.bas]"]
  node_desktop_cards["Quick cards<br/>card workflow<br/>[QuickCards.bas]"]
  node_desktop_caselist["Caselist<br/>case index<br/>[Caselist.bas]"]
  node_desktop_view["View<br/>[View.bas]"]
  node_desktop_virtualtub["Virtual tub<br/>tub management<br/>[VirtualTub.bas]"]
  node_desktop_integrations["Integrations<br/>external helpers<br/>[Search.bas]"]
  node_desktop_env["Environment<br/>local helpers<br/>[Filesystem.bas]"]
  node_desktop_forms["Forms<br/>VBA dialogs<br/>[frmSettings.frm]"]
  node_desktop_plugins["Plugins<br/>external executables"]
  node_desktop_mini["Mini templates<br/>reduced Word templates<br/>[DebateMini.dotm]"]
  node_desktop_flow_variant["Flow variant<br/>alternate template set<br/>[Debate.xltm]"]
end

subgraph group_setup["Setup check"]
  node_setup_check["Setup check<br/>.NET prereq checker"]
end

subgraph group_timer["Timer app"]
  node_timer_app["Timer app<br/>Tauri timer<br/>[main.rs]"]
end

subgraph group_docs["Docs site"]
  node_docs_site["Docs site<br/>Docusaurus docs"]
end

subgraph group_release["Releases"]
  node_releases["Released bundles<br/>packaged outputs<br/>[Debate.dotm]"]
end

node_debate_template -->|"hosts"| node_desktop_entry
node_debate_startup -->|"boots"| node_desktop_entry
node_desktop_entry -->|"initializes"| node_desktop_startup
node_desktop_entry -->|"commands"| node_desktop_ribbon
node_desktop_entry -->|"opens"| node_desktop_ui
node_desktop_entry -->|"shares state"| node_desktop_globals
node_desktop_entry -->|"routes to"| node_desktop_paperless
node_desktop_startup -->|"configures"| node_desktop_env
node_desktop_paperless -->|"uses"| node_desktop_formatting
node_desktop_paperless -->|"tracks"| node_desktop_caselist
node_desktop_paperless -->|"surfaces"| node_desktop_cards
node_desktop_paperless -->|"views"| node_desktop_view
node_desktop_paperless -->|"organizes"| node_desktop_virtualtub
node_desktop_flow -->|"coordinates"| node_desktop_paperless
node_desktop_cards -->|"uses"| node_desktop_ui
node_desktop_caselist -->|"uses"| node_desktop_ui
node_desktop_formatting -->|"calls out"| node_desktop_integrations
node_desktop_integrations -->|"executes"| node_desktop_plugins
node_desktop_env -->|"surfaces"| node_desktop_forms
node_setup_check -->|"shipped with"| node_releases
node_timer_app -->|"packaged as"| node_releases
node_docs_site -->|"documents"| node_releases
node_desktop_plugins -->|"bundled in"| node_releases
node_debate_template -->|"variant of"| node_desktop_mini
node_debate_template -->|"variant of"| node_desktop_flow_variant

click node_debate_template "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/Debate.dotm"
click node_debate_startup "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/DebateStartup.dotm"
click node_desktop_entry "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/ThisDocument.doccls"
click node_desktop_startup "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Startup.bas"
click node_desktop_ribbon "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Ribbon.bas"
click node_desktop_ui "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/UI.bas"
click node_desktop_globals "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Globals.bas"
click node_desktop_paperless "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Paperless.bas"
click node_desktop_formatting "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Formatting.bas"
click node_desktop_flow "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Flow.bas"
click node_desktop_cards "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/QuickCards.bas"
click node_desktop_caselist "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Caselist.bas"
click node_desktop_view "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/View.bas"
click node_desktop_virtualtub "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/VirtualTub.bas"
click node_desktop_integrations "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Search.bas"
click node_desktop_env "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Filesystem.bas"
click node_desktop_forms "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/frmSettings.frm"
click node_desktop_plugins "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/plugins/VerbatimPlugins.exe"
click node_setup_check "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/setup/Verbatim Setup Check/Verbatim Setup Check.vbproj"
click node_timer_app "https://github.com/ashtarcommunications/verbatim/blob/master/timer/src-tauri/src/main.rs"
click node_docs_site "https://github.com/ashtarcommunications/verbatim/blob/master/docs/docusaurus.config.js"
click node_releases "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/release/6.0.0/Debate.dotm"
click node_desktop_mini "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/mini/DebateMini.dotm"
click node_desktop_flow_variant "https://github.com/ashtarcommunications/verbatim/blob/master/desktop/flow/Debate.xltm"

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_debate_template,node_debate_startup,node_desktop_entry,node_desktop_startup,node_desktop_ribbon,node_desktop_ui,node_desktop_globals,node_desktop_paperless,node_desktop_formatting,node_desktop_flow,node_desktop_cards,node_desktop_caselist,node_desktop_view,node_desktop_virtualtub,node_desktop_integrations,node_desktop_env,node_desktop_forms,node_desktop_plugins,node_desktop_mini,node_desktop_flow_variant toneBlue
class node_setup_check toneAmber
class node_timer_app toneMint
class node_docs_site toneRose
class node_releases toneIndigo
```

## Components

### Desktop suite

Word/VBA product, variants, plugins, and packaging assets.

- [Debate template](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/Debate.dotm): Word VBA host · Main Word template that hosts the desktop application runtime. · `desktop/Debate.dotm`
- [Startup template](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/DebateStartup.dotm): Word VBA bootstrap · Companion template used to launch and initialize the desktop suite. · `desktop/DebateStartup.dotm`
- [Entry shell](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/ThisDocument.doccls): Word event/ribbon core · Lifecycle and command orchestration for the VBA application. · `desktop/src/ThisDocument.doccls`
- [Startup](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Startup.bas): bootstrap logic · Initialization, loading, and startup behavior. · `desktop/src/Startup.bas`
- [Ribbon](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Ribbon.bas): command surface · Ribbon actions and user command wiring. · `desktop/src/Ribbon.bas`
- [UI layer](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/UI.bas): forms and dialogs · Representative embedded forms and dialog surface over the document workflow. · `desktop/src/UI.bas`
- [Globals](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Globals.bas): shared state · Application-wide state and constants shared across VBA modules. · `desktop/src/Globals.bas`
- [Paperless](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Paperless.bas): debate workflow · Core paperless debate workflow around tubs, documents, and caselists. · `desktop/src/Paperless.bas`
- [Formatting](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Formatting.bas): evidence formatting · Formatting, shrinking, and condensation operations on documents. · `desktop/src/Formatting.bas`
- [Flow](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Flow.bas): speech flow · Speech and document flow management around debate preparation. · `desktop/src/Flow.bas`
- [Quick cards](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/QuickCards.bas): card workflow · Quick-card authoring and navigation features. · `desktop/src/QuickCards.bas`
- [Caselist](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Caselist.bas): case index · Case list browsing and selection workflow. · `desktop/src/Caselist.bas`
- [View](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/View.bas): document views · Document and tub viewing helpers within the Word workspace. · `desktop/src/View.bas`
- [Virtual tub](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/VirtualTub.bas): tub management · Virtual tub organization and navigation boundary. · `desktop/src/VirtualTub.bas`
- [Integrations](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Search.bas): external helpers · Search, OCR, HTTP, JSON, and plugin integration boundary. · `desktop/src/Search.bas`
- [Environment](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/Filesystem.bas): local helpers · Filesystem, registry, settings, license, audio, and troubleshooting helpers. · `desktop/src/Filesystem.bas`
- [Forms](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/src/frmSettings.frm): VBA dialogs · Embedded forms for setup, help, progress, stats, login, and troubleshooting. · `desktop/src/frmSettings.frm`
- [Plugins](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/plugins/VerbatimPlugins.exe): external executables · Optional standalone tools and helper executables used by the macros. · `desktop/plugins/VerbatimPlugins.exe`
- [Mini templates](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/mini/DebateMini.dotm): reduced Word templates · Smaller template variants with a reduced feature set. · `desktop/mini/DebateMini.dotm`
- [Flow variant](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/flow/Debate.xltm): alternate template set · Older or alternate Word-template implementation under the flow subtree. · `desktop/flow/Debate.xltm`

### Setup check

Standalone .NET prerequisite checker used during installation.

- [Setup check](https://github.com/ashtarcommunications/verbatim/blob/HEAD/desktop/setup/Verbatim%20Setup%20Check/Verbatim%20Setup%20Check.vbproj): .NET prereq checker · Windows desktop companion that validates installation prerequisites. · `desktop/setup/Verbatim Setup Check/Verbatim Setup Check.vbproj`

### Timer app

Independent cross-platform timer built with Tauri.

- [Timer app](https://github.com/ashtarcommunications/verbatim/blob/master/timer/src-tauri/src/main.rs): Tauri timer · Independent cross-platform debate timer application. · `timer/src-tauri/src/main.rs`

### Docs site

Separate documentation website for manuals and guides.

- [Docs site](https://github.com/ashtarcommunications/verbatim/blob/master/docs/docusaurus.config.js): Docusaurus docs · Separate documentation website for manuals and guides. · `docs/docusaurus.config.js`

### Releases

Versioned installers and shipped bundles across platforms.

- [Released bundles](https://github.com/ashtarcommunications/verbatim/blob/master/desktop/release/6.0.0/Debate.dotm): packaged outputs · Versioned installers and shipped artifacts across desktop, timer, and setup check. · `desktop/release/6.0.0/Debate.dotm`

## Connections

- Debate template → Entry shell: hosts · The Word template is the runtime host for the VBA entry shell.
- Startup template → Entry shell: boots · Startup template feeds initialization into the shared entry shell.
- Entry shell → Startup: initializes · Lifecycle events delegate to startup logic.
- Entry shell → Ribbon: commands · Ribbon commands are wired through the entry layer.
- Entry shell → UI layer: opens · Entry logic launches forms and dialogs.
- Entry shell → Globals: shares state · Global state is accessed by the orchestration layer.
- Entry shell → Paperless: routes to · Top-level actions enter the paperless debate workflow.
- Startup → Environment: configures · Startup uses environment helpers for settings, filesystem, and registry state.
- Paperless → Formatting: uses · Paperless workflow depends on formatting and document-shaping logic.
- Paperless → Caselist: tracks · Caselist management is part of the paperless boundary.
- Paperless → Quick cards: surfaces · Quick-card workflows sit on top of the core debate workflow.
- Paperless → View: views · Document and tub viewing are part of the workflow surface.
- Paperless → Virtual tub: organizes · Virtual tub structure is a core domain boundary.
- Flow → Paperless: coordinates · Flow coordinates debate document movement and workflow transitions.
- Quick cards → UI layer: uses · Quick-card features are surfaced through the UI layer.
- Caselist → UI layer: uses · Caselist browsing is exposed through the UI layer.
- Formatting → Integrations: calls out · Formatting and evidence routines can invoke external helpers.
- Integrations → Plugins: executes · Integrations reach bundled plugins and helper executables.
- Environment → Forms: surfaces · Settings, troubleshooting, and related helpers are shown through forms.
- Setup check → Released bundles: shipped with · The setup checker is included in desktop release bundles.
- Timer app → Released bundles: packaged as · The timer is built and distributed separately in multiple installer formats.
- Docs site → Released bundles: documents · Documentation explains the product suite and shipped tools.
- Plugins → Released bundles: bundled in · Plugins and helper executables are included in release artifacts.
- Debate template → Mini templates: variant of · Reduced templates derive from the main desktop Word runtime.
- Debate template → Flow variant: variant of · Alternate flow templates share the same Word/VBA architecture.
