# devlopersujoy/localxweb architecture

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

- Interactive diagram: https://gitdiagram.com/devlopersujoy/localxweb
- Repository: https://github.com/devlopersujoy/localxweb

## Overview

LocalXWeb is a self-contained local web-development stack with CLI, browser dashboard, instant project serving, database/site management, and MCP interfaces for AI clients. The principal workflow is a user starting or managing the stack, then serving projects and managing databases/sites through the local services and registries. The graph preserves the documented MCP tools, prompts, resources, and transports, plus diagnostics and installation. Much of the sampled JavaScript is obfuscated; relationships not shown in readable excerpts are included only where the README documents them.

Main entry points: [`src/cli/index.js`](https://github.com/devlopersujoy/localxweb/blob/main/src/cli/index.js) (CLI Commands), [`src/mcp/tools.js`](https://github.com/devlopersujoy/localxweb/blob/main/src/mcp/tools.js) (MCP Tools), [`src/mcp/server.js`](https://github.com/devlopersujoy/localxweb/blob/main/src/mcp/server.js) (MCP Server), [`src/installer/packageManager.js`](https://github.com/devlopersujoy/localxweb/blob/main/src/installer/packageManager.js) (Package Installer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entrypoints["User Interfaces"]
  node_cli["CLI Commands<br/>[index.js]"]
  node_dashboard["Control Center<br/>[app.js]"]
  node_dashboard_server["Dashboard Server<br/>[server.js]"]
  node_dashboard_api["Dashboard API<br/>[api.js]"]
  node_studio["Studio UI<br/>[studio.js]"]
  node_studio_server["Studio Server<br/>[server.js]"]
end

subgraph group_mcp["AI Integration"]
  node_mcp_server["MCP Server<br/>[server.js]"]
  node_mcp_tools["MCP Tools<br/>[tools.js]"]
  node_mcp_prompts["MCP Prompts<br/>[prompts.js]"]
  node_mcp_resources["MCP Resources<br/>[resources.js]"]
  node_mcp_transports["MCP Transports"]
end

subgraph group_runtime["Local Stack"]
  node_apache["Apache Service<br/>[apache.js]"]
  node_mysql["MySQL Service<br/>[mysql.js]"]
  node_php["PHP Runtime<br/>[php.js]"]
  node_phpmyadmin["phpMyAdmin<br/>[phpmyadmin.js]"]
  node_web_runner["Project Runner<br/>[runner.js]"]
  node_web_server["Project Web Server<br/>[webServer.js]"]
  node_database_manager["Database Manager<br/>[manager.js]"]
  node_sites["Site Manager<br/>[sites.js]"]
end

subgraph group_management["Setup and Operations"]
  node_registry[("JSON Registries<br/>[index.js]")]
  node_installer["Package Installer<br/>[packageManager.js]"]
  node_doctor["System Doctor<br/>[doctor.js]"]
  node_port_fixer["Port Auto-Fixer<br/>[autoFixer.js]"]
  node_cleaner["System Cleaner<br/>[cleaner.js]"]
end

node_user(("Developer"))
node_ai(("AI Client"))

node_user -->|"runs commands"| node_cli
node_user -->|"manages stack"| node_dashboard
node_dashboard -->|"uses dashboard"| node_dashboard_server
node_dashboard_server -->|"routes requests"| node_dashboard_api
node_cli -->|"controls services"| node_apache
node_cli -->|"controls services"| node_mysql
node_cli -->|"controls services"| node_php
node_cli -->|"controls services"| node_phpmyadmin
node_cli -->|"starts projects"| node_web_runner
node_web_runner -->|"starts server"| node_web_server
node_cli -->|"manages databases"| node_database_manager
node_cli -->|"scaffolds sites"| node_sites
node_database_manager -->|"persists records"| node_registry
node_sites -->|"persists sites"| node_registry
node_user -.->|"asks for help"| node_ai
node_ai -->|"connects through"| node_mcp_transports
node_mcp_transports -->|"dispatches requests"| node_mcp_server
node_mcp_server -->|"registers tools"| node_mcp_tools
node_mcp_server -->|"registers prompts"| node_mcp_prompts
node_mcp_server -->|"registers resources"| node_mcp_resources
node_mcp_tools -->|"controls services"| node_apache
node_mcp_tools -->|"manages databases"| node_database_manager
node_mcp_tools -->|"scaffolds sites"| node_sites
node_mcp_tools -->|"launches apps"| node_web_runner
node_mcp_resources -->|"reports registries"| node_registry
node_studio -.->|"uses Studio"| node_studio_server
node_studio_server -->|"manages database"| node_database_manager
node_cli -->|"installs stack"| node_installer
node_installer -->|"installs services"| node_apache
node_installer -->|"installs services"| node_mysql
node_installer -->|"installs services"| node_php
node_cli -->|"runs diagnostics"| node_doctor
node_cli -->|"resolves conflicts"| node_port_fixer
node_cli -->|"cleans state"| node_cleaner

click node_cli "https://github.com/devlopersujoy/localxweb/blob/main/src/cli/index.js"
click node_dashboard "https://github.com/devlopersujoy/localxweb/blob/main/src/dashboard/public/app.js"
click node_dashboard_server "https://github.com/devlopersujoy/localxweb/blob/main/src/dashboard/server.js"
click node_dashboard_api "https://github.com/devlopersujoy/localxweb/blob/main/src/dashboard/api.js"
click node_studio "https://github.com/devlopersujoy/localxweb/blob/main/src/studio/public/studio.js"
click node_studio_server "https://github.com/devlopersujoy/localxweb/blob/main/src/studio/server.js"
click node_mcp_server "https://github.com/devlopersujoy/localxweb/blob/main/src/mcp/server.js"
click node_mcp_tools "https://github.com/devlopersujoy/localxweb/blob/main/src/mcp/tools.js"
click node_mcp_prompts "https://github.com/devlopersujoy/localxweb/blob/main/src/mcp/prompts.js"
click node_mcp_resources "https://github.com/devlopersujoy/localxweb/blob/main/src/mcp/resources.js"
click node_mcp_transports "https://github.com/devlopersujoy/localxweb/tree/main/src/mcp/transports"
click node_apache "https://github.com/devlopersujoy/localxweb/blob/main/src/services/apache.js"
click node_mysql "https://github.com/devlopersujoy/localxweb/blob/main/src/services/mysql.js"
click node_php "https://github.com/devlopersujoy/localxweb/blob/main/src/services/php.js"
click node_phpmyadmin "https://github.com/devlopersujoy/localxweb/blob/main/src/services/phpmyadmin.js"
click node_web_runner "https://github.com/devlopersujoy/localxweb/blob/main/src/server/runner.js"
click node_web_server "https://github.com/devlopersujoy/localxweb/blob/main/src/server/webServer.js"
click node_database_manager "https://github.com/devlopersujoy/localxweb/blob/main/src/database/manager.js"
click node_sites "https://github.com/devlopersujoy/localxweb/blob/main/src/services/sites.js"
click node_registry "https://github.com/devlopersujoy/localxweb/blob/main/src/config/index.js"
click node_installer "https://github.com/devlopersujoy/localxweb/blob/main/src/installer/packageManager.js"
click node_doctor "https://github.com/devlopersujoy/localxweb/blob/main/src/utils/doctor.js"
click node_port_fixer "https://github.com/devlopersujoy/localxweb/blob/main/src/utils/autoFixer.js"
click node_cleaner "https://github.com/devlopersujoy/localxweb/blob/main/src/utils/cleaner.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_dashboard,node_dashboard_server,node_dashboard_api,node_studio,node_studio_server,node_ai toneBlue
class node_mcp_server,node_mcp_tools,node_mcp_prompts,node_mcp_resources,node_mcp_transports toneAmber
class node_apache,node_mysql,node_php,node_phpmyadmin,node_web_runner,node_web_server,node_database_manager,node_sites toneMint
class node_registry,node_installer,node_doctor,node_port_fixer,node_cleaner toneRose
class node_user toneIndigo
```

## Components

### User Interfaces

- [CLI Commands](https://github.com/devlopersujoy/localxweb/blob/main/src/cli/index.js): `src/cli/index.js`
- [Control Center](https://github.com/devlopersujoy/localxweb/blob/main/src/dashboard/public/app.js): `src/dashboard/public/app.js`
- [Dashboard Server](https://github.com/devlopersujoy/localxweb/blob/main/src/dashboard/server.js): `src/dashboard/server.js`
- [Dashboard API](https://github.com/devlopersujoy/localxweb/blob/main/src/dashboard/api.js): `src/dashboard/api.js`
- [Studio UI](https://github.com/devlopersujoy/localxweb/blob/main/src/studio/public/studio.js): `src/studio/public/studio.js`
- [Studio Server](https://github.com/devlopersujoy/localxweb/blob/main/src/studio/server.js): `src/studio/server.js`

### AI Integration

- [MCP Server](https://github.com/devlopersujoy/localxweb/blob/main/src/mcp/server.js): `src/mcp/server.js`
- [MCP Tools](https://github.com/devlopersujoy/localxweb/blob/main/src/mcp/tools.js): `src/mcp/tools.js`
- [MCP Prompts](https://github.com/devlopersujoy/localxweb/blob/main/src/mcp/prompts.js): `src/mcp/prompts.js`
- [MCP Resources](https://github.com/devlopersujoy/localxweb/blob/main/src/mcp/resources.js): `src/mcp/resources.js`
- [MCP Transports](https://github.com/devlopersujoy/localxweb/tree/main/src/mcp/transports): `src/mcp/transports`

### Local Stack

- [Apache Service](https://github.com/devlopersujoy/localxweb/blob/main/src/services/apache.js): `src/services/apache.js`
- [MySQL Service](https://github.com/devlopersujoy/localxweb/blob/main/src/services/mysql.js): `src/services/mysql.js`
- [PHP Runtime](https://github.com/devlopersujoy/localxweb/blob/main/src/services/php.js): `src/services/php.js`
- [phpMyAdmin](https://github.com/devlopersujoy/localxweb/blob/main/src/services/phpmyadmin.js): `src/services/phpmyadmin.js`
- [Project Runner](https://github.com/devlopersujoy/localxweb/blob/main/src/server/runner.js): `src/server/runner.js`
- [Project Web Server](https://github.com/devlopersujoy/localxweb/blob/main/src/server/webServer.js): `src/server/webServer.js`
- [Database Manager](https://github.com/devlopersujoy/localxweb/blob/main/src/database/manager.js): `src/database/manager.js`
- [Site Manager](https://github.com/devlopersujoy/localxweb/blob/main/src/services/sites.js): `src/services/sites.js`

### Setup and Operations

- [JSON Registries](https://github.com/devlopersujoy/localxweb/blob/main/src/config/index.js): `src/config/index.js`
- [Package Installer](https://github.com/devlopersujoy/localxweb/blob/main/src/installer/packageManager.js): `src/installer/packageManager.js`
- [System Doctor](https://github.com/devlopersujoy/localxweb/blob/main/src/utils/doctor.js): `src/utils/doctor.js`
- [Port Auto-Fixer](https://github.com/devlopersujoy/localxweb/blob/main/src/utils/autoFixer.js): `src/utils/autoFixer.js`
- [System Cleaner](https://github.com/devlopersujoy/localxweb/blob/main/src/utils/cleaner.js): `src/utils/cleaner.js`

### Other components

- **Developer**
- **AI Client**

## Connections

- Developer → CLI Commands: runs commands (evidence: `README.md`)
- Developer → Control Center: manages stack (evidence: `README.md`)
- Control Center → Dashboard Server: uses dashboard (evidence: `README.md`)
- Dashboard Server → Dashboard API: routes requests (evidence: `src/dashboard/server.js`)
- CLI Commands → Apache Service: controls services (evidence: `README.md`)
- CLI Commands → MySQL Service: controls services (evidence: `README.md`)
- CLI Commands → PHP Runtime: controls services (evidence: `README.md`)
- CLI Commands → phpMyAdmin: controls services (evidence: `README.md`)
- CLI Commands → Project Runner: starts projects (evidence: `README.md`)
- Project Runner → Project Web Server: starts server (evidence: `src/server/runner.js`)
- CLI Commands → Database Manager: manages databases (evidence: `README.md`)
- CLI Commands → Site Manager: scaffolds sites (evidence: `README.md`)
- Database Manager → JSON Registries: persists records (evidence: `README.md`)
- Site Manager → JSON Registries: persists sites (evidence: `README.md`)
- Developer → AI Client: asks for help
- AI Client → MCP Transports: connects through (evidence: `README.md`)
- MCP Transports → MCP Server: dispatches requests (evidence: `README.md`)
- MCP Server → MCP Tools: registers tools (evidence: `src/mcp/server.js`)
- MCP Server → MCP Prompts: registers prompts (evidence: `src/mcp/server.js`)
- MCP Server → MCP Resources: registers resources (evidence: `src/mcp/server.js`)
- MCP Tools → Apache Service: controls services (evidence: `README.md`)
- MCP Tools → Database Manager: manages databases (evidence: `README.md`)
- MCP Tools → Site Manager: scaffolds sites (evidence: `README.md`)
- MCP Tools → Project Runner: launches apps (evidence: `README.md`)
- MCP Resources → JSON Registries: reports registries (evidence: `README.md`)
- Studio UI → Studio Server: uses Studio
- Studio Server → Database Manager: manages database (evidence: `src/studio/server.js`)
- CLI Commands → Package Installer: installs stack (evidence: `README.md`)
- Package Installer → Apache Service: installs services (evidence: `README.md`)
- Package Installer → MySQL Service: installs services (evidence: `README.md`)
- Package Installer → PHP Runtime: installs services (evidence: `README.md`)
- CLI Commands → System Doctor: runs diagnostics (evidence: `README.md`)
- CLI Commands → Port Auto-Fixer: resolves conflicts (evidence: `README.md`)
- CLI Commands → System Cleaner: cleans state (evidence: `README.md`)
