Skip to content

About

Hyper-Minimalist Sovereign Architecture Engine & Confinement Perimeter

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

27 Commits

Folders and files

Repository files navigation

Void Architecture™ (void)

The Sovereign, Zero-Build Full-Stack Paradigm via In-Process Micro-Persistence & Kernel Confinement.

License: MIT Go Version OCaml Version Architecture Containment


1. Executive Manifesto

Contemporary software engineering has conflated structural complexity with scalability. Production systems routinely collapse under layered taxes: multi-gigabyte container base images, sprawling client build pipelines (node_modules), serialization penalties across external database sockets, and daemon escape vectors.

Void Architecture™ enforces an uncompromising counter-paradigm:

  • Zero Build-Step Frontend: Pure hypermedia via htmx, Alpine.js, and classless Pico.css served directly or statically mounted.
  • First-Class Sovereign Runtimes:
    • OCaml (Default): Bare-metal native executable powered by Dream, Caqti 2.x, and Lwt for functional type-safety and sub-millisecond execution.
    • Pure Go: In-process SQLite3 under Write-Ahead Logging (modernc.org/sqlite) compiled as a single static executable (CGO_ENABLED=0).
  • Domain Purity (DDD): Explicit TxManager ACID boundaries, aggregate invariants, and repository contracts.
  • The Single Conduit: The application runs entirely within volatile physical RAM (tmpfs). Only /data is projected to host non-volatile storage. Upon process termination, the containment perimeter dissolves into zero persistent bytes.

2. Architecture Topology

┌───────────────────────────────────────────────────────────┐
│                     Client Boundary                       │
│        Pico.css (Semantic HTML) + htmx + Alpine.js        │
└─────────────────────────────▲─────────────────────────────┘
                              │ Wire: Pure Hypermedia (HTML Snippets)
┌─────────────────────────────▼─────────────────────────────┐
│                 Kernel Containment Perimeter              │
│       unshare (NEWNS, NEWPID, NEWIPC, NEWUTS) + chroot    │
│  ┌─────────────────────────────────────────────────────┐  │
│  │       Native Binary (OCaml native.exe or Go)        │  │
│  │   ┌──────────────────────────────────────────────┐  │  │
│  │   │        Domain-Driven Design (DDD Core)       │  │  │
│  │   │  • Pure Domain Entities & Invariants         │  │  │
│  │   │  • Explicit TxManager (ACID Orchestration)   │  │  │
│  │   │  • Typed Result / Monadic Pipeline           │  │  │
│  │   └──────────────────────▲───────────────────────┘  │  │
│  │                          │ In-Process Memory Call   │  │
│  │   ┌──────────────────────▼───────────────────────┐  │  │
│  │   │        SQLite3 (WAL Mode + 5s Timeout)       │  │  │
│  │   │  • Caqti Lwt Pool (OCaml) / modernc (Go)     │  │  │
│  │   │  • Sub-15µs in-memory query evaluation       │  │  │
│  │   └──────────────────────┬───────────────────────┘  │  │
│  └──────────────────────────┼──────────────────────────┘  │
└─────────────────────────────┼─────────────────────────────┘
                              │
                    Single Conduit (/data)
                              │
            ┌─────────────────▼─────────────────┐
            │ Host Persistent Storage (/data)   │
            │          app.sqlite3 (WAL)        │
            └───────────────────────────────────┘

3. Installation

Clone and compile the pure static void engine:

git clone https://github.com/parorafia/void-9-architecture.git
cd void-9-architecture

# Compile pure static engine to ./bin/void
make

# Install to /usr/local/bin/void (or /usr/bin/void)
sudo make install

4. CLI Usage

The void CLI provides a unified lifecycle for generating, isolating, packaging, and distributing sovereign service runtimes.

Void Sovereign Engine (void)
Hyper-Minimalist Sovereign Architecture & Confinement Perimeter

USAGE:
  void scaffold <dir>                              Scaffold a pure DDD Void web application
  void ldd <binary> <output-dir>                   Recursively collect ELF dependencies & ld loader
  void pkg [--latest] <pkg-name|archive> <rootfs>  Recursively unpack Arch packages & dependencies into rootfs
  void jail [-u <user>] [--bind=...] [--lib=...]   Execute binary inside volatile unshare/chroot RAM jail
  void export [--bind=...] [--lib=...] --output=.. Package rootfs directory or standalone .tar.gz

4.1. Scaffold a Sovereign Web Application

Materialize an OCaml (Dream + Caqti + Lwt) skeleton with DDD layers and transactional integrity in sub-millisecond time:

void scaffold sentinel-core
cd sentinel-core

# Compile native binary via Dune
make build

4.2. Run Locally in Development

Execute with zero runtime build steps and microsecond startup latency:

# Initialize SQLite schema
mkdir -p data
sqlite3 data/app.sqlite3 < migrations/001_init.sql

# Launch application
make run

Visit: http://localhost:8080

4.3. Launch Inside Ephemeral RAM Jail (void jail)

Run applications inside an unshared Linux namespace (CLONE_NEWNS, CLONE_NEWPID, CLONE_NEWIPC, CLONE_NEWUTS) backed entirely by volatile tmpfs.

Native Binary (OCaml / Go)

# Compile native binary
make build

# Launch with selective projection (web assets as read-only, data directory as read-write)
sudo void jail \
  --bind=./web:/web:ro,./data:/data \
  ./bin/app

Dynamic / C++ ELF Binaries

For binaries requiring dynamic linkers and shared libraries:

