Hero - the sovereign everything app
Find a file
despiegk 0b2e865079
Some checks failed
Build and Test / build (push) Failing after 1m14s
Fix Makefile cargo and shell compatibility
Add SHELL := /bin/bash to use bash instead of sh (enables source command)
Add CARGO_ENV helper to ensure cargo is in PATH before running cargo commands

This fixes exit code 127 errors in CI/CD environments where cargo might not
be in the default PATH.

Applies to all cargo-using targets: build, check, fmt, fmt-check, lint,
run, test, test-all, clean, installdev, deps.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-07 20:54:06 +04:00
.forgejo/workflows feat: Adopt build_lib.sh build system for Makefile and CI workflows 2026-02-07 09:27:32 +04:00
data/mock-db/db init 2026-02-07 09:11:09 +04:00
examples refactor: Convert to Rust CLI with hero_coordinator repo rename 2026-02-05 09:44:41 +01:00
scripts feat: Adopt build_lib.sh build system for Makefile and CI workflows 2026-02-07 09:27:32 +04:00
src feat: Use debug builds for development branches 2026-02-05 11:26:52 +01:00
tests refactor: Convert to Rust CLI with hero_coordinator repo rename 2026-02-05 09:44:41 +01:00
.gitignore refactor: Convert to Rust CLI with hero_coordinator repo rename 2026-02-05 09:44:41 +01:00
build.rs refactor: Convert to Rust CLI with hero_coordinator repo rename 2026-02-05 09:44:41 +01:00
buildenv.sh feat: Adopt build_lib.sh build system for Makefile and CI workflows 2026-02-07 09:27:32 +04:00
Cargo.toml Standardize Rust edition 2024 and rust-version 1.92 2026-02-07 09:35:09 +04:00
LICENSE Initial commit 2026-01-09 21:39:18 +00:00
Makefile Fix Makefile cargo and shell compatibility 2026-02-07 20:54:06 +04:00
README.md refactor: Convert to Rust CLI with hero_coordinator repo rename 2026-02-05 09:44:41 +01:00

Hero Zero

Own your digital life.

Hero Zero is the foundational layer of a new internet paradigm—one where you control your data, run your own backend, and break free from the client-server model that has defined (and confined) digital life for decades.

The Vision

The internet was built on a simple but flawed assumption: servers hold the data, clients consume it. This created an architecture of dependence—your photos live on someone else's computer, your documents are "in the cloud," and your digital identity is scattered across a hundred services you don't control.

Hero Zero inverts this.

Instead of being a client to countless servers, you become the center of your own digital universe. Your device runs the services. Your data stays with you. The triangle flips.

    ╭─────────────────────────────────────────────────────────────╮
    │                    THE OLD PARADIGM                         │
    │                                                             │
    │                        ┌─────────┐                          │
    │                        │  Cloud  │                          │
    │                        │ Server  │                          │
    │                        └────┬────┘                          │
    │                             │                               │
    │              ┌──────────────┼──────────────┐                │
    │              │              │              │                │
    │              ▼              ▼              ▼                │
    │         ┌────────┐    ┌────────┐    ┌────────┐              │
    │         │ Client │    │ Client │    │ Client │              │
    │         └────────┘    └────────┘    └────────┘              │
    │                                                             │
    │         You are the leaf. They hold the root.               │
    ╰─────────────────────────────────────────────────────────────╯

    ╭─────────────────────────────────────────────────────────────╮
    │                    THE HERO ZERO PARADIGM                   │
    │                                                             │
    │                        ┌─────────┐                          │
    │                        │   YOU   │                          │
    │                        │ (Hero)  │                          │
    │                        └────┬────┘                          │
    │                             │                               │
    │              ┌──────────────┼──────────────┐                │
    │              │              │              │                │
    │              ▼              ▼              ▼                │
    │         ┌────────┐    ┌────────┐    ┌────────┐              │
    │         │ Service│    │ Service│    │ Service│              │
    │         └────────┘    └────────┘    └────────┘              │
    │                                                             │
    │         You are the root. Services orbit you.               │
    ╰─────────────────────────────────────────────────────────────╯

What Hero Zero Provides

Hero Zero orchestrates a complete personal backend stack:

Service Port Purpose
hero_osis 3377 Your personal API layer
hero_forge 7365 Your code repositories
hero_wasmos 8201 Your WASM application environment
hero_redis 6666 Your personal database

Each service runs locally, supervised by zinit—a minimal, reliable process manager that ensures your services stay running.

Quick Start

# Clone and run
git clone ssh://git@forge.ourworld.tf/lhumina_code/hero_zero.git
cd hero_zero
make

# That's it. Your personal backend is running.

Build Options

make              # Install from stable releases and run
make main         # Build from main branches (latest stable)
make development  # Build from development branches (cutting edge)
make stop         # Stop all services
make status       # Show service status
make test         # Run service tests

Architecture

Hero Zero is a thin orchestration layer—a Rust CLI with a Makefile wrapper:

┌──────────────────────────────────────────┐
│           Makefile (thin wrapper)        │
│  make run  make stop  make status  ...   │
└────────────────────┬─────────────────────┘
                     │
                     ▼
┌──────────────────────────────────────────┐
│         hero_zero CLI (Rust)             │
│  - Service installation (cargo install)  │
│  - Zinit config generation               │
│  - Service management commands           │
└────────────────────┬─────────────────────┘
                     │
                     ▼
┌──────────────────────────────────────────┐
│         zinit (process supervisor)       │
│  - Service startup/shutdown              │
│  - Dependency ordering                   │
│  - Automatic restart on crash            │
└──────────────────────────────────────────┘

CLI Reference

# Build the CLI
cargo build --release

# Installation commands
./target/release/hero_zero install              # Install from release tags
./target/release/hero_zero install --branch main        # Install from main
./target/release/hero_zero install --branch development # Install development

# Runtime commands
./target/release/hero_zero run      # Start all services
./target/release/hero_zero stop     # Stop all services
./target/release/hero_zero status   # Show service status
./target/release/hero_zero config   # Generate zinit configs
./target/release/hero_zero version  # Show installed versions

# Cleanup
./target/release/hero_zero clean        # Remove generated configs
./target/release/hero_zero clean --all  # Remove everything including binaries

How Installation Works

Hero Zero uses cargo install --git to fetch and compile services directly from their repositories into ~/hero/bin/. This approach:

  • Never touches your local workspace checkouts
  • Uses Cargo's git cache (~/.cargo/git/) for efficient rebuilds
  • Supports tagged releases, main branches, or development branches
  • Provides reproducible, hermetic installations

Runtime Directories

~/hero/
├── bin/           # Compiled service binaries
├── src/           # hero_wasmos source (for dx serve)
├── var/           # Runtime data
│   ├── zinit.sock
│   ├── hero_osis/data/
│   ├── hero_forge/repos/
│   └── hero_redis/data/
└── cfg/zinit/     # Service configs (YAML)

Creating Releases

For service maintainers, each repo includes release targets:

make release        # Patch release: 0.0.1 → 0.0.2
make release-minor  # Minor release: 0.1.0 → 0.2.0
make release-major  # Major release: 1.0.0 → 2.0.0

Requirements

  • Rust toolchain
  • dx (Dioxus CLI) — auto-installed if missing

Philosophy

Hero Zero isn't just software. It's the beginning of a shift.

For too long, we've accepted that our digital lives must be hosted, managed, and ultimately controlled by others. Hero Zero is a step toward something different—a world where technology serves the individual, where your data is truly yours, and where the infrastructure of your digital life runs on your terms.

Zero dependencies on external services. Full ownership. That's Hero Zero.

License

Apache-2.0