# enclica/dywo-cli architecture

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

- Interactive diagram: https://gitdiagram.com/enclica/dywo-cli
- Repository: https://github.com/enclica/dywo-cli

## Overview

Dywo is a web-project management CLI: users generate projects, compile client or server assets, and run a development server; it also offers code-quality and obfuscation commands. The map highlights the compiler and server framework as internal layers, plus documented server, database, and deployment capabilities. README feature descriptions support command-level links, but several command implementations and CLI dispatch details were not sampled, so their internal wiring is not expanded.

Main entry points: [`bin/dywo.js`](https://github.com/enclica/dywo-cli/blob/main/bin/dywo.js) (Dywo CLI), [`lib/server/index.js`](https://github.com/enclica/dywo-cli/blob/main/lib/server/index.js) (HTTP server framework), [`lib/commands/server.js`](https://github.com/enclica/dywo-cli/blob/main/lib/commands/server.js) (Server commands), [`lib/commands/build.js`](https://github.com/enclica/dywo-cli/blob/main/lib/commands/build.js) (Client/server builds)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflows"]
  node_cli["Dywo CLI<br/>[dywo.js]"]
  node_create["Project generation<br/>[create.js]"]
  node_templates["Project templates"]
  node_serve["Development serving<br/>[serve.js]"]
  node_servercmd["Server commands<br/>[server.js]"]
end

subgraph group_compile["Project compilation"]
  node_config["Project configuration<br/>[config-loader.js]"]
  node_build["Client/server builds<br/>[build.js]"]
  node_compiler["Asset compiler<br/>[index.js]"]
  node_processors["Asset processing"]
  node_runtime["Client runtime<br/>[dywo-runtime.js]"]
end

subgraph group_server["Server runtime"]
  node_serverbuild["Server packaging<br/>[index.js]"]
  node_targets["Deployment targets"]
  node_framework["HTTP server framework<br/>[index.js]"]
  node_routing["Request routing<br/>[router.js]"]
  node_middleware["Middleware stack<br/>[index.js]"]
  node_websocket["WebSocket support<br/>[websocket.js]"]
  node_database["Database access<br/>[index.js]"]
end

subgraph group_quality["Code maintenance"]
  node_quality["Lint and format<br/>[lint.js]"]
  node_format["Formatting<br/>[format.js]"]
  node_tests["Test integration<br/>[createTest.js]"]
  node_obfuscate["Code obfuscation<br/>[obfuscate.js]"]
end

node_user(("Developer"))

node_user -->|"runs commands"| node_cli
node_cli -->|"dispatches"| node_create
node_create -->|"generates from"| node_templates
node_cli -->|"dispatches"| node_build
node_build -->|"loads settings"| node_config
node_build -->|"compiles assets"| node_compiler
node_compiler -->|"processes assets"| node_processors
node_compiler -->|"includes runtime"| node_runtime
node_cli -->|"dispatches"| node_serve
node_cli -->|"dispatches"| node_servercmd
node_servercmd -->|"builds server"| node_serverbuild
node_serverbuild -->|"emits targets"| node_targets
node_servercmd -->|"starts server"| node_framework
node_framework -->|"matches requests"| node_routing
node_framework -->|"runs middleware"| node_middleware
node_framework -->|"supports sockets"| node_websocket
node_framework -->|"uses database"| node_database
node_cli -->|"dispatches"| node_quality
node_cli -->|"dispatches"| node_format
node_cli -->|"runs tests"| node_tests
node_cli -->|"dispatches"| node_obfuscate

click node_cli "https://github.com/enclica/dywo-cli/blob/main/bin/dywo.js"
click node_create "https://github.com/enclica/dywo-cli/blob/main/lib/commands/create.js"
click node_templates "https://github.com/enclica/dywo-cli/tree/main/lib/templates"
click node_config "https://github.com/enclica/dywo-cli/blob/main/lib/config/config-loader.js"
click node_build "https://github.com/enclica/dywo-cli/blob/main/lib/commands/build.js"
click node_compiler "https://github.com/enclica/dywo-cli/blob/main/lib/compiler/index.js"
click node_processors "https://github.com/enclica/dywo-cli/tree/main/lib/compiler"
click node_runtime "https://github.com/enclica/dywo-cli/blob/main/lib/runtime/dywo-runtime.js"
click node_serve "https://github.com/enclica/dywo-cli/blob/main/lib/commands/serve.js"
click node_servercmd "https://github.com/enclica/dywo-cli/blob/main/lib/commands/server.js"
click node_serverbuild "https://github.com/enclica/dywo-cli/blob/main/lib/server/compile/index.js"
click node_targets "https://github.com/enclica/dywo-cli/tree/main/lib/server/compile/targets"
click node_framework "https://github.com/enclica/dywo-cli/blob/main/lib/server/index.js"
click node_routing "https://github.com/enclica/dywo-cli/blob/main/lib/server/router.js"
click node_middleware "https://github.com/enclica/dywo-cli/blob/main/lib/server/middleware/index.js"
click node_websocket "https://github.com/enclica/dywo-cli/blob/main/lib/server/websocket.js"
click node_database "https://github.com/enclica/dywo-cli/blob/main/lib/server/db/index.js"
click node_quality "https://github.com/enclica/dywo-cli/blob/main/lib/commands/lint.js"
click node_format "https://github.com/enclica/dywo-cli/blob/main/lib/commands/format.js"
click node_tests "https://github.com/enclica/dywo-cli/blob/main/lib/commands/createTest.js"
click node_obfuscate "https://github.com/enclica/dywo-cli/blob/main/lib/commands/obfuscate.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_create,node_templates,node_serve,node_servercmd toneBlue
class node_config,node_build,node_compiler,node_processors,node_runtime toneAmber
class node_serverbuild,node_targets,node_framework,node_routing,node_middleware,node_websocket,node_database toneMint
class node_quality,node_format,node_tests,node_obfuscate toneRose
class node_user toneIndigo
```

## Components

### CLI workflows

- [Dywo CLI](https://github.com/enclica/dywo-cli/blob/main/bin/dywo.js): `bin/dywo.js`
- [Project generation](https://github.com/enclica/dywo-cli/blob/main/lib/commands/create.js): `lib/commands/create.js`
- [Project templates](https://github.com/enclica/dywo-cli/tree/main/lib/templates): `lib/templates`
- [Development serving](https://github.com/enclica/dywo-cli/blob/main/lib/commands/serve.js): `lib/commands/serve.js`
- [Server commands](https://github.com/enclica/dywo-cli/blob/main/lib/commands/server.js): `lib/commands/server.js`

### Project compilation

- [Project configuration](https://github.com/enclica/dywo-cli/blob/main/lib/config/config-loader.js): `lib/config/config-loader.js`
- [Client/server builds](https://github.com/enclica/dywo-cli/blob/main/lib/commands/build.js): `lib/commands/build.js`
- [Asset compiler](https://github.com/enclica/dywo-cli/blob/main/lib/compiler/index.js): `lib/compiler/index.js`
- [Asset processing](https://github.com/enclica/dywo-cli/tree/main/lib/compiler): `lib/compiler`
- [Client runtime](https://github.com/enclica/dywo-cli/blob/main/lib/runtime/dywo-runtime.js): `lib/runtime/dywo-runtime.js`

### Server runtime

- [Server packaging](https://github.com/enclica/dywo-cli/blob/main/lib/server/compile/index.js): `lib/server/compile/index.js`
- [Deployment targets](https://github.com/enclica/dywo-cli/tree/main/lib/server/compile/targets): `lib/server/compile/targets`
- [HTTP server framework](https://github.com/enclica/dywo-cli/blob/main/lib/server/index.js): `lib/server/index.js`
- [Request routing](https://github.com/enclica/dywo-cli/blob/main/lib/server/router.js): `lib/server/router.js`
- [Middleware stack](https://github.com/enclica/dywo-cli/blob/main/lib/server/middleware/index.js): `lib/server/middleware/index.js`
- [WebSocket support](https://github.com/enclica/dywo-cli/blob/main/lib/server/websocket.js): `lib/server/websocket.js`
- [Database access](https://github.com/enclica/dywo-cli/blob/main/lib/server/db/index.js): `lib/server/db/index.js`

### Code maintenance

- [Lint and format](https://github.com/enclica/dywo-cli/blob/main/lib/commands/lint.js): `lib/commands/lint.js`
- [Formatting](https://github.com/enclica/dywo-cli/blob/main/lib/commands/format.js): `lib/commands/format.js`
- [Test integration](https://github.com/enclica/dywo-cli/blob/main/lib/commands/createTest.js): `lib/commands/createTest.js`
- [Code obfuscation](https://github.com/enclica/dywo-cli/blob/main/lib/commands/obfuscate.js): `lib/commands/obfuscate.js`

### Other components

- **Developer**

## Connections

- Developer → Dywo CLI: runs commands
- Dywo CLI → Project generation: dispatches
- Project generation → Project templates: generates from
- Dywo CLI → Client/server builds: dispatches
- Client/server builds → Project configuration: loads settings
- Client/server builds → Asset compiler: compiles assets
- Asset compiler → Asset processing: processes assets
- Asset compiler → Client runtime: includes runtime
- Dywo CLI → Development serving: dispatches
- Dywo CLI → Server commands: dispatches
- Server commands → Server packaging: builds server
- Server packaging → Deployment targets: emits targets
- Server commands → HTTP server framework: starts server
- HTTP server framework → Request routing: matches requests
- HTTP server framework → Middleware stack: runs middleware
- HTTP server framework → WebSocket support: supports sockets
- HTTP server framework → Database access: uses database
- Dywo CLI → Lint and format: dispatches
- Dywo CLI → Formatting: dispatches
- Dywo CLI → Test integration: runs tests
- Dywo CLI → Code obfuscation: dispatches
