# ntinosthegamer2324/moduos architecture

> Architecture diagram of the GitHub repository ntinosthegamer2324/moduos, 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/ntinosthegamer2324/moduos
- Repository: https://github.com/ntinosthegamer2324/moduos

## Overview

ModuOS is a hobby AMD64 operating system. Its principal user workflow is running a userland program: the kernel manages processes and exposes services through syscalls, while drivers, filesystems, and SQRM modules provide hardware and storage capabilities. The README documents these capabilities, and sampled source confirms selected SQRM, filesystem, and virtual-drive relationships. Many subsystems are represented by tree-supported paths but were not sampled, so their internal call relationships are not inferred.

Main entry points: [`userland`](https://github.com/ntinosthegamer2324/moduos/tree/experimental/userland) (User Programs), [`src/kernel/modules/sqrm.c`](https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/kernel/modules/sqrm.c) (SQRM Runtime), [`src/fs/fs.c`](https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/fs/fs.c) (Filesystem Services), [`src/kernel/core/kernel.c`](https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/kernel/core/kernel.c) (Kernel Core)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_kernel["Kernel"]
  node_kernel_core["Kernel Core<br/>[kernel.c]"]
  node_processes["Processes and Scheduling"]
  node_syscalls["Syscall Interface<br/>[syscall.c]"]
  node_memory["Memory Management"]
end

subgraph group_hardware["Hardware"]
  node_vdrives["Virtual Drives<br/>[vDrive.c]"]
  node_pci["PCI Enumeration<br/>[pci.c]"]
  node_graphics["Graphics Drivers"]
  node_input["Input Drivers"]
end

subgraph group_storage["Storage"]
  node_filesystems["Filesystem Services<br/>[fs.c]"]
  node_fs_formats["Filesystem Formats"]
  node_filesystem_interfaces["Filesystem Interfaces<br/>[fs.h]"]
  node_block_api["Block Device API<br/>[blockdev.h]"]
  node_devfs["Device Filesystem<br/>[devfs.h]"]
end

subgraph group_sqrm["SQRM Modules"]
  node_sqrm_runtime["SQRM Runtime<br/>[sqrm.c]"]
  node_sqrm_sdk["SQRM SDK<br/>[sqrm_sdk.h]"]
  node_network_module["Network Module<br/>[e1000_sqrm.c]"]
  node_graphics_modules["GPU Modules<br/>[qxl_gpu_sqrm.c]"]
  node_filesystem_module["Ext2 Module<br/>[ext2_sqrm.c]"]
end

subgraph group_user["Userland and Graphics"]
  node_programs["User Programs"]
  node_libc["C Library<br/>[libc.c]"]
  node_network_apps["Network Clients<br/>[http_client.c]"]
  node_netd["Network Service<br/>[netd_ipc.h]"]
  node_miniz["Archive Library<br/>[miniz.c]"]
  node_display_systems["Display Systems"]
  node_font_tools["Font Tools"]
  node_archive_tools["Archive Formats<br/>[tpk_archiver.py]"]
end

node_user_actor(("User"))

node_user_actor -->|"runs"| node_programs
node_programs -->|"uses"| node_libc
node_libc -->|"invokes"| node_syscalls
node_syscalls -->|"serves"| node_processes
node_kernel_core -->|"manages"| node_memory
node_kernel_core -->|"supports"| node_processes
node_network_apps -->|"requests"| node_netd
node_netd -.->|"uses"| node_network_module
node_sqrm_runtime -->|"loads"| node_network_module
node_sqrm_runtime -->|"loads"| node_graphics_modules
node_sqrm_runtime -->|"loads"| node_filesystem_module
node_sqrm_sdk -->|"supports"| node_network_module
node_sqrm_sdk -->|"supports"| node_graphics_modules
node_filesystems -->|"reads drives"| node_vdrives
node_filesystems -->|"mounts formats"| node_fs_formats
node_filesystems -->|"probes drivers"| node_filesystem_module
node_vdrives -->|"implements"| node_block_api
node_devfs -->|"uses"| node_filesystem_interfaces
node_pci -->|"enumeration API"| node_sqrm_runtime
node_graphics_modules -->|"accelerates"| node_graphics
node_programs -->|"uses"| node_display_systems
node_programs -.->|"uses archives"| node_miniz
node_programs -->|"handles packages"| node_archive_tools
node_programs -->|"uses generated fonts"| node_font_tools
node_input -.->|"provides input"| node_kernel_core

click node_programs "https://github.com/ntinosthegamer2324/moduos/tree/experimental/userland"
click node_libc "https://github.com/ntinosthegamer2324/moduos/blob/experimental/userland/libc/libc.c"
click node_network_apps "https://github.com/ntinosthegamer2324/moduos/blob/experimental/userland/http_client.c"
click node_netd "https://github.com/ntinosthegamer2324/moduos/blob/experimental/userland/netd_ipc.h"
click node_miniz "https://github.com/ntinosthegamer2324/moduos/blob/experimental/userland/thirdparty/miniz/miniz.c"
click node_kernel_core "https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/kernel/core/kernel.c"
click node_processes "https://github.com/ntinosthegamer2324/moduos/tree/experimental/src/kernel/process"
click node_syscalls "https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/kernel/syscall/syscall.c"
click node_memory "https://github.com/ntinosthegamer2324/moduos/tree/experimental/src/kernel/memory"
click node_sqrm_runtime "https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/kernel/modules/sqrm.c"
click node_sqrm_sdk "https://github.com/ntinosthegamer2324/moduos/blob/experimental/sdk/sqrm_sdk.h"
click node_network_module "https://github.com/ntinosthegamer2324/moduos/blob/experimental/modules/NET/e1000_sqrm.c"
click node_graphics_modules "https://github.com/ntinosthegamer2324/moduos/blob/experimental/modules/QXL/src/qxl_gpu_sqrm.c"
click node_filesystem_module "https://github.com/ntinosthegamer2324/moduos/blob/experimental/modules/ext2_sqrm.c"
click node_vdrives "https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/drivers/Drive/vDrive.c"
click node_pci "https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/drivers/PCI/pci.c"
click node_graphics "https://github.com/ntinosthegamer2324/moduos/tree/experimental/src/drivers/graphics"
click node_input "https://github.com/ntinosthegamer2324/moduos/tree/experimental/src/drivers/input"
click node_filesystems "https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/fs/fs.c"
click node_fs_formats "https://github.com/ntinosthegamer2324/moduos/tree/experimental/src/fs"
click node_filesystem_interfaces "https://github.com/ntinosthegamer2324/moduos/blob/experimental/include/moduos/fs/fs.h"
click node_block_api "https://github.com/ntinosthegamer2324/moduos/blob/experimental/include/moduos/kernel/blockdev.h"
click node_devfs "https://github.com/ntinosthegamer2324/moduos/blob/experimental/include/moduos/fs/devfs.h"
click node_display_systems "https://github.com/ntinosthegamer2324/moduos/tree/experimental/userland"
click node_font_tools "https://github.com/ntinosthegamer2324/moduos/tree/experimental/tools/FNT"
click node_archive_tools "https://github.com/ntinosthegamer2324/moduos/blob/experimental/tools/tpk_archiver.py"

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_kernel_core,node_processes,node_syscalls,node_memory,node_user_actor toneBlue
class node_vdrives,node_pci,node_graphics,node_input toneAmber
class node_filesystems,node_fs_formats,node_filesystem_interfaces,node_block_api,node_devfs toneMint
class node_sqrm_runtime,node_sqrm_sdk,node_network_module,node_graphics_modules,node_filesystem_module toneRose
class node_programs,node_libc,node_network_apps,node_netd,node_miniz,node_display_systems,node_font_tools,node_archive_tools toneIndigo
```

## Components

### Kernel

- [Kernel Core](https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/kernel/core/kernel.c): `src/kernel/core/kernel.c`
- [Processes and Scheduling](https://github.com/ntinosthegamer2324/moduos/tree/experimental/src/kernel/process): `src/kernel/process`
- [Syscall Interface](https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/kernel/syscall/syscall.c): `src/kernel/syscall/syscall.c`
- [Memory Management](https://github.com/ntinosthegamer2324/moduos/tree/experimental/src/kernel/memory): `src/kernel/memory`

### Hardware

- [Virtual Drives](https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/drivers/Drive/vDrive.c): `src/drivers/Drive/vDrive.c`
- [PCI Enumeration](https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/drivers/PCI/pci.c): `src/drivers/PCI/pci.c`
- [Graphics Drivers](https://github.com/ntinosthegamer2324/moduos/tree/experimental/src/drivers/graphics): `src/drivers/graphics`
- [Input Drivers](https://github.com/ntinosthegamer2324/moduos/tree/experimental/src/drivers/input): `src/drivers/input`

### Storage

- [Filesystem Services](https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/fs/fs.c): `src/fs/fs.c`
- [Filesystem Formats](https://github.com/ntinosthegamer2324/moduos/tree/experimental/src/fs): `src/fs`
- [Filesystem Interfaces](https://github.com/ntinosthegamer2324/moduos/blob/experimental/include/moduos/fs/fs.h): `include/moduos/fs/fs.h`
- [Block Device API](https://github.com/ntinosthegamer2324/moduos/blob/experimental/include/moduos/kernel/blockdev.h): `include/moduos/kernel/blockdev.h`
- [Device Filesystem](https://github.com/ntinosthegamer2324/moduos/blob/experimental/include/moduos/fs/devfs.h): `include/moduos/fs/devfs.h`

### SQRM Modules

- [SQRM Runtime](https://github.com/ntinosthegamer2324/moduos/blob/experimental/src/kernel/modules/sqrm.c): `src/kernel/modules/sqrm.c`
- [SQRM SDK](https://github.com/ntinosthegamer2324/moduos/blob/experimental/sdk/sqrm_sdk.h): `sdk/sqrm_sdk.h`
- [Network Module](https://github.com/ntinosthegamer2324/moduos/blob/experimental/modules/NET/e1000_sqrm.c): `modules/NET/e1000_sqrm.c`
- [GPU Modules](https://github.com/ntinosthegamer2324/moduos/blob/experimental/modules/QXL/src/qxl_gpu_sqrm.c): `modules/QXL/src/qxl_gpu_sqrm.c`
- [Ext2 Module](https://github.com/ntinosthegamer2324/moduos/blob/experimental/modules/ext2_sqrm.c): `modules/ext2_sqrm.c`

### Userland and Graphics

- [User Programs](https://github.com/ntinosthegamer2324/moduos/tree/experimental/userland): `userland`
- [C Library](https://github.com/ntinosthegamer2324/moduos/blob/experimental/userland/libc/libc.c): `userland/libc/libc.c`
- [Network Clients](https://github.com/ntinosthegamer2324/moduos/blob/experimental/userland/http_client.c): `userland/http_client.c`
- [Network Service](https://github.com/ntinosthegamer2324/moduos/blob/experimental/userland/netd_ipc.h): `userland/netd_ipc.h`
- [Archive Library](https://github.com/ntinosthegamer2324/moduos/blob/experimental/userland/thirdparty/miniz/miniz.c): `userland/thirdparty/miniz/miniz.c`
- [Display Systems](https://github.com/ntinosthegamer2324/moduos/tree/experimental/userland): `userland`
- [Font Tools](https://github.com/ntinosthegamer2324/moduos/tree/experimental/tools/FNT): `tools/FNT`
- [Archive Formats](https://github.com/ntinosthegamer2324/moduos/blob/experimental/tools/tpk_archiver.py): `tools/tpk_archiver.py`

### Other components

- **User**

## Connections

- User → User Programs: runs
- User Programs → C Library: uses (evidence: `userland/libc/libc.c`)
- C Library → Syscall Interface: invokes (evidence: `userland/libc/libc.c`)
- Syscall Interface → Processes and Scheduling: serves
- Kernel Core → Memory Management: manages
- Kernel Core → Processes and Scheduling: supports
- Network Clients → Network Service: requests (evidence: `userland/http_client.c`)
- Network Service → Network Module: uses
- SQRM Runtime → Network Module: loads (evidence: `src/kernel/modules/sqrm.c`)
- SQRM Runtime → GPU Modules: loads (evidence: `src/kernel/modules/sqrm.c`)
- SQRM Runtime → Ext2 Module: loads (evidence: `src/kernel/modules/sqrm.c`)
- SQRM SDK → Network Module: supports (evidence: `modules/NET/e1000_sqrm.c`)
- SQRM SDK → GPU Modules: supports (evidence: `modules/QXL/src/qxl_gpu_sqrm.c`)
- Filesystem Services → Virtual Drives: reads drives (evidence: `src/fs/fs.c`)
- Filesystem Services → Filesystem Formats: mounts formats (evidence: `src/fs/fs.c`)
- Filesystem Services → Ext2 Module: probes drivers (evidence: `src/fs/fs.c`)
- Virtual Drives → Block Device API: implements (evidence: `src/drivers/Drive/vDrive.c`)
- Device Filesystem → Filesystem Interfaces: uses (evidence: `include/moduos/fs/devfs.h`)
- PCI Enumeration → SQRM Runtime: enumeration API
- GPU Modules → Graphics Drivers: accelerates (evidence: `modules/QXL/src/qxl_gpu_sqrm.c`)
- User Programs → Display Systems: uses
- User Programs → Archive Library: uses archives (evidence: `userland/thirdparty/miniz/miniz.c`)
- User Programs → Archive Formats: handles packages
- User Programs → Font Tools: uses generated fonts
- Input Drivers → Kernel Core: provides input
