# megahoma/mf-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/megahoma/mf-dashboard
- Repository: https://github.com/megahoma/mf-dashboard

## Overview

MF Dashboard is a VS Code sidebar extension for discovering workspace Module Federation apps, probing app and remote status, and managing federated type packages. The main workflow runs from extension activation through dashboard refresh and rendering; row actions can start apps, fetch types, or rebuild producer types and refresh consumers. The README documents the status rules, tree/flat layouts, Problems integration, and first-open settings behavior. Several feature modules are indexed but not excerpted, so uncertain internal call paths are omitted or shown as unverified.

Main entry points: [`src/widgets/mf-dashboard-tree/provider.ts`](https://github.com/megahoma/mf-dashboard/blob/main/src/widgets/mf-dashboard-tree/provider.ts) (Dashboard provider), [`src/widgets/mf-dashboard-tree/session.ts`](https://github.com/megahoma/mf-dashboard/blob/main/src/widgets/mf-dashboard-tree/session.ts) (Dashboard session), [`src/features/rebuild-types/workflow.ts`](https://github.com/megahoma/mf-dashboard/blob/main/src/features/rebuild-types/workflow.ts) (Rebuild workflow), [`src/app/extension.ts`](https://github.com/megahoma/mf-dashboard/blob/main/src/app/extension.ts) (Extension activation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Extension and view"]
  node_extension["Extension activation<br/>[extension.ts]"]
  node_tree["Dashboard provider<br/>[provider.ts]"]
  node_session["Dashboard session<br/>[session.ts]"]
  node_settings["Initial settings<br/>[defaults.ts]"]
end

subgraph group_federation["Federation discovery"]
  node_discovery["App discovery<br/>[discover.ts]"]
  node_config["Config parsing<br/>[syntax.ts]"]
  node_probe["Manifest and port probes<br/>[probe.ts]"]
  node_manifest["Manifest modules"]
end

subgraph group_status["Status and display"]
  node_classifier["Status classification<br/>[classify.ts]"]
  node_problems["Problems diagnostics<br/>[problems.ts]"]
  node_presentation["Tree presentation<br/>[presentation.ts]"]
end

subgraph group_types["Federated types"]
  node_evidence["Producer evidence<br/>[evidence.ts]"]
  node_plan["Rebuild planning<br/>[plan.ts]"]
  node_rebuild["Rebuild workflow<br/>[workflow.ts]"]
  node_generate["Type generation<br/>[generate.ts]"]
  node_type_state["Types observation<br/>[observe.ts]"]
  node_type_install["Archive installation<br/>[install.ts]"]
  node_type_sources["Source freshness<br/>[sources.ts]"]
end

subgraph group_actions["User actions"]
  node_row_actions["Row action resolution<br/>[targets.ts]"]
  node_start["Start app<br/>[start.ts]"]
  node_refetch["Fetch types<br/>[refetch.ts]"]
end

node_workspace(("Workspace"))
node_vscode(("VS Code"))

node_workspace -.->|"opens workspace"| node_extension
node_extension -.->|"registers view"| node_tree
node_tree -->|"creates session"| node_session
node_session -->|"loads apps"| node_discovery
node_session -->|"runs probes"| node_probe
node_discovery -->|"parses configs"| node_config
node_probe -.->|"reads modules"| node_manifest
node_tree -.->|"classifies rows"| node_classifier
node_tree -.->|"reports failures"| node_problems
node_session -->|"builds nodes"| node_presentation
node_extension -.->|"initializes settings"| node_settings
node_tree -->|"starts rebuild"| node_rebuild
node_rebuild -.->|"collects evidence"| node_evidence
node_rebuild -.->|"plans work"| node_plan
node_rebuild -.->|"generates types"| node_generate
node_tree -.->|"observes installed types"| node_type_state
node_type_state -.->|"checks freshness"| node_type_sources
node_tree -.->|"installs refreshed types"| node_type_install
node_tree -.->|"resolves row actions"| node_row_actions
node_tree -.->|"starts app"| node_start
node_tree -.->|"fetches types"| node_refetch
node_refetch -->|"installs archive"| node_type_install
node_vscode -.->|"hosts sidebar"| node_tree

click node_extension "https://github.com/megahoma/mf-dashboard/blob/main/src/app/extension.ts"
click node_tree "https://github.com/megahoma/mf-dashboard/blob/main/src/widgets/mf-dashboard-tree/provider.ts"
click node_session "https://github.com/megahoma/mf-dashboard/blob/main/src/widgets/mf-dashboard-tree/session.ts"
click node_discovery "https://github.com/megahoma/mf-dashboard/blob/main/src/entities/microfrontend/discover.ts"
click node_config "https://github.com/megahoma/mf-dashboard/blob/main/src/entities/microfrontend/syntax.ts"
click node_probe "https://github.com/megahoma/mf-dashboard/blob/main/src/entities/microfrontend/probe.ts"
click node_manifest "https://github.com/megahoma/mf-dashboard/blob/main/src/entities/microfrontend/manifest-modules.ts"
click node_classifier "https://github.com/megahoma/mf-dashboard/blob/main/src/entities/status/classify.ts"
click node_problems "https://github.com/megahoma/mf-dashboard/blob/main/src/entities/status/problems.ts"
click node_presentation "https://github.com/megahoma/mf-dashboard/blob/main/src/widgets/mf-dashboard-tree/presentation.ts"
click node_settings "https://github.com/megahoma/mf-dashboard/blob/main/src/features/init-settings/defaults.ts"
click node_evidence "https://github.com/megahoma/mf-dashboard/blob/main/src/features/rebuild-types/evidence.ts"
click node_plan "https://github.com/megahoma/mf-dashboard/blob/main/src/features/rebuild-types/plan.ts"
click node_rebuild "https://github.com/megahoma/mf-dashboard/blob/main/src/features/rebuild-types/workflow.ts"
click node_generate "https://github.com/megahoma/mf-dashboard/blob/main/src/features/rebuild-types/generate.ts"
click node_type_state "https://github.com/megahoma/mf-dashboard/blob/main/src/entities/federated-types/observe.ts"
click node_type_install "https://github.com/megahoma/mf-dashboard/blob/main/src/entities/federated-types/install.ts"
click node_type_sources "https://github.com/megahoma/mf-dashboard/blob/main/src/entities/federated-types/sources.ts"
click node_row_actions "https://github.com/megahoma/mf-dashboard/blob/main/src/widgets/mf-dashboard-tree/targets.ts"
click node_start "https://github.com/megahoma/mf-dashboard/blob/main/src/features/start-app/start.ts"
click node_refetch "https://github.com/megahoma/mf-dashboard/blob/main/src/features/refetch-types/refetch.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_extension,node_tree,node_session,node_settings toneBlue
class node_discovery,node_config,node_probe,node_manifest toneAmber
class node_classifier,node_problems,node_presentation toneMint
class node_evidence,node_plan,node_rebuild,node_generate,node_type_state,node_type_install,node_type_sources toneRose
class node_row_actions,node_start,node_refetch,node_workspace,node_vscode toneIndigo
```

## Components

### Extension and view

- [Extension activation](https://github.com/megahoma/mf-dashboard/blob/main/src/app/extension.ts): `src/app/extension.ts`
- [Dashboard provider](https://github.com/megahoma/mf-dashboard/blob/main/src/widgets/mf-dashboard-tree/provider.ts): `src/widgets/mf-dashboard-tree/provider.ts`
- [Dashboard session](https://github.com/megahoma/mf-dashboard/blob/main/src/widgets/mf-dashboard-tree/session.ts): `src/widgets/mf-dashboard-tree/session.ts`
- [Initial settings](https://github.com/megahoma/mf-dashboard/blob/main/src/features/init-settings/defaults.ts): `src/features/init-settings/defaults.ts`

### Federation discovery

- [App discovery](https://github.com/megahoma/mf-dashboard/blob/main/src/entities/microfrontend/discover.ts): `src/entities/microfrontend/discover.ts`
- [Config parsing](https://github.com/megahoma/mf-dashboard/blob/main/src/entities/microfrontend/syntax.ts): `src/entities/microfrontend/syntax.ts`
- [Manifest and port probes](https://github.com/megahoma/mf-dashboard/blob/main/src/entities/microfrontend/probe.ts): `src/entities/microfrontend/probe.ts`
- [Manifest modules](https://github.com/megahoma/mf-dashboard/blob/main/src/entities/microfrontend/manifest-modules.ts): `src/entities/microfrontend/manifest-modules.ts`

### Status and display

- [Status classification](https://github.com/megahoma/mf-dashboard/blob/main/src/entities/status/classify.ts): `src/entities/status/classify.ts`
- [Problems diagnostics](https://github.com/megahoma/mf-dashboard/blob/main/src/entities/status/problems.ts): `src/entities/status/problems.ts`
- [Tree presentation](https://github.com/megahoma/mf-dashboard/blob/main/src/widgets/mf-dashboard-tree/presentation.ts): `src/widgets/mf-dashboard-tree/presentation.ts`

### Federated types

- [Producer evidence](https://github.com/megahoma/mf-dashboard/blob/main/src/features/rebuild-types/evidence.ts): `src/features/rebuild-types/evidence.ts`
- [Rebuild planning](https://github.com/megahoma/mf-dashboard/blob/main/src/features/rebuild-types/plan.ts): `src/features/rebuild-types/plan.ts`
- [Rebuild workflow](https://github.com/megahoma/mf-dashboard/blob/main/src/features/rebuild-types/workflow.ts): `src/features/rebuild-types/workflow.ts`
- [Type generation](https://github.com/megahoma/mf-dashboard/blob/main/src/features/rebuild-types/generate.ts): `src/features/rebuild-types/generate.ts`
- [Types observation](https://github.com/megahoma/mf-dashboard/blob/main/src/entities/federated-types/observe.ts): `src/entities/federated-types/observe.ts`
- [Archive installation](https://github.com/megahoma/mf-dashboard/blob/main/src/entities/federated-types/install.ts): `src/entities/federated-types/install.ts`
- [Source freshness](https://github.com/megahoma/mf-dashboard/blob/main/src/entities/federated-types/sources.ts): `src/entities/federated-types/sources.ts`

### User actions

- [Row action resolution](https://github.com/megahoma/mf-dashboard/blob/main/src/widgets/mf-dashboard-tree/targets.ts): `src/widgets/mf-dashboard-tree/targets.ts`
- [Start app](https://github.com/megahoma/mf-dashboard/blob/main/src/features/start-app/start.ts): `src/features/start-app/start.ts`
- [Fetch types](https://github.com/megahoma/mf-dashboard/blob/main/src/features/refetch-types/refetch.ts): `src/features/refetch-types/refetch.ts`

### Other components

- **Workspace**
- **VS Code**

## Connections

- Workspace → Extension activation: opens workspace
- Extension activation → Dashboard provider: registers view (evidence: `src/app/extension.ts`)
- Dashboard provider → Dashboard session: creates session (evidence: `src/widgets/mf-dashboard-tree/provider.ts`)
- Dashboard session → App discovery: loads apps (evidence: `src/widgets/mf-dashboard-tree/session.ts`)
- Dashboard session → Manifest and port probes: runs probes (evidence: `src/widgets/mf-dashboard-tree/session.ts`)
- App discovery → Config parsing: parses configs (evidence: `src/entities/microfrontend/discover.ts`)
- Manifest and port probes → Manifest modules: reads modules (evidence: `src/entities/microfrontend/probe.ts`)
- Dashboard provider → Status classification: classifies rows
- Dashboard provider → Problems diagnostics: reports failures
- Dashboard session → Tree presentation: builds nodes (evidence: `src/widgets/mf-dashboard-tree/session.ts`)
- Extension activation → Initial settings: initializes settings (evidence: `src/app/extension.ts`)
- Dashboard provider → Rebuild workflow: starts rebuild (evidence: `src/widgets/mf-dashboard-tree/provider.ts`)
- Rebuild workflow → Producer evidence: collects evidence (evidence: `src/features/rebuild-types/workflow.ts`)
- Rebuild workflow → Rebuild planning: plans work (evidence: `src/features/rebuild-types/workflow.ts`)
- Rebuild workflow → Type generation: generates types (evidence: `src/features/rebuild-types/workflow.ts`)
- Dashboard provider → Types observation: observes installed types
- Types observation → Source freshness: checks freshness
- Dashboard provider → Archive installation: installs refreshed types
- Dashboard provider → Row action resolution: resolves row actions
- Dashboard provider → Start app: starts app (evidence: `src/widgets/mf-dashboard-tree/provider.ts`)
- Dashboard provider → Fetch types: fetches types (evidence: `src/widgets/mf-dashboard-tree/provider.ts`)
- Fetch types → Archive installation: installs archive (evidence: `src/features/refetch-types/refetch.ts`)
- VS Code → Dashboard provider: hosts sidebar
