# kish1bo/distributor architecture

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

- Interactive diagram: https://gitdiagram.com/kish1bo/distributor
- Repository: https://github.com/kish1bo/distributor

## Overview

Jojo is a Windows-oriented, interactive operating-system-style shell. The principal workflow starts at the console, boots the kernel, accepts commands, checks session permissions, and dispatches work to filesystem and system modules. Other documented-in-code capabilities include user/root management, package installation, scripting, text editing, system control, and network monitoring. The excerpts show boot and several registrations, but not every command handler or subsystem implementation; those relationships are omitted where wiring is not evidenced.

Main entry points: [`jojo/src/kernel.cpp`](https://github.com/kish1bo/distributor/blob/main/jojo/src/kernel.cpp) (Kernel shell), [`jojo/src/instalator_tool.cpp`](https://github.com/kish1bo/distributor/blob/main/jojo/src/instalator_tool.cpp) (Package manager), [`jojo/src/console.cpp`](https://github.com/kish1bo/distributor/blob/main/jojo/src/console.cpp) (Console UI), [`jojo/src/filesystem.cpp`](https://github.com/kish1bo/distributor/blob/main/jojo/src/filesystem.cpp) (Virtual filesystem)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Shell runtime"]
  node_console["Console UI<br/>[console.cpp]"]
  node_kernel["Kernel shell<br/>[kernel.cpp]"]
end

subgraph group_identity["Identity and files"]
  node_identity["Users and roles<br/>[kernel.cpp]"]
  node_filesystem["Virtual filesystem<br/>[filesystem.cpp]"]
end

subgraph group_extensions["Modules and tools"]
  node_installer["Package manager"]
  node_scripts["Script engine<br/>[script.cpp]"]
  node_editor["Nano editor<br/>[nano.cpp]"]
  node_sysctl["System control<br/>[sysctl.cpp]"]
  node_network["Network monitor"]
  node_process["Process control<br/>[kernel.cpp]"]
end

subgraph group_state["Persistent state"]
  node_storage[("Filesystem data")]
  node_packageindex["Package catalog<br/>[packages.json]"]
  node_installed["Installed package list"]
end

node_user(("Operator"))

node_user -->|"enters commands"| node_console
node_console -->|"starts shell"| node_kernel
node_kernel -->|"renders prompts"| node_console
node_kernel -->|"manages sessions"| node_identity
node_identity -.->|"persists users"| node_storage
node_filesystem -->|"registers commands"| node_kernel
node_filesystem -->|"reads and writes"| node_storage
node_kernel -->|"registers commands"| node_installer
node_installer -->|"loads catalog"| node_packageindex
node_installer -->|"tracks installs"| node_installed
node_installer -->|"installs package files"| node_storage
node_kernel -->|"registers commands"| node_sysctl
node_kernel -->|"registers commands"| node_network
node_kernel -->|"executes scripts"| node_scripts

click node_console "https://github.com/kish1bo/distributor/blob/main/jojo/src/console.cpp"
click node_kernel "https://github.com/kish1bo/distributor/blob/main/jojo/src/kernel.cpp"
click node_identity "https://github.com/kish1bo/distributor/blob/main/jojo/src/kernel.cpp"
click node_filesystem "https://github.com/kish1bo/distributor/blob/main/jojo/src/filesystem.cpp"
click node_installer "https://github.com/kish1bo/distributor/blob/main/jojo/src/instalator_tool.cpp"
click node_packageindex "https://github.com/kish1bo/distributor/blob/main/jojo/src/jojo/usr/downloads/packages.json"
click node_installed "https://github.com/kish1bo/distributor/blob/main/jojo/src/downloads/installed_packages.txt"
click node_scripts "https://github.com/kish1bo/distributor/blob/main/jojo/src/script.cpp"
click node_editor "https://github.com/kish1bo/distributor/blob/main/jojo/src/nano.cpp"
click node_sysctl "https://github.com/kish1bo/distributor/blob/main/jojo/src/sysctl.cpp"
click node_network "https://github.com/kish1bo/distributor/blob/main/jojo/src/network_monitor.cpp"
click node_process "https://github.com/kish1bo/distributor/blob/main/jojo/src/kernel.cpp"

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_console,node_kernel toneBlue
class node_identity,node_filesystem toneAmber
class node_installer,node_scripts,node_editor,node_sysctl,node_network,node_process toneMint
class node_storage,node_packageindex,node_installed toneRose
class node_user toneIndigo
```

## Components

### Shell runtime

- [Console UI](https://github.com/kish1bo/distributor/blob/main/jojo/src/console.cpp): `jojo/src/console.cpp`
- [Kernel shell](https://github.com/kish1bo/distributor/blob/main/jojo/src/kernel.cpp): `jojo/src/kernel.cpp`

### Identity and files

- [Users and roles](https://github.com/kish1bo/distributor/blob/main/jojo/src/kernel.cpp): `jojo/src/kernel.cpp`
- [Virtual filesystem](https://github.com/kish1bo/distributor/blob/main/jojo/src/filesystem.cpp): `jojo/src/filesystem.cpp`

### Modules and tools

- [Package manager](https://github.com/kish1bo/distributor/blob/main/jojo/src/instalator_tool.cpp): `jojo/src/instalator_tool.cpp`
- [Script engine](https://github.com/kish1bo/distributor/blob/main/jojo/src/script.cpp): `jojo/src/script.cpp`
- [Nano editor](https://github.com/kish1bo/distributor/blob/main/jojo/src/nano.cpp): `jojo/src/nano.cpp`
- [System control](https://github.com/kish1bo/distributor/blob/main/jojo/src/sysctl.cpp): `jojo/src/sysctl.cpp`
- [Network monitor](https://github.com/kish1bo/distributor/blob/main/jojo/src/network_monitor.cpp): `jojo/src/network_monitor.cpp`
- [Process control](https://github.com/kish1bo/distributor/blob/main/jojo/src/kernel.cpp): `jojo/src/kernel.cpp`

### Persistent state

- **Filesystem data**
- [Package catalog](https://github.com/kish1bo/distributor/blob/main/jojo/src/jojo/usr/downloads/packages.json): `jojo/src/jojo/usr/downloads/packages.json`
- [Installed package list](https://github.com/kish1bo/distributor/blob/main/jojo/src/downloads/installed_packages.txt): `jojo/src/downloads/installed_packages.txt`

### Other components

- **Operator**

## Connections

- Operator → Console UI: enters commands
- Console UI → Kernel shell: starts shell
- Kernel shell → Console UI: renders prompts (evidence: `jojo/src/kernel.cpp`)
- Kernel shell → Users and roles: manages sessions (evidence: `jojo/src/kernel.cpp`)
- Users and roles → Filesystem data: persists users
- Virtual filesystem → Kernel shell: registers commands (evidence: `jojo/src/filesystem.cpp`)
- Virtual filesystem → Filesystem data: reads and writes (evidence: `jojo/src/filesystem.cpp`)
- Kernel shell → Package manager: registers commands (evidence: `jojo/src/kernel.cpp`)
- Package manager → Package catalog: loads catalog (evidence: `jojo/src/instalator_tool.cpp`)
- Package manager → Installed package list: tracks installs (evidence: `jojo/src/instalator_tool.cpp`)
- Package manager → Filesystem data: installs package files (evidence: `jojo/src/instalator_tool.cpp`)
- Kernel shell → System control: registers commands (evidence: `jojo/src/kernel.cpp`)
- Kernel shell → Network monitor: registers commands (evidence: `jojo/src/kernel.cpp`)
- Kernel shell → Script engine: executes scripts (evidence: `jojo/src/kernel.cpp`)
