# srwither/m3ui-vue architecture

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

- Interactive diagram: https://gitdiagram.com/srwither/m3ui-vue
- Repository: https://github.com/srwither/m3ui-vue

## Overview

M3UI Vue is a Material Design 3 component library for Vue 3 and Tailwind CSS. An application imports components or composables from the package API, optionally installs the plugin to configure palette and locale behavior, then uses the library’s widgets and directives in its UI. The product spans general-purpose components and domain-specific tools for maps, flows, charts, documents, media, and editing. The graph groups related capabilities rather than listing every component. Unsampled subsystems are included where the README documents them; their internal call relationships are not inferred.

Main entry points: [`src/plugin.ts`](https://github.com/srwither/m3ui-vue/blob/main/src/plugin.ts) (Vue plugin), [`src/composables/useColorPalette.ts`](https://github.com/srwither/m3ui-vue/blob/main/src/composables/useColorPalette.ts) (Color palettes), [`src/index.ts`](https://github.com/srwither/m3ui-vue/blob/main/src/index.ts) (Package API), [`src/composables/_ssrState.ts`](https://github.com/srwither/m3ui-vue/blob/main/src/composables/_ssrState.ts) (SSR state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Library entry"]
  node_api["Package API<br/>[index.ts]"]
  node_plugin["Vue plugin<br/>[plugin.ts]"]
end

subgraph group_design["Theme and interaction"]
  node_theme["Theme control<br/>[useTheme.ts]"]
  node_palette["Color palettes<br/>[useColorPalette.ts]"]
  node_color["Dynamic color<br/>[dynamicColor.ts]"]
  node_locale["Localization<br/>[useLocale.ts]"]
  node_ssr["SSR state<br/>[_ssrState.ts]"]
  node_storage["Storage keys<br/>[_storageKeys.ts]"]
  node_directives["Interaction directives"]
end

subgraph group_ui["UI components"]
  node_components["Component library"]
  node_inputs["Inputs and actions"]
  node_display["Data display"]
  node_layout["Layout and navigation"]
end

subgraph group_visual["Visual tools"]
  node_charts["Charts<br/>[chart.ts]"]
  node_draw["Drawing tools<br/>[draw.ts]"]
  node_maps["Map tools<br/>[map.ts]"]
  node_flow["Flow diagrams<br/>[flow.ts]"]
  node_gantt["Gantt and timeline<br/>[gantt.ts]"]
end

subgraph group_special["Specialized tools"]
  node_pdf["PDF viewing<br/>[pdf.ts]"]
  node_media["Media playback<br/>[media.ts]"]
  node_editors["Editors and code"]
  node_barcode["Barcode tools<br/>[barcode.ts]"]
  node_markdown["Markdown<br/>[markdown.ts]"]
end

node_developer(("Application developer"))

node_developer -->|"imports"| node_api
node_api -->|"exports"| node_plugin
node_api -->|"exports components"| node_components
node_plugin -->|"configures"| node_palette
node_plugin -->|"provides locale"| node_locale
node_plugin -->|"reads state"| node_ssr
node_plugin -->|"uses keys"| node_storage
node_palette -->|"generates schemes"| node_color
node_palette -->|"reads and writes"| node_ssr
node_palette -->|"uses keys"| node_storage
node_ssr -->|"uses keys"| node_storage
node_developer -->|"uses"| node_inputs
node_developer -->|"uses"| node_display
node_developer -->|"uses"| node_layout
node_developer -->|"uses"| node_charts
node_developer -->|"uses"| node_draw
node_developer -->|"uses"| node_maps
node_developer -->|"uses"| node_flow
node_developer -->|"uses"| node_gantt
node_developer -->|"uses"| node_pdf
node_developer -->|"uses"| node_media
node_developer -->|"uses"| node_editors
node_developer -->|"uses"| node_barcode
node_developer -->|"uses"| node_markdown

click node_api "https://github.com/srwither/m3ui-vue/blob/main/src/index.ts"
click node_plugin "https://github.com/srwither/m3ui-vue/blob/main/src/plugin.ts"
click node_components "https://github.com/srwither/m3ui-vue/tree/main/src/components"
click node_theme "https://github.com/srwither/m3ui-vue/blob/main/src/composables/useTheme.ts"
click node_palette "https://github.com/srwither/m3ui-vue/blob/main/src/composables/useColorPalette.ts"
click node_color "https://github.com/srwither/m3ui-vue/blob/main/src/composables/dynamicColor.ts"
click node_locale "https://github.com/srwither/m3ui-vue/blob/main/src/composables/useLocale.ts"
click node_ssr "https://github.com/srwither/m3ui-vue/blob/main/src/composables/_ssrState.ts"
click node_storage "https://github.com/srwither/m3ui-vue/blob/main/src/composables/_storageKeys.ts"
click node_directives "https://github.com/srwither/m3ui-vue/tree/main/src/directives"
click node_inputs "https://github.com/srwither/m3ui-vue/tree/main/src/components"
click node_display "https://github.com/srwither/m3ui-vue/tree/main/src/components"
click node_layout "https://github.com/srwither/m3ui-vue/tree/main/src/components"
click node_charts "https://github.com/srwither/m3ui-vue/blob/main/src/chart.ts"
click node_draw "https://github.com/srwither/m3ui-vue/blob/main/src/draw.ts"
click node_maps "https://github.com/srwither/m3ui-vue/blob/main/src/map.ts"
click node_flow "https://github.com/srwither/m3ui-vue/blob/main/src/flow.ts"
click node_gantt "https://github.com/srwither/m3ui-vue/blob/main/src/gantt.ts"
click node_pdf "https://github.com/srwither/m3ui-vue/blob/main/src/pdf.ts"
click node_media "https://github.com/srwither/m3ui-vue/blob/main/src/media.ts"
click node_editors "https://github.com/srwither/m3ui-vue/tree/main/src"
click node_barcode "https://github.com/srwither/m3ui-vue/blob/main/src/barcode.ts"
click node_markdown "https://github.com/srwither/m3ui-vue/blob/main/src/markdown.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_api,node_plugin toneBlue
class node_theme,node_palette,node_color,node_locale,node_ssr,node_storage,node_directives toneAmber
class node_components,node_inputs,node_display,node_layout toneMint
class node_charts,node_draw,node_maps,node_flow,node_gantt toneRose
class node_pdf,node_media,node_editors,node_barcode,node_markdown,node_developer toneIndigo
```

## Components

### Library entry

- [Package API](https://github.com/srwither/m3ui-vue/blob/main/src/index.ts): `src/index.ts`
- [Vue plugin](https://github.com/srwither/m3ui-vue/blob/main/src/plugin.ts): `src/plugin.ts`

### Theme and interaction

- [Theme control](https://github.com/srwither/m3ui-vue/blob/main/src/composables/useTheme.ts): `src/composables/useTheme.ts`
- [Color palettes](https://github.com/srwither/m3ui-vue/blob/main/src/composables/useColorPalette.ts): `src/composables/useColorPalette.ts`
- [Dynamic color](https://github.com/srwither/m3ui-vue/blob/main/src/composables/dynamicColor.ts): `src/composables/dynamicColor.ts`
- [Localization](https://github.com/srwither/m3ui-vue/blob/main/src/composables/useLocale.ts): `src/composables/useLocale.ts`
- [SSR state](https://github.com/srwither/m3ui-vue/blob/main/src/composables/_ssrState.ts): `src/composables/_ssrState.ts`
- [Storage keys](https://github.com/srwither/m3ui-vue/blob/main/src/composables/_storageKeys.ts): `src/composables/_storageKeys.ts`
- [Interaction directives](https://github.com/srwither/m3ui-vue/tree/main/src/directives): `src/directives`

### UI components

- [Component library](https://github.com/srwither/m3ui-vue/tree/main/src/components): `src/components`
- [Inputs and actions](https://github.com/srwither/m3ui-vue/tree/main/src/components): `src/components`
- [Data display](https://github.com/srwither/m3ui-vue/tree/main/src/components): `src/components`
- [Layout and navigation](https://github.com/srwither/m3ui-vue/tree/main/src/components): `src/components`

### Visual tools

- [Charts](https://github.com/srwither/m3ui-vue/blob/main/src/chart.ts): `src/chart.ts`
- [Drawing tools](https://github.com/srwither/m3ui-vue/blob/main/src/draw.ts): `src/draw.ts`
- [Map tools](https://github.com/srwither/m3ui-vue/blob/main/src/map.ts): `src/map.ts`
- [Flow diagrams](https://github.com/srwither/m3ui-vue/blob/main/src/flow.ts): `src/flow.ts`
- [Gantt and timeline](https://github.com/srwither/m3ui-vue/blob/main/src/gantt.ts): `src/gantt.ts`

### Specialized tools

- [PDF viewing](https://github.com/srwither/m3ui-vue/blob/main/src/pdf.ts): `src/pdf.ts`
- [Media playback](https://github.com/srwither/m3ui-vue/blob/main/src/media.ts): `src/media.ts`
- [Editors and code](https://github.com/srwither/m3ui-vue/tree/main/src): `src`
- [Barcode tools](https://github.com/srwither/m3ui-vue/blob/main/src/barcode.ts): `src/barcode.ts`
- [Markdown](https://github.com/srwither/m3ui-vue/blob/main/src/markdown.ts): `src/markdown.ts`

### Other components

- **Application developer**

## Connections

- Application developer → Package API: imports (evidence: `README.md`)
- Package API → Vue plugin: exports (evidence: `src/index.ts`)
- Package API → Component library: exports components (evidence: `src/index.ts`)
- Vue plugin → Color palettes: configures (evidence: `src/plugin.ts`)
- Vue plugin → Localization: provides locale (evidence: `src/plugin.ts`)
- Vue plugin → SSR state: reads state (evidence: `src/plugin.ts`)
- Vue plugin → Storage keys: uses keys (evidence: `src/plugin.ts`)
- Color palettes → Dynamic color: generates schemes (evidence: `src/composables/useColorPalette.ts`)
- Color palettes → SSR state: reads and writes (evidence: `src/composables/useColorPalette.ts`)
- Color palettes → Storage keys: uses keys (evidence: `src/composables/useColorPalette.ts`)
- SSR state → Storage keys: uses keys (evidence: `src/composables/_ssrState.ts`)
- Application developer → Inputs and actions: uses (evidence: `README.md`)
- Application developer → Data display: uses (evidence: `README.md`)
- Application developer → Layout and navigation: uses (evidence: `README.md`)
- Application developer → Charts: uses (evidence: `README.md`)
- Application developer → Drawing tools: uses (evidence: `README.md`)
- Application developer → Map tools: uses (evidence: `README.md`)
- Application developer → Flow diagrams: uses (evidence: `README.md`)
- Application developer → Gantt and timeline: uses (evidence: `README.md`)
- Application developer → PDF viewing: uses (evidence: `README.md`)
- Application developer → Media playback: uses (evidence: `README.md`)
- Application developer → Editors and code: uses (evidence: `README.md`)
- Application developer → Barcode tools: uses (evidence: `README.md`)
- Application developer → Markdown: uses (evidence: `README.md`)
