# webappski/aeo-platform architecture

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

- Interactive diagram: https://gitdiagram.com/webappski/aeo-platform
- Repository: https://github.com/webappski/aeo-platform

## Overview

aeo-platform is a local CLI for measuring brand visibility in AI-answer engines and turning the measurements into reports and optimization guidance. The principal workflow is setup and query selection, a multi-engine audit, then scoring, comparison, and report generation. Separate documented capabilities include crawlability and authority audits, regional and repeated sampling, offline replay, and export of brand context for a 30-day plan. Source excerpts show parts of setup, research, identity, and reporting internals; several runtime connections below rely on README descriptions or source-index references rather than inspected implementations.

Main entry points: [`bin/aeo-tracker.js`](https://github.com/webappski/aeo-platform/blob/main/bin/aeo-tracker.js) (Audit execution), [`lib/report/html.js`](https://github.com/webappski/aeo-platform/blob/main/lib/report/html.js) (HTML and Markdown reports), [`lib/init/research/research.js`](https://github.com/webappski/aeo-platform/blob/main/lib/init/research/research.js) (Query research), [`lib/providers`](https://github.com/webappski/aeo-platform/tree/main/lib/providers) (Answer-engine providers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and setup"]
  node_cli["CLI commands<br/>[aeo-tracker.js]"]
  node_setup["Setup wizard<br/>[aeo-tracker.js]"]
  node_site["Site discovery<br/>[fetch-site.js]"]
  node_research["Query research<br/>[research.js]"]
  node_validation["Query validation<br/>[run-validation.js]"]
  node_config["Brand configuration<br/>[config.js]"]
end

subgraph group_measurement["Measurement"]
  node_providers["Answer-engine providers"]
  node_services{{"Provider APIs"}}
  node_run["Audit execution<br/>[aeo-tracker.js]"]
  node_records[("Run records<br/>[aeo-tracker.js]")]
end

subgraph group_analysis["Analysis"]
  node_matching["Mention matching<br/>[brand-match.js]"]
  node_competitors["Competitor analysis"]
  node_score["Visibility scoring<br/>[score.js]"]
  node_diff["Run comparison<br/>[diff.js]"]
  node_audits["Crawlability and authority"]
end

subgraph group_outputs["Reports and guidance"]
  node_report["HTML and Markdown reports<br/>[html.js]"]
  node_visuals["Report visualizations"]
  node_context["Brand-context export<br/>[mc-payload.mjs]"]
end

subgraph group_internals["Shared internals"]
  node_identity["Query identity<br/>[basket-manifest.js]"]
end

node_user(("CLI user"))

node_user -->|"runs commands"| node_cli
node_cli -->|"dispatches init"| node_setup
node_setup -.->|"discovers site"| node_site
node_setup -.->|"suggests queries"| node_research
node_research -->|"validates queries"| node_validation
node_setup -->|"writes config"| node_config
node_cli -->|"dispatches run"| node_run
node_run -.->|"reads settings"| node_config
node_run -->|"queries engines"| node_providers
node_providers -->|"calls APIs"| node_services
node_run -->|"records answers"| node_records
node_run -->|"assigns query IDs"| node_identity
node_run -->|"checks mentions"| node_matching
node_run -.->|"cross-checks brands"| node_competitors
node_run -->|"scores visibility"| node_score
node_cli -.->|"compares runs"| node_diff
node_cli -->|"runs audits"| node_audits
node_cli -->|"dispatches report"| node_report
node_report -.->|"renders charts"| node_visuals
node_report -->|"presents score"| node_score
node_cli -->|"exports context"| node_context

click node_cli "https://github.com/webappski/aeo-platform/blob/main/bin/aeo-tracker.js"
click node_setup "https://github.com/webappski/aeo-platform/blob/main/bin/aeo-tracker.js"
click node_site "https://github.com/webappski/aeo-platform/blob/main/lib/init/fetch-site.js"
click node_research "https://github.com/webappski/aeo-platform/blob/main/lib/init/research/research.js"
click node_validation "https://github.com/webappski/aeo-platform/blob/main/lib/init/research/run-validation.js"
click node_config "https://github.com/webappski/aeo-platform/blob/main/lib/config.js"
click node_providers "https://github.com/webappski/aeo-platform/tree/main/lib/providers"
click node_run "https://github.com/webappski/aeo-platform/blob/main/bin/aeo-tracker.js"
click node_records "https://github.com/webappski/aeo-platform/blob/main/bin/aeo-tracker.js"
click node_identity "https://github.com/webappski/aeo-platform/blob/main/lib/basket-manifest.js"
click node_matching "https://github.com/webappski/aeo-platform/blob/main/lib/brand-match.js"
click node_competitors "https://github.com/webappski/aeo-platform/blob/main/lib/report/extract-competitors-llm.js"
click node_score "https://github.com/webappski/aeo-platform/blob/main/lib/score.js"
click node_diff "https://github.com/webappski/aeo-platform/blob/main/lib/diff.js"
click node_audits "https://github.com/webappski/aeo-platform/tree/main/lib/report"
click node_report "https://github.com/webappski/aeo-platform/blob/main/lib/report/html.js"
click node_visuals "https://github.com/webappski/aeo-platform/tree/main/lib/svg"
click node_context "https://github.com/webappski/aeo-platform/blob/main/bin/mc-payload.mjs"

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_cli,node_setup,node_site,node_research,node_validation,node_config,node_user toneBlue
class node_providers,node_services,node_run,node_records toneAmber
class node_matching,node_competitors,node_score,node_diff,node_audits toneMint
class node_report,node_visuals,node_context toneRose
class node_identity toneIndigo
```

## Components

### CLI and setup

- [CLI commands](https://github.com/webappski/aeo-platform/blob/main/bin/aeo-tracker.js): `bin/aeo-tracker.js`
- [Setup wizard](https://github.com/webappski/aeo-platform/blob/main/bin/aeo-tracker.js): `bin/aeo-tracker.js`
- [Site discovery](https://github.com/webappski/aeo-platform/blob/main/lib/init/fetch-site.js): `lib/init/fetch-site.js`
- [Query research](https://github.com/webappski/aeo-platform/blob/main/lib/init/research/research.js): `lib/init/research/research.js`
- [Query validation](https://github.com/webappski/aeo-platform/blob/main/lib/init/research/run-validation.js): `lib/init/research/run-validation.js`
- [Brand configuration](https://github.com/webappski/aeo-platform/blob/main/lib/config.js): `lib/config.js`

### Measurement

- [Answer-engine providers](https://github.com/webappski/aeo-platform/tree/main/lib/providers): `lib/providers`
- **Provider APIs**
- [Audit execution](https://github.com/webappski/aeo-platform/blob/main/bin/aeo-tracker.js): `bin/aeo-tracker.js`
- [Run records](https://github.com/webappski/aeo-platform/blob/main/bin/aeo-tracker.js): `bin/aeo-tracker.js`

### Analysis

- [Mention matching](https://github.com/webappski/aeo-platform/blob/main/lib/brand-match.js): `lib/brand-match.js`
- [Competitor analysis](https://github.com/webappski/aeo-platform/blob/main/lib/report/extract-competitors-llm.js): `lib/report/extract-competitors-llm.js`
- [Visibility scoring](https://github.com/webappski/aeo-platform/blob/main/lib/score.js): `lib/score.js`
- [Run comparison](https://github.com/webappski/aeo-platform/blob/main/lib/diff.js): `lib/diff.js`
- [Crawlability and authority](https://github.com/webappski/aeo-platform/tree/main/lib/report): `lib/report`

### Reports and guidance

- [HTML and Markdown reports](https://github.com/webappski/aeo-platform/blob/main/lib/report/html.js): `lib/report/html.js`
- [Report visualizations](https://github.com/webappski/aeo-platform/tree/main/lib/svg): `lib/svg`
- [Brand-context export](https://github.com/webappski/aeo-platform/blob/main/bin/mc-payload.mjs): `bin/mc-payload.mjs`

### Shared internals

- [Query identity](https://github.com/webappski/aeo-platform/blob/main/lib/basket-manifest.js): `lib/basket-manifest.js`

### Other components

- **CLI user**

## Connections

- CLI user → CLI commands: runs commands
- CLI commands → Setup wizard: dispatches init (evidence: `bin/aeo-tracker.js`)
- Setup wizard → Site discovery: discovers site
- Setup wizard → Query research: suggests queries
- Query research → Query validation: validates queries (evidence: `lib/init/research/research.js`)
- Setup wizard → Brand configuration: writes config (evidence: `bin/aeo-tracker.js`)
- CLI commands → Audit execution: dispatches run (evidence: `bin/aeo-tracker.js`)
- Audit execution → Brand configuration: reads settings (evidence: `bin/aeo-tracker.js`)
- Audit execution → Answer-engine providers: queries engines (evidence: `bin/aeo-tracker.js`)
- Answer-engine providers → Provider APIs: calls APIs
- Audit execution → Run records: records answers (evidence: `bin/aeo-tracker.js`)
- Audit execution → Query identity: assigns query IDs (evidence: `bin/aeo-tracker.js`)
- Audit execution → Mention matching: checks mentions (evidence: `bin/aeo-tracker.js`)
- Audit execution → Competitor analysis: cross-checks brands (evidence: `bin/aeo-tracker.js`)
- Audit execution → Visibility scoring: scores visibility (evidence: `bin/aeo-tracker.js`)
- CLI commands → Run comparison: compares runs (evidence: `bin/aeo-tracker.js`)
- CLI commands → Crawlability and authority: runs audits (evidence: `bin/aeo-tracker.js`)
- CLI commands → HTML and Markdown reports: dispatches report (evidence: `bin/aeo-tracker.js`)
- HTML and Markdown reports → Report visualizations: renders charts
- HTML and Markdown reports → Visibility scoring: presents score
- CLI commands → Brand-context export: exports context
