# gnelshahnazaryan/create-backend-app architecture

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

- Interactive diagram: https://gitdiagram.com/gnelshahnazaryan/create-backend-app
- Repository: https://github.com/gnelshahnazaryan/create-backend-app

## Overview

This is a command-line backend project scaffold generator. A user supplies a project name; the CLI creates the project directory and standard source layout, asks which backend features to include, then configures the package and installs selected dependencies. Optional database tooling and opening the project in VS Code are handled during installation. The README is empty, so capabilities and wiring here are based on the sampled source files.

Main entry points: [`lib/index.js`](https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/index.js) (Project workflow), [`lib/installer.js`](https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/installer.js) (Dependency installer), [`lib/prompts.js`](https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/prompts.js) (Feature prompts), [`bin/create-backend-app.js`](https://github.com/gnelshahnazaryan/create-backend-app/blob/main/bin/create-backend-app.js) (CLI command)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI orchestration"]
  node_command["CLI command"]
  node_orchestrator["Project workflow<br/>[index.js]"]
  node_prompts["Feature prompts<br/>[prompts.js]"]
end

subgraph group_scaffold["Project scaffolding"]
  node_structure["Directory scaffold<br/>[folders.js]"]
end

subgraph group_setup["Dependency setup"]
  node_package_config["Package config<br/>[package.js]"]
  node_installer["Dependency installer<br/>[installer.js]"]
end

node_user(("User"))
node_filesystem["Filesystem"]
node_inquirer["Inquirer"]
node_npm["npm / npx"]
node_vscode["VS Code"]

node_user -->|"runs"| node_command
node_command -->|"loads"| node_orchestrator
node_orchestrator -->|"creates directory"| node_filesystem
node_orchestrator -->|"creates layout"| node_structure
node_structure -->|"writes scaffold"| node_filesystem
node_orchestrator -->|"requests choices"| node_prompts
node_prompts -->|"prompts user"| node_inquirer
node_prompts -->|"returns answers"| node_orchestrator
node_orchestrator -->|"starts setup"| node_installer
node_installer -->|"updates package"| node_package_config
node_package_config -->|"reads and writes"| node_filesystem
node_installer -->|"runs installs"| node_npm
node_installer -.->|"optionally opens"| node_vscode

click node_command "https://github.com/gnelshahnazaryan/create-backend-app/blob/main/bin/create-backend-app.js"
click node_orchestrator "https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/index.js"
click node_prompts "https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/prompts.js"
click node_structure "https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/folders.js"
click node_package_config "https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/package.js"
click node_installer "https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/installer.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_command,node_orchestrator,node_prompts,node_user toneBlue
class node_structure toneAmber
class node_package_config,node_installer toneMint
class node_filesystem,node_inquirer,node_npm,node_vscode toneIndigo
```

## Components

### CLI orchestration

- [CLI command](https://github.com/gnelshahnazaryan/create-backend-app/blob/main/bin/create-backend-app.js): `bin/create-backend-app.js`
- [Project workflow](https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/index.js): `lib/index.js`
- [Feature prompts](https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/prompts.js): `lib/prompts.js`

### Project scaffolding

- [Directory scaffold](https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/folders.js): `lib/folders.js`

### Dependency setup

- [Package config](https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/package.js): `lib/package.js`
- [Dependency installer](https://github.com/gnelshahnazaryan/create-backend-app/blob/main/lib/installer.js): `lib/installer.js`

### Other components

- **User**
- **Filesystem**
- **Inquirer**
- **npm / npx**
- **VS Code**

## Connections

- User → CLI command: runs
- CLI command → Project workflow: loads
- Project workflow → Filesystem: creates directory
- Project workflow → Directory scaffold: creates layout
- Directory scaffold → Filesystem: writes scaffold
- Project workflow → Feature prompts: requests choices
- Feature prompts → Inquirer: prompts user
- Feature prompts → Project workflow: returns answers
- Project workflow → Dependency installer: starts setup
- Dependency installer → Package config: updates package
- Package config → Filesystem: reads and writes
- Dependency installer → npm / npx: runs installs
- Dependency installer → VS Code: optionally opens