# 1. Recursively trace and harvest ELF dependencies
void ldd /usr/bin/mecab ./lib

# 2. Project libraries and configuration into volatile jail
sudo void jail \
  --lib ./lib \
  --bind=/etc/mecabrc:/etc/mecabrc:ro,/usr/lib/mecab:/usr/lib/mecab:ro \
  /usr/bin/mecab

4.4. Sovereign Package Resolver (void pkg)

Extract and recursively resolve entire distribution packages into a clean, minimal rootfs without running container daemons or installing files onto host system paths.

Official Repository Mode (Recommended)

Specify a package name directly. void pkg queries pacman, downloads the canonical release and all upstream dependencies into the cache, unpacks the tree, and resolves runtime dynamic linkers:

# Recursively assemble PostgreSQL and all dependencies into /opt/void-postgres/rootfs
sudo void pkg postgresql /opt/void-postgres/rootfs

Offline Archive Mode

Provide a specific .pkg.tar.zst file to unpack using existing cached dependencies:

sudo void pkg /path/to/my-custom-package.pkg.tar.zst /opt/void-postgres/rootfs

4.5. Isolated Database Execution (PostgreSQL Demo)

Run a production RDBMS daemon inside an unprivileged, unshared volatile perimeter:

# 1. Initialize DB cluster under unprivileged user 'postgres'
sudo void jail -u postgres --lib /opt/void-postgres/rootfs/lib \
    --bind=/opt/void-postgres/data:/data,\
/opt/void-postgres/rootfs/usr/share:/usr/share:ro,\
/opt/void-postgres/rootfs/usr/lib/postgresql:/usr/lib/postgresql:ro \
    /opt/void-postgres/rootfs/usr/bin/initdb \
    /opt/void-postgres/rootfs/usr/bin/postgres \
    /opt/void-postgres/rootfs/usr/bin/locale \
    /opt/void-postgres/rootfs/usr/bin/bash \
    /opt/void-postgres/rootfs/usr/bin/sh -- \
    -D /data

# 2. Launch PostgreSQL server
sudo void jail -u postgres --lib /opt/void-postgres/rootfs/lib \
    --bind=/opt/void-postgres/data:/data,\
/opt/void-postgres/rootfs/usr/share:/usr/share:ro,\
/opt/void-postgres/rootfs/usr/lib/postgresql:/usr/lib/postgresql:ro \
    /opt/void-postgres/rootfs/usr/bin/postgres -- \
    -D /data -c unix_socket_directories=/tmp -c listen_addresses='127.0.0.1'

Connect directly from the host:

psql -h 127.0.0.1 -U postgres -c "SELECT version();"

4.6. Package Standalone Images (void export)

Assemble a self-contained rootfs directory or .tar.gz archive for deployment onto pristine Linux hosts:

# Export as a compressed tarball
void export \
  --lib ./lib \
  --bind=./web:/web:ro,./data:/data \
  --output sentinel-core-standalone.tar.gz \
  ./bin/app

# Or assemble as a raw rootfs directory
void export \
  --lib ./lib \
  --bind=/etc/mecabrc:/etc/mecabrc:ro,/usr/lib/mecab:/usr/lib/mecab:ro \
  --output ./mecab_rootfs \
  /usr/bin/mecab

5. Systemic Performance Metrics

Metric Void Architecture™ Standard Web Stack (Node + React + Postgres + K8s)
Cold Start Latency $&lt; 5\text{ms}$ $3,000\text{ms} - 15,000\text{ms}$
Idle Memory (RSS) $\approx 12\text{MB} - 18\text{MB}$ total $650\text{MB} - 1.8\text{GB}$
External Dependencies $&lt; 8$ audited packages $&gt; 1,800$ npm packages + container layers
Payload Size Single $\approx 15\text{MB} - 25\text{MB}$ native binary $1.2\text{GB} - 4.0\text{GB}$ (OCI images)
Data Query Latency $&lt; 15\mu\text{s}$ (direct in-process) $800\mu\text{s} - 3,500\mu\text{s}$ (TCP/Socket loop)
Client Build Latency $0\text{s}$ (Zero client bundler) $45\text{s} - 180\text{s}$ (Webpack / Vite)
Persistence Boundary Single conduit (/data) Host-wide filesystem exposure

6. Threat Posture & Defense

  1. Supply-Chain Elimination: Abolishing client-side package managers (npm/yarn) eliminates automated malicious post-install script hooks, dependency confusion, and telemetry leaks.
  2. Network Surface Occlusion: In-process databases (SQLite3 WAL) and socket-bound jails eliminate exposed TCP ports.
  3. Volatile In-Memory Confinement: Execution resides in an unshared namespace (CLONE_NEWNS, CLONE_NEWPID, CLONE_NEWIPC, CLONE_NEWUTS) backed by tmpfs. The host filesystem (/home, /root, /etc/shadow) remains invisible.
  4. Privilege Downgrade: Jail execution supports immediate privilege drop via -u <user>, guaranteeing rootless containment even if invoked via sudo.
  5. Zero Residual Footprint: Termination collapses the volatile mount. Zero bytes remain recoverable from disk except for explicitly committed persistent conduits.

7. I use Arch BTW.

Core architecture is strictly built for and powered by Arch Linux. If you want Debian/Ubuntu support, feel free to fork it.


8. License

Released under the MIT License.

Engineered by parorafia (@xsigil).

About

Hyper-Minimalist Sovereign Architecture Engine & Confinement Perimeter

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages