# neonatox/neonatox-nhopkg architecture

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

- Interactive diagram: https://gitdiagram.com/neonatox/neonatox-nhopkg
- Repository: https://github.com/neonatox/neonatox-nhopkg

## Overview

Nhopkg is a universal Linux package manager for binary `.nho` and source `.srcnho` packages. Its user-facing tools manage package installation, source builds, repositories, isolated builds, and system users; documented capabilities also include dependency resolution, package creation from installed software, and system integration. The README names the installed tools and shared library, but no source excerpts were provided, so internal calls and most data-flow relationships cannot be established; the graph includes only documented relationships.

Main entry points: [`src/nhopkg.in`](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg.in) (Package manager), [`src/nhopkg-src.in`](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg-src.in) (Source projects), [`src/nhopkg-repos.in`](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg-repos.in) (Repository manager), [`src/libnhopkg_download.in`](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/libnhopkg_download.in) (Package downloads)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_package_lifecycle["Package lifecycle"]
  node_manager["Package manager<br/>[nhopkg.in]"]
  node_source_tool["Source projects<br/>[nhopkg-src.in]"]
  node_binary_package["Binary packages"]
  node_source_package["Source packages"]
  node_dependency_resolution["Dependency resolution<br/>[nhopkg.in]"]
  node_installed_software[("Installed software")]
end

subgraph group_repositories["Repositories"]
  node_repository_tool["Repository manager<br/>[nhopkg-repos.in]"]
  node_local_repository[("Local repository")]
  node_downloads["Package downloads"]
end

subgraph group_system_tools["System tools"]
  node_overlay["Isolated builds<br/>[nhopkg-overlay.in]"]
  node_user_management["User management<br/>[nhouser.in]"]
  node_system_integration["System integration<br/>[nhopkg.in]"]
end

subgraph group_shared_runtime["Shared runtime"]
  node_configuration["Configuration<br/>[nhopkg.conf.in]"]
  node_shared_library["Shared functions<br/>[libnhopkg.in]"]
  node_crypto["Crypto functions"]
  node_busybox_setup["BusyBox setup<br/>[nhopkg-bb-setup.in]"]
end

node_user(("Linux user"))

node_user -->|"manages packages"| node_manager
node_user -->|"manages projects"| node_source_tool
node_user -->|"manages repositories"| node_repository_tool
node_manager -->|"installs and creates"| node_binary_package
node_source_tool -->|"builds from"| node_source_package
node_manager -->|"installs from source"| node_source_package
node_manager -->|"resolves dependencies"| node_dependency_resolution
node_manager -->|"backs up"| node_installed_software
node_repository_tool -->|"manages"| node_local_repository
node_manager -->|"downloads packages"| node_downloads
node_source_tool -->|"supports isolated builds"| node_overlay
node_manager -->|"integrates system"| node_system_integration
node_manager -->|"uses configuration"| node_configuration
node_manager -->|"uses shared functions"| node_shared_library
node_manager -->|"supports private PATH"| node_busybox_setup

click node_manager "https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg.in"
click node_source_tool "https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg-src.in"
click node_dependency_resolution "https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg.in"
click node_repository_tool "https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg-repos.in"
click node_downloads "https://github.com/neonatox/neonatox-nhopkg/blob/master/src/libnhopkg_download.in"
click node_overlay "https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg-overlay.in"
click node_user_management "https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhouser.in"
click node_system_integration "https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg.in"
click node_configuration "https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg.conf.in"
click node_shared_library "https://github.com/neonatox/neonatox-nhopkg/blob/master/src/libnhopkg.in"
click node_crypto "https://github.com/neonatox/neonatox-nhopkg/blob/master/src/libnhopkg_crypto.in"
click node_busybox_setup "https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg-bb-setup.in"

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_manager,node_source_tool,node_binary_package,node_source_package,node_dependency_resolution,node_installed_software,node_user toneBlue
class node_repository_tool,node_local_repository,node_downloads toneAmber
class node_overlay,node_user_management,node_system_integration toneMint
class node_configuration,node_shared_library,node_crypto,node_busybox_setup toneRose
```

## Components

### Package lifecycle

- [Package manager](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg.in): `src/nhopkg.in`
- [Source projects](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg-src.in): `src/nhopkg-src.in`
- **Binary packages**
- **Source packages**
- [Dependency resolution](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg.in): `src/nhopkg.in`
- **Installed software**

### Repositories

- [Repository manager](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg-repos.in): `src/nhopkg-repos.in`
- **Local repository**
- [Package downloads](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/libnhopkg_download.in): `src/libnhopkg_download.in`

### System tools

- [Isolated builds](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg-overlay.in): `src/nhopkg-overlay.in`
- [User management](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhouser.in): `src/nhouser.in`
- [System integration](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg.in): `src/nhopkg.in`

### Shared runtime

- [Configuration](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg.conf.in): `src/nhopkg.conf.in`
- [Shared functions](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/libnhopkg.in): `src/libnhopkg.in`
- [Crypto functions](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/libnhopkg_crypto.in): `src/libnhopkg_crypto.in`
- [BusyBox setup](https://github.com/neonatox/neonatox-nhopkg/blob/master/src/nhopkg-bb-setup.in): `src/nhopkg-bb-setup.in`

### Other components

- **Linux user**

## Connections

- Linux user → Package manager: manages packages (evidence: `README.md`)
- Linux user → Source projects: manages projects (evidence: `README.md`)
- Linux user → Repository manager: manages repositories (evidence: `README.md`)
- Package manager → Binary packages: installs and creates (evidence: `README.md`)
- Source projects → Source packages: builds from (evidence: `README.md`)
- Package manager → Source packages: installs from source (evidence: `README.md`)
- Package manager → Dependency resolution: resolves dependencies (evidence: `README.md`)
- Package manager → Installed software: backs up (evidence: `README.md`)
- Repository manager → Local repository: manages (evidence: `README.md`)
- Package manager → Package downloads: downloads packages (evidence: `README.md`)
- Source projects → Isolated builds: supports isolated builds (evidence: `README.md`)
- Package manager → System integration: integrates system (evidence: `README.md`)
- Package manager → Configuration: uses configuration (evidence: `README.md`)
- Package manager → Shared functions: uses shared functions (evidence: `README.md`)
- Package manager → BusyBox setup: supports private PATH (evidence: `README.md`)
