# nuengcoder/ntc architecture

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

- Interactive diagram: https://gitdiagram.com/nuengcoder/ntc
- Repository: https://github.com/nuengcoder/ntc

## Overview

NTC is a cross-platform terminal toolkit: users invoke commands in its shell to navigate, manage files, edit, inspect data, and run utilities. The README establishes the command-oriented product workflow; sampled source confirms selected subsystem internals, including file-explorer state/rendering, database browsing, and package management. Many advertised features are represented from documentation rather than inspected implementation, so their internal links are omitted.

Main entry points: [`src/shell/entry.rs`](https://github.com/nuengcoder/ntc/blob/main/src/shell/entry.rs) (NTC Shell), [`src/nfe/mod.rs`](https://github.com/nuengcoder/ntc/blob/main/src/nfe/mod.rs) (File Explorer), [`src/ndb/mod.rs`](https://github.com/nuengcoder/ntc/blob/main/src/ndb/mod.rs) (Database Browser), [`src/ntpkg/mod.rs`](https://github.com/nuengcoder/ntc/blob/main/src/ntpkg/mod.rs) (Package Commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Shell and Navigation"]
  node_shell["NTC Shell<br/>[entry.rs]"]
  node_aliases["Aliases<br/>[alias.rs]"]
  node_tasks["Task Runner<br/>[runner.rs]"]
  node_interactive["Interactive UI<br/>[interactive.rs]"]
  node_paths["Path Utilities<br/>[paths.rs]"]
  node_terminal["Terminal Utilities<br/>[terminal.rs]"]
  node_help["Help<br/>[help.rs]"]
  node_stdin["Shell Input<br/>[stdin.rs]"]
end

subgraph group_files["Files and Editing"]
  node_explorer["File Explorer<br/>[mod.rs]"]
  node_explorer_state["Explorer State<br/>[state.rs]"]
  node_editor["Terminal Editor<br/>[mod.rs]"]
  node_serve["File Sharing<br/>[serve.rs]"]
end

subgraph group_tools["Terminal Tools"]
  node_system["System Tools<br/>[mod.rs]"]
  node_chess["Chess Engine<br/>[chess_engine.rs]"]
end

subgraph group_data["Data Utilities"]
  node_database_browser["Database Browser<br/>[mod.rs]"]
  node_database[("Database Access<br/>[db.rs]")]
  node_database_render["Database Rendering<br/>[render.rs]"]
  node_checks["File Checks<br/>[check_common.rs]"]
  node_check_formats["Check Formats<br/>[check_formats.rs]"]
  node_fake["Fake Data<br/>[mod.rs]"]
  node_format_docs["Document Formatting<br/>[fmt_doc.rs]"]
end

subgraph group_packages["Package Management"]
  node_package_commands["Package Commands<br/>[mod.rs]"]
  node_package_manager["Package Manager<br/>[manager.rs]"]
  node_package_sources["Package Sources<br/>[sources.rs]"]
end

node_user(("Terminal User"))

node_user -->|"runs commands"| node_shell
node_shell -->|"supports aliases"| node_aliases
node_shell -->|"runs tasks"| node_tasks
node_shell -->|"opens explorer"| node_explorer
node_shell -->|"opens editor"| node_editor
node_shell -->|"serves files"| node_serve
node_shell -->|"offers system tools"| node_system
node_shell -.->|"offers chess"| node_chess
node_explorer -->|"uses state"| node_explorer_state
node_explorer -->|"opens files in"| node_editor
node_shell -.->|"opens database browser"| node_database_browser
node_database_browser -->|"queries database"| node_database
node_database_browser -->|"renders results"| node_database_render
node_shell -.->|"checks files"| node_checks
node_checks -->|"uses format checks"| node_check_formats
node_shell -->|"generates data"| node_fake
node_shell -.->|"formats documents"| node_format_docs
node_shell -.->|"manages packages"| node_package_commands
node_package_commands -->|"delegates management"| node_package_manager
node_package_commands -->|"searches sources"| node_package_sources
node_package_manager -->|"resolves sources"| node_package_sources
node_shell -->|"shows help"| node_help
node_shell -.->|"accepts input"| node_stdin

click node_shell "https://github.com/nuengcoder/ntc/blob/main/src/shell/entry.rs"
click node_aliases "https://github.com/nuengcoder/ntc/blob/main/src/shell/alias.rs"
click node_tasks "https://github.com/nuengcoder/ntc/blob/main/src/ranfile/runner.rs"
click node_explorer "https://github.com/nuengcoder/ntc/blob/main/src/nfe/mod.rs"
click node_explorer_state "https://github.com/nuengcoder/ntc/blob/main/src/nfe/state.rs"
click node_editor "https://github.com/nuengcoder/ntc/blob/main/src/editor/mod.rs"
click node_serve "https://github.com/nuengcoder/ntc/blob/main/src/shell/commands/serve.rs"
click node_system "https://github.com/nuengcoder/ntc/blob/main/src/shell/commands/mod.rs"
click node_chess "https://github.com/nuengcoder/ntc/blob/main/src/shell/commands/chess_engine.rs"
click node_database_browser "https://github.com/nuengcoder/ntc/blob/main/src/ndb/mod.rs"
click node_database "https://github.com/nuengcoder/ntc/blob/main/src/ndb/db.rs"
click node_database_render "https://github.com/nuengcoder/ntc/blob/main/src/ndb/render.rs"
click node_checks "https://github.com/nuengcoder/ntc/blob/main/src/shell/commands/check_common.rs"
click node_check_formats "https://github.com/nuengcoder/ntc/blob/main/src/shell/commands/check_formats.rs"
click node_fake "https://github.com/nuengcoder/ntc/blob/main/src/fake/mod.rs"
click node_format_docs "https://github.com/nuengcoder/ntc/blob/main/src/shell/commands/fmt_doc.rs"
click node_package_commands "https://github.com/nuengcoder/ntc/blob/main/src/ntpkg/mod.rs"
click node_package_manager "https://github.com/nuengcoder/ntc/blob/main/src/ntpkg/manager.rs"
click node_package_sources "https://github.com/nuengcoder/ntc/blob/main/src/ntpkg/sources.rs"
click node_interactive "https://github.com/nuengcoder/ntc/blob/main/src/utils/interactive.rs"
click node_paths "https://github.com/nuengcoder/ntc/blob/main/src/utils/paths.rs"
click node_terminal "https://github.com/nuengcoder/ntc/blob/main/src/utils/terminal.rs"
click node_help "https://github.com/nuengcoder/ntc/blob/main/src/shell/help.rs"
click node_stdin "https://github.com/nuengcoder/ntc/blob/main/src/shell/stdin.rs"

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_shell,node_aliases,node_tasks,node_interactive,node_paths,node_terminal,node_help,node_stdin,node_user toneBlue
class node_explorer,node_explorer_state,node_editor,node_serve toneAmber
class node_system,node_chess toneMint
class node_database_browser,node_database,node_database_render,node_checks,node_check_formats,node_fake,node_format_docs toneRose
class node_package_commands,node_package_manager,node_package_sources toneIndigo
```

## Components

### Shell and Navigation

- [NTC Shell](https://github.com/nuengcoder/ntc/blob/main/src/shell/entry.rs): `src/shell/entry.rs`
- [Aliases](https://github.com/nuengcoder/ntc/blob/main/src/shell/alias.rs): `src/shell/alias.rs`
- [Task Runner](https://github.com/nuengcoder/ntc/blob/main/src/ranfile/runner.rs): `src/ranfile/runner.rs`
- [Interactive UI](https://github.com/nuengcoder/ntc/blob/main/src/utils/interactive.rs): `src/utils/interactive.rs`
- [Path Utilities](https://github.com/nuengcoder/ntc/blob/main/src/utils/paths.rs): `src/utils/paths.rs`
- [Terminal Utilities](https://github.com/nuengcoder/ntc/blob/main/src/utils/terminal.rs): `src/utils/terminal.rs`
- [Help](https://github.com/nuengcoder/ntc/blob/main/src/shell/help.rs): `src/shell/help.rs`
- [Shell Input](https://github.com/nuengcoder/ntc/blob/main/src/shell/stdin.rs): `src/shell/stdin.rs`

### Files and Editing

- [File Explorer](https://github.com/nuengcoder/ntc/blob/main/src/nfe/mod.rs): `src/nfe/mod.rs`
- [Explorer State](https://github.com/nuengcoder/ntc/blob/main/src/nfe/state.rs): `src/nfe/state.rs`
- [Terminal Editor](https://github.com/nuengcoder/ntc/blob/main/src/editor/mod.rs): `src/editor/mod.rs`
- [File Sharing](https://github.com/nuengcoder/ntc/blob/main/src/shell/commands/serve.rs): `src/shell/commands/serve.rs`

### Terminal Tools

- [System Tools](https://github.com/nuengcoder/ntc/blob/main/src/shell/commands/mod.rs): `src/shell/commands/mod.rs`
- [Chess Engine](https://github.com/nuengcoder/ntc/blob/main/src/shell/commands/chess_engine.rs): `src/shell/commands/chess_engine.rs`

### Data Utilities

- [Database Browser](https://github.com/nuengcoder/ntc/blob/main/src/ndb/mod.rs): `src/ndb/mod.rs`
- [Database Access](https://github.com/nuengcoder/ntc/blob/main/src/ndb/db.rs): `src/ndb/db.rs`
- [Database Rendering](https://github.com/nuengcoder/ntc/blob/main/src/ndb/render.rs): `src/ndb/render.rs`
- [File Checks](https://github.com/nuengcoder/ntc/blob/main/src/shell/commands/check_common.rs): `src/shell/commands/check_common.rs`
- [Check Formats](https://github.com/nuengcoder/ntc/blob/main/src/shell/commands/check_formats.rs): `src/shell/commands/check_formats.rs`
- [Fake Data](https://github.com/nuengcoder/ntc/blob/main/src/fake/mod.rs): `src/fake/mod.rs`
- [Document Formatting](https://github.com/nuengcoder/ntc/blob/main/src/shell/commands/fmt_doc.rs): `src/shell/commands/fmt_doc.rs`

### Package Management

- [Package Commands](https://github.com/nuengcoder/ntc/blob/main/src/ntpkg/mod.rs): `src/ntpkg/mod.rs`
- [Package Manager](https://github.com/nuengcoder/ntc/blob/main/src/ntpkg/manager.rs): `src/ntpkg/manager.rs`
- [Package Sources](https://github.com/nuengcoder/ntc/blob/main/src/ntpkg/sources.rs): `src/ntpkg/sources.rs`

### Other components

- **Terminal User**

## Connections

- Terminal User → NTC Shell: runs commands (evidence: `README.md`)
- NTC Shell → Aliases: supports aliases (evidence: `README.md`)
- NTC Shell → Task Runner: runs tasks (evidence: `README.md`)
- NTC Shell → File Explorer: opens explorer (evidence: `README.md`)
- NTC Shell → Terminal Editor: opens editor (evidence: `README.md`)
- NTC Shell → File Sharing: serves files (evidence: `README.md`)
- NTC Shell → System Tools: offers system tools (evidence: `README.md`)
- NTC Shell → Chess Engine: offers chess
- File Explorer → Explorer State: uses state (evidence: `src/nfe/mod.rs`)
- File Explorer → Terminal Editor: opens files in (evidence: `src/nfe/mod.rs`)
- NTC Shell → Database Browser: opens database browser
- Database Browser → Database Access: queries database (evidence: `src/ndb/mod.rs`)
- Database Browser → Database Rendering: renders results (evidence: `src/ndb/mod.rs`)
- NTC Shell → File Checks: checks files
- File Checks → Check Formats: uses format checks (evidence: `src/shell/commands/check_formats.rs`)
- NTC Shell → Fake Data: generates data (evidence: `README.md`)
- NTC Shell → Document Formatting: formats documents
- NTC Shell → Package Commands: manages packages
- Package Commands → Package Manager: delegates management (evidence: `src/ntpkg/mod.rs`)
- Package Commands → Package Sources: searches sources (evidence: `src/ntpkg/mod.rs`)
- Package Manager → Package Sources: resolves sources (evidence: `src/ntpkg/manager.rs`)
- NTC Shell → Help: shows help (evidence: `README.md`)
- NTC Shell → Shell Input: accepts input
