# codewithmuhilan/lightswind-ui-library architecture

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

- Interactive diagram: https://gitdiagram.com/codewithmuhilan/lightswind-ui-library
- Repository: https://github.com/codewithmuhilan/lightswind-ui-library

## Overview

Lightswind UI delivers React component source into a developer’s project through a CLI and an MCP server. The principal workflow is to initialize a project, choose and add components, then use the copied source locally; the CLI also supports authenticated Pro delivery. The repository includes a large component catalog, a Tailwind plugin, and a component-browser sidebar. The README documents the broad CLI and MCP capabilities; sampled source confirms selected CLI, MCP, and component behavior, but not every internal route or data connection.

Main entry points: [`src/mcp/index.ts`](https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/src/mcp/index.ts) (MCP server), [`bin/lightswind.js`](https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/bin/lightswind.js) (Lightswind CLI), [`src/index.ts`](https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/src/index.ts) (React component exports), [`src/components/ui`](https://github.com/codewithmuhilan/lightswind-ui-library/tree/Master/src/components/ui) (Project components)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_delivery["Source delivery"]
  node_cli["Lightswind CLI<br/>[lightswind.js]"]
  node_local["Project components"]
  node_license["Pro licensing service"]
end

subgraph group_ai["AI access"]
  node_mcp["MCP server<br/>[index.ts]"]
end

subgraph group_catalog["Component catalog"]
  node_catalog["Component sources"]
  node_blocks["Pro blocks"]
  node_sidebar["Component browser"]
  node_reactcomponents["React component exports<br/>[index.ts]"]
end

subgraph group_support["Library support"]
  node_plugin["Tailwind plugin<br/>[plugin.js]"]
  node_utilities["Component utilities<br/>[utils.ts]"]
  node_github["GitHub content API"]
  node_githubclient["GitHub client<br/>[githubClient.ts]"]
  node_sso["SSO handling<br/>[sso.js]"]
  node_userverify["User verification"]
end

node_developer(("Developer"))
node_agent(("AI coding agent"))

node_developer -->|"runs commands"| node_cli
node_cli -->|"installs source"| node_local
node_cli -->|"authenticates"| node_license
node_developer -->|"starts server"| node_mcp
node_agent -->|"requests tools"| node_mcp
node_mcp -->|"lists and fetches"| node_catalog
node_mcp -->|"fetches blocks"| node_blocks
node_mcp -->|"installs components"| node_local
node_sidebar -.->|"browses components"| node_reactcomponents
node_reactcomponents -.->|"uses utilities"| node_utilities
node_githubclient -->|"fetches content"| node_github

click node_cli "https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/bin/lightswind.js"
click node_local "https://github.com/codewithmuhilan/lightswind-ui-library/tree/Master/src/components/ui"
click node_mcp "https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/src/mcp/index.ts"
click node_catalog "https://github.com/codewithmuhilan/lightswind-ui-library/tree/Master/registry"
click node_blocks "https://github.com/codewithmuhilan/lightswind-ui-library/tree/Master/src/mcp"
click node_sidebar "https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/lib/ComponentsSidebar.tsx"
click node_reactcomponents "https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/src/index.ts"
click node_plugin "https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/plugin.js"
click node_utilities "https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/src/components/lib/utils.ts"
click node_githubclient "https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/lib/githubClient.ts"
click node_sso "https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/lib/sso.js"

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_local,node_license toneBlue
class node_mcp toneAmber
class node_catalog,node_blocks,node_sidebar,node_reactcomponents toneMint
class node_plugin,node_utilities,node_github,node_githubclient,node_sso,node_userverify toneRose
class node_developer,node_agent toneIndigo
```

## Components

### Source delivery

- [Lightswind CLI](https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/bin/lightswind.js): `bin/lightswind.js`
- [Project components](https://github.com/codewithmuhilan/lightswind-ui-library/tree/Master/src/components/ui): `src/components/ui`
- **Pro licensing service**

### AI access

- [MCP server](https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/src/mcp/index.ts): `src/mcp/index.ts`

### Component catalog

- [Component sources](https://github.com/codewithmuhilan/lightswind-ui-library/tree/Master/registry): `registry`
- [Pro blocks](https://github.com/codewithmuhilan/lightswind-ui-library/tree/Master/src/mcp): `src/mcp`
- [Component browser](https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/lib/ComponentsSidebar.tsx): `lib/ComponentsSidebar.tsx`
- [React component exports](https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/src/index.ts): `src/index.ts`

### Library support

- [Tailwind plugin](https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/plugin.js): `plugin.js`
- [Component utilities](https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/src/components/lib/utils.ts): `src/components/lib/utils.ts`
- **GitHub content API**
- [GitHub client](https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/lib/githubClient.ts): `lib/githubClient.ts`
- [SSO handling](https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/lib/sso.js): `lib/sso.js`
- **User verification**

### Other components

- **Developer**
- **AI coding agent**

## Connections

- Developer → Lightswind CLI: runs commands (evidence: `README.md`)
- Lightswind CLI → Project components: installs source (evidence: `README.md`)
- Lightswind CLI → Pro licensing service: authenticates (evidence: `bin/lightswind.js`)
- Developer → MCP server: starts server (evidence: `README.md`)
- AI coding agent → MCP server: requests tools (evidence: `README.md`)
- MCP server → Component sources: lists and fetches (evidence: `README.md`)
- MCP server → Pro blocks: fetches blocks (evidence: `README.md`)
- MCP server → Project components: installs components (evidence: `README.md`)
- Component browser → React component exports: browses components
- React component exports → Component utilities: uses utilities
- GitHub client → GitHub content API: fetches content (evidence: `lib/githubClient.ts`)
