# plertube2bd/nyxis-os architecture

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

- Interactive diagram: https://gitdiagram.com/plertube2bd/nyxis-os
- Repository: https://github.com/plertube2bd/nyxis-os

## Overview

Nyxis OS is an experimental x86-64 operating system whose main user journey is boot, login, then use a shell or the keyboard-driven ntui desktop. Its runtime spans kernel process and syscall services, filesystem and device access, and userland services and applications. The graph preserves documented storage, security, IPC and desktop capabilities. Several subsystem links rely on the README because their implementation files were not sampled; those links are dashed where the call path is unverified.

Main entry points: [`drivers/filesystem/vfs.c`](https://github.com/plertube2bd/nyxis-os/blob/main/drivers/filesystem/vfs.c) (VFS), [`userland/login/main.c`](https://github.com/plertube2bd/nyxis-os/blob/main/userland/login/main.c) (Login), [`userland/ntui/main.c`](https://github.com/plertube2bd/nyxis-os/blob/main/userland/ntui/main.c) (ntui Desktop), [`userland/ntui/server.c`](https://github.com/plertube2bd/nyxis-os/blob/main/userland/ntui/server.c) (Window Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Boot and Kernel"]
  node_bootloader["NYTB Bootloader<br/>[nytb3.c]"]
  node_kernel["Kernel Core<br/>[kernel.c]"]
  node_process["Processes and IPC<br/>[process.c]"]
  node_syscalls["nx64 API<br/>[syscall.c]"]
end

subgraph group_storage["Storage and Security"]
  node_vfs["VFS<br/>[vfs.c]"]
  node_nyfs[("NyFS<br/>[nyfs.c]")]
  node_disk["Disk Drivers<br/>[ahci.c]"]
  node_ramdisk[("RAM Disk<br/>[ramdisk.c]")]
  node_auth["Authentication<br/>[auth.c]"]
end

subgraph group_services["System Services"]
  node_init["Init<br/>[main.c]"]
  node_services_mgr["Service Manager<br/>[service.c]"]
  node_login["Login<br/>[main.c]"]
  node_journal[("System Journal<br/>[main.c]")]
  node_nlibc["nlibc and nx64<br/>[nxsys.c]"]
end

subgraph group_desktop["Desktop and Apps"]
  node_shell["nysh Shell<br/>[main.c]"]
  node_ntui["ntui Desktop<br/>[main.c]"]
  node_nwp["Window Server<br/>[server.c]"]
  node_nterm["Terminal<br/>[main.c]"]
  node_nfiles["File Manager<br/>[main.c]"]
  node_desktop_apps["Desktop Utilities<br/>[main.c]"]
end

node_user(("User"))

node_bootloader -.->|"boots"| node_kernel
node_user -->|"signs in"| node_login
node_init -->|"starts"| node_login
node_init -->|"delegates requests"| node_services_mgr
node_login -.->|"authenticates"| node_auth
node_auth -->|"reads user DB"| node_vfs
node_user -.->|"uses"| node_shell
node_user -.->|"uses desktop"| node_ntui
node_login -.->|"starts desktop"| node_ntui
node_ntui -->|"serves windows"| node_nwp
node_nterm -.->|"connects"| node_nwp
node_nfiles -.->|"connects"| node_nwp
node_desktop_apps -.->|"runs in desktop"| node_ntui
node_nlibc -.->|"wraps API"| node_syscalls
node_syscalls -.->|"dispatches"| node_process
node_process -.->|"uses filesystem"| node_vfs
node_vfs -->|"registers driver"| node_nyfs
node_vfs -.->|"accesses storage"| node_disk
node_vfs -.->|"mounts root"| node_ramdisk
node_services_mgr -.->|"logs services"| node_journal
node_desktop_apps -.->|"views journal"| node_journal

click node_bootloader "https://github.com/plertube2bd/nyxis-os/blob/main/bootloader/nytb/nytb3.c"
click node_kernel "https://github.com/plertube2bd/nyxis-os/blob/main/nxkernel/kernel/kernel.c"
click node_process "https://github.com/plertube2bd/nyxis-os/blob/main/nxkernel/kernel/process/process.c"
click node_syscalls "https://github.com/plertube2bd/nyxis-os/blob/main/nxkernel/kernel/syscall/syscall.c"
click node_vfs "https://github.com/plertube2bd/nyxis-os/blob/main/drivers/filesystem/vfs.c"
click node_nyfs "https://github.com/plertube2bd/nyxis-os/blob/main/drivers/filesystem/nyfs/nyfs.c"
click node_disk "https://github.com/plertube2bd/nyxis-os/blob/main/drivers/ahci/ahci.c"
click node_ramdisk "https://github.com/plertube2bd/nyxis-os/blob/main/drivers/ramdisk/ramdisk.c"
click node_auth "https://github.com/plertube2bd/nyxis-os/blob/main/nxkernel/kernel/security/auth.c"
click node_init "https://github.com/plertube2bd/nyxis-os/blob/main/userland/init/main.c"
click node_services_mgr "https://github.com/plertube2bd/nyxis-os/blob/main/userland/init/service.c"
click node_login "https://github.com/plertube2bd/nyxis-os/blob/main/userland/login/main.c"
click node_journal "https://github.com/plertube2bd/nyxis-os/blob/main/userland/journald/main.c"
click node_nlibc "https://github.com/plertube2bd/nyxis-os/blob/main/userland/nlibc/src/nxsys.c"
click node_shell "https://github.com/plertube2bd/nyxis-os/blob/main/userland/nysh/main.c"
click node_ntui "https://github.com/plertube2bd/nyxis-os/blob/main/userland/ntui/main.c"
click node_nwp "https://github.com/plertube2bd/nyxis-os/blob/main/userland/ntui/server.c"
click node_nterm "https://github.com/plertube2bd/nyxis-os/blob/main/userland/nterm/main.c"
click node_nfiles "https://github.com/plertube2bd/nyxis-os/blob/main/userland/nfiles/main.c"
click node_desktop_apps "https://github.com/plertube2bd/nyxis-os/blob/main/userland/ntop/main.c"

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_bootloader,node_kernel,node_process,node_syscalls,node_user toneBlue
class node_vfs,node_nyfs,node_disk,node_ramdisk,node_auth toneAmber
class node_init,node_services_mgr,node_login,node_journal,node_nlibc toneMint
class node_shell,node_ntui,node_nwp,node_nterm,node_nfiles,node_desktop_apps toneRose
```

## Components

### Boot and Kernel

- [NYTB Bootloader](https://github.com/plertube2bd/nyxis-os/blob/main/bootloader/nytb/nytb3.c): `bootloader/nytb/nytb3.c`
- [Kernel Core](https://github.com/plertube2bd/nyxis-os/blob/main/nxkernel/kernel/kernel.c): `nxkernel/kernel/kernel.c`
- [Processes and IPC](https://github.com/plertube2bd/nyxis-os/blob/main/nxkernel/kernel/process/process.c): `nxkernel/kernel/process/process.c`
- [nx64 API](https://github.com/plertube2bd/nyxis-os/blob/main/nxkernel/kernel/syscall/syscall.c): `nxkernel/kernel/syscall/syscall.c`

### Storage and Security

- [VFS](https://github.com/plertube2bd/nyxis-os/blob/main/drivers/filesystem/vfs.c): `drivers/filesystem/vfs.c`
- [NyFS](https://github.com/plertube2bd/nyxis-os/blob/main/drivers/filesystem/nyfs/nyfs.c): `drivers/filesystem/nyfs/nyfs.c`
- [Disk Drivers](https://github.com/plertube2bd/nyxis-os/blob/main/drivers/ahci/ahci.c): `drivers/ahci/ahci.c`
- [RAM Disk](https://github.com/plertube2bd/nyxis-os/blob/main/drivers/ramdisk/ramdisk.c): `drivers/ramdisk/ramdisk.c`
- [Authentication](https://github.com/plertube2bd/nyxis-os/blob/main/nxkernel/kernel/security/auth.c): `nxkernel/kernel/security/auth.c`

### System Services

- [Init](https://github.com/plertube2bd/nyxis-os/blob/main/userland/init/main.c): `userland/init/main.c`
- [Service Manager](https://github.com/plertube2bd/nyxis-os/blob/main/userland/init/service.c): `userland/init/service.c`
- [Login](https://github.com/plertube2bd/nyxis-os/blob/main/userland/login/main.c): `userland/login/main.c`
- [System Journal](https://github.com/plertube2bd/nyxis-os/blob/main/userland/journald/main.c): `userland/journald/main.c`
- [nlibc and nx64](https://github.com/plertube2bd/nyxis-os/blob/main/userland/nlibc/src/nxsys.c): `userland/nlibc/src/nxsys.c`

### Desktop and Apps

- [nysh Shell](https://github.com/plertube2bd/nyxis-os/blob/main/userland/nysh/main.c): `userland/nysh/main.c`
- [ntui Desktop](https://github.com/plertube2bd/nyxis-os/blob/main/userland/ntui/main.c): `userland/ntui/main.c`
- [Window Server](https://github.com/plertube2bd/nyxis-os/blob/main/userland/ntui/server.c): `userland/ntui/server.c`
- [Terminal](https://github.com/plertube2bd/nyxis-os/blob/main/userland/nterm/main.c): `userland/nterm/main.c`
- [File Manager](https://github.com/plertube2bd/nyxis-os/blob/main/userland/nfiles/main.c): `userland/nfiles/main.c`
- [Desktop Utilities](https://github.com/plertube2bd/nyxis-os/blob/main/userland/ntop/main.c): `userland/ntop/main.c`

### Other components

- **User**

## Connections

- NYTB Bootloader → Kernel Core: boots
- User → Login: signs in
- Init → Login: starts (evidence: `userland/init/main.c`)
- Init → Service Manager: delegates requests (evidence: `userland/init/main.c`)
- Login → Authentication: authenticates
- Authentication → VFS: reads user DB (evidence: `nxkernel/kernel/security/auth.c`)
- User → nysh Shell: uses
- User → ntui Desktop: uses desktop
- Login → ntui Desktop: starts desktop
- ntui Desktop → Window Server: serves windows (evidence: `userland/ntui/server.c`)
- Terminal → Window Server: connects
- File Manager → Window Server: connects
- Desktop Utilities → ntui Desktop: runs in desktop
- nlibc and nx64 → nx64 API: wraps API
- nx64 API → Processes and IPC: dispatches
- Processes and IPC → VFS: uses filesystem
- VFS → NyFS: registers driver (evidence: `drivers/filesystem/nyfs/nyfs.c`)
- VFS → Disk Drivers: accesses storage
- VFS → RAM Disk: mounts root
- Service Manager → System Journal: logs services
- Desktop Utilities → System Journal: views journal
