# gregwiechec/extended-external-links architecture

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

- Interactive diagram: https://gitdiagram.com/gregwiechec/extended-external-links
- Repository: https://github.com/gregwiechec/extended-external-links

## Overview

This repository adds an Optimizely CMS external-links property: editors can inspect external links found in CMS content, view them individually or grouped by host, and export detailed results as CSV. The main backend flow is the authorized controller calling a manager that loads soft links, resolves and filters their content, then returns detail or aggregate data. A client-side React interface presents the lists and commands. The README gives no further capability details; some client wiring is unsampled, so those relationships are marked unverified rather than asserted.

Main entry points: [`clientResources/src/components/external-links-list/external-links-list.tsx`](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-list/external-links-list.tsx) (Links list), [`src/ExtendedExternalLinks/LinksManager/LinksManager.cs`](https://github.com/gregwiechec/extended-external-links/blob/master/src/ExtendedExternalLinks/LinksManager/LinksManager.cs) (Link discovery), [`clientResources/src/components/external-links-component/external-links-component.tsx`](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-component/external-links-component.tsx) (Links component), [`clientResources/src/data-service/data-service.ts`](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/data-service/data-service.ts) (Data service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_backend["CMS backend"]
  node_links_controller["Links API"]
  node_links_manager["Link discovery<br/>[LinksManager.cs]"]
  node_component_provider["Component provider"]
  node_external_component["CMS component"]
end

subgraph group_client["Editor interface"]
  node_client_wrapper["Component wrapper"]
  node_client_component["Links component"]
  node_commands["Editor commands"]
  node_view["Links view"]
  node_links_list["Links list"]
  node_detail_list["Detailed list"]
  node_aggregate_list["Host summaries"]
  node_list_state["List state<br/>[use-manage-list.ts]"]
  node_data_service["Data service<br/>[data-service.ts]"]
  node_fake_service["Fake data service"]
end

subgraph group_contracts["Link data"]
  node_data_contracts["Link data types<br/>[definitions.ts]"]
end

node_editor(("CMS editor"))
node_cms_softlinks[("Soft-link repository")]
node_cms_content["CMS content loader"]

node_editor -.->|"requests links"| node_links_controller
node_links_controller -->|"requests results"| node_links_manager
node_links_manager -->|"loads soft links"| node_cms_softlinks
node_links_manager -->|"resolves content"| node_cms_content
node_component_provider -->|"provides component"| node_external_component
node_editor -.->|"opens editor UI"| node_client_wrapper
node_client_wrapper -.->|"wraps component"| node_client_component
node_client_component -.->|"dispatches commands"| node_commands
node_client_component -.->|"shows view"| node_view
node_view -.->|"renders list"| node_links_list
node_links_list -->|"renders details"| node_detail_list
node_links_list -->|"renders summaries"| node_aggregate_list
node_links_list -.->|"manages list"| node_list_state
node_list_state -.->|"loads link data"| node_data_service
node_data_service -.->|"requests link data"| node_links_controller
node_fake_service -->|"uses data types"| node_data_contracts
node_data_service -->|"uses data types"| node_data_contracts

click node_links_controller "https://github.com/gregwiechec/extended-external-links/blob/master/src/ExtendedExternalLinks/ExternalLinksController.cs"
click node_links_manager "https://github.com/gregwiechec/extended-external-links/blob/master/src/ExtendedExternalLinks/LinksManager/LinksManager.cs"
click node_component_provider "https://github.com/gregwiechec/extended-external-links/blob/master/src/ExtendedExternalLinks/Component/ExternalLinksComponentProvider.cs"
click node_external_component "https://github.com/gregwiechec/extended-external-links/blob/master/src/ExtendedExternalLinks/Component/ExternalLinksComponent.cs"
click node_client_wrapper "https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-component/external-links-component-wrapper.tsx"
click node_client_component "https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-component/external-links-component.tsx"
click node_commands "https://github.com/gregwiechec/extended-external-links/tree/master/clientResources/src/components/external-links-component/commands"
click node_view "https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-view/external-links-view.tsx"
click node_links_list "https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-list/external-links-list.tsx"
click node_detail_list "https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-list/detailed-items-list/detailed-items-list.tsx"
click node_aggregate_list "https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-list/aggregated-items-list/aggregated-items-list.tsx"
click node_list_state "https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/hooks/use-manage-list.ts"
click node_data_service "https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/data-service/data-service.ts"
click node_fake_service "https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/data-service/fake-data-service.ts"
click node_data_contracts "https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/definitions.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_links_controller,node_links_manager,node_component_provider,node_external_component toneBlue
class node_client_wrapper,node_client_component,node_commands,node_view,node_links_list,node_detail_list,node_aggregate_list,node_list_state,node_data_service,node_fake_service,node_cms_softlinks toneAmber
class node_data_contracts toneMint
class node_editor,node_cms_content toneIndigo
```

## Components

### CMS backend

- [Links API](https://github.com/gregwiechec/extended-external-links/blob/master/src/ExtendedExternalLinks/ExternalLinksController.cs): `src/ExtendedExternalLinks/ExternalLinksController.cs`
- [Link discovery](https://github.com/gregwiechec/extended-external-links/blob/master/src/ExtendedExternalLinks/LinksManager/LinksManager.cs): `src/ExtendedExternalLinks/LinksManager/LinksManager.cs`
- [Component provider](https://github.com/gregwiechec/extended-external-links/blob/master/src/ExtendedExternalLinks/Component/ExternalLinksComponentProvider.cs): `src/ExtendedExternalLinks/Component/ExternalLinksComponentProvider.cs`
- [CMS component](https://github.com/gregwiechec/extended-external-links/blob/master/src/ExtendedExternalLinks/Component/ExternalLinksComponent.cs): `src/ExtendedExternalLinks/Component/ExternalLinksComponent.cs`

### Editor interface

- [Component wrapper](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-component/external-links-component-wrapper.tsx): `clientResources/src/components/external-links-component/external-links-component-wrapper.tsx`
- [Links component](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-component/external-links-component.tsx): `clientResources/src/components/external-links-component/external-links-component.tsx`
- [Editor commands](https://github.com/gregwiechec/extended-external-links/tree/master/clientResources/src/components/external-links-component/commands): `clientResources/src/components/external-links-component/commands`
- [Links view](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-view/external-links-view.tsx): `clientResources/src/components/external-links-view/external-links-view.tsx`
- [Links list](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-list/external-links-list.tsx): `clientResources/src/components/external-links-list/external-links-list.tsx`
- [Detailed list](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-list/detailed-items-list/detailed-items-list.tsx): `clientResources/src/components/external-links-list/detailed-items-list/detailed-items-list.tsx`
- [Host summaries](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/components/external-links-list/aggregated-items-list/aggregated-items-list.tsx): `clientResources/src/components/external-links-list/aggregated-items-list/aggregated-items-list.tsx`
- [List state](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/hooks/use-manage-list.ts): `clientResources/src/hooks/use-manage-list.ts`
- [Data service](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/data-service/data-service.ts): `clientResources/src/data-service/data-service.ts`
- [Fake data service](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/data-service/fake-data-service.ts): `clientResources/src/data-service/fake-data-service.ts`

### Link data

- [Link data types](https://github.com/gregwiechec/extended-external-links/blob/master/clientResources/src/definitions.ts): `clientResources/src/definitions.ts`

### Other components

- **CMS editor**
- **Soft-link repository**
- **CMS content loader**

## Connections

- CMS editor → Links API: requests links
- Links API → Link discovery: requests results (evidence: `src/ExtendedExternalLinks/ExternalLinksController.cs`)
- Link discovery → Soft-link repository: loads soft links (evidence: `src/ExtendedExternalLinks/LinksManager/LinksManager.cs`)
- Link discovery → CMS content loader: resolves content (evidence: `src/ExtendedExternalLinks/LinksManager/LinksManager.cs`)
- Component provider → CMS component: provides component (evidence: `src/ExtendedExternalLinks/Component/ExternalLinksComponentProvider.cs`)
- CMS editor → Component wrapper: opens editor UI
- Component wrapper → Links component: wraps component
- Links component → Editor commands: dispatches commands
- Links component → Links view: shows view
- Links view → Links list: renders list
- Links list → Detailed list: renders details (evidence: `clientResources/src/components/external-links-list/external-links-list.tsx`)
- Links list → Host summaries: renders summaries (evidence: `clientResources/src/components/external-links-list/external-links-list.tsx`)
- Links list → List state: manages list
- List state → Data service: loads link data
- Data service → Links API: requests link data
- Fake data service → Link data types: uses data types (evidence: `clientResources/src/data-service/fake-data-service.ts`)
- Data service → Link data types: uses data types (evidence: `clientResources/src/data-service/data-service.ts`)
