Hero - the sovereign everything app
Find a file
Timur Gordon 7415710151
All checks were successful
Build and Test / build (push) Successful in 4m16s
Merge branch 'development_wasm' into development
Resolved conflicts in Cargo.toml files:
- Kept hero_zero-sdk package naming convention
- Kept lhumina_code/hero_lib.git URLs (not geomind_research)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 18:37:13 +01:00
.cargo chore: update local dev config example and adjust heroforge dependency 2026-01-30 21:12:50 -05:00
.forgejo/workflows ci: use rustfmt directly on all .rs files 2026-02-03 19:23:57 -05:00
_archive/mock fix: resolve compilation errors in examples and SDK 2026-01-23 16:53:14 +01:00
data/mock chore: Context updates, remove old themes, add video-room example 2026-02-02 23:25:36 +01:00
docs Merge new_origin/development into development 2026-02-04 17:34:31 +01:00
examples Merge new_origin/development into development 2026-02-04 17:34:31 +01:00
scripts refactor: reorganize project structure and improve Makefile 2026-01-26 09:05:51 +01:00
sdk Merge branch 'development_wasm' into development 2026-02-04 18:37:13 +01:00
specs Merge new_origin/development into development 2026-02-04 17:34:31 +01:00
src fix(embedder): update namespaces field to method call 2026-02-04 18:28:47 +01:00
static icons 2026-01-26 10:12:25 +01:00
tests refactor: rename herozero to hero_zero throughout codebase 2026-02-03 14:09:44 +01:00
.DS_Store fix make dev and regenerate sdk with fixes 2026-01-26 10:54:23 +01:00
.env.example fix: resolve compilation errors in examples and SDK 2026-01-23 16:53:14 +01:00
.gitignore refactor: switch herolib path deps to git URL dependencies 2026-01-30 11:23:30 -05:00
build.rs chore: rename herozero-server -> hero_zero (binary, package, CI) 2026-01-29 18:59:35 -05:00
Cargo.toml build: rename dev dependency hero_zero_sdk 2026-02-04 11:52:55 +02:00
LICENSE Initial commit 2026-01-09 21:39:18 +00:00
Makefile refactor: update Makefile and env var to hero_zero naming 2026-02-03 14:17:53 +01:00
README.md feat: add unified SDK clients for cross-platform support (WASM, iOS, native) 2026-02-02 08:03:35 +01:00

HeroZero

A human-centric backend server entirely generated from schema definitions using OSIS (Object Storage with SmartID).

Quick Start

make run      # Build and run server
make dev      # Run with debug logging
make help     # Show all available commands

Server runs at http://127.0.0.1:3377/api:

  • RPC endpoints: /api/herozero/{domain}/rpc
  • DB Inspector: /api/herozero/{domain}/inspector

How It Works

HeroZero is built on a schema-first architecture. All types, storage, RPC handlers, and documentation are auto-generated from .oschema files in specs/schemas/.

specs/schemas/{domain}/*.oschema  →  build.rs  →  Generated Code
                                         ↓
                    ┌────────────────────┼────────────────────┐
                    ↓                    ↓                    ↓
            src/{domain}/         sdk/rust/src/        docs/schemas/
            - types_generated.rs  - client code        - API docs
            - rpc_generated.rs
            - osis_server.rs

The herolib-osis crate handles:

  • OSchema parsing - Schema language for defining types
  • Code generation - Rust structs, builders, CRUD methods
  • Storage - Filesystem-based with SmartID identifiers
  • Full-text search - Tantivy-powered indexing
  • RPC server - JSON-RPC endpoints per domain

Example Schema

# specs/schemas/business/company.oschema
Company = {
    sid: sid                    # SmartID (auto-generated)
    name: str [rootobject]      # Marks as storable type, indexed
    description?: str [index]   # Optional, full-text indexed
    website?: str
    country?: str
    active: bool
    tags: [str]
}

Running cargo build generates:

  • Company struct with all fields
  • OsisBusiness handler with CRUD methods
  • RPC endpoint at /api/herozero/business/rpc
  • SDK client code

Domains

Domains are logical groupings of related types. Each domain compiles independently via feature flags.

Domain Description
calendar Events, planning, scheduling
files Documents, folders, sharing
finance Money, payments, transactions
communication Messages, channels, notifications
identity Profiles, sessions, contacts
projects Tasks, issues, requirements
code Source code, changes, releases
business CRM, deals, contracts
network Network nodes, marketplace
settings User preferences

Project Structure

hero0/
├── specs/schemas/     # Schema definitions (.oschema files)
├── src/{domain}/      # Generated types and handlers
├── sdk/rust/          # Generated Rust SDK
├── data/mock/         # Seed data (TOML files)
├── data/              # Runtime data (gitignored)
└── tests/             # E2E tests

Environment Variables

Variable Default Description
HEROZERO_BIND 127.0.0.1:3377 Server bind address
HEROZERO_DATA_DIR ~/hero/var/hero0/data Data directory
HEROZERO_SEED_DIR - Seed directory for auto-seeding

Seeding Data

make seed    # Seed from ./data/mock

Seed files are TOML with a _type field:

_type = "Company"
name = "ACME Corporation"
country = "US"
active = true

Important: For types with nested objects (like Theme), all top-level fields must come BEFORE [section] headers. See Seeding Documentation for details and common pitfalls.

RPC Usage

curl -X POST http://127.0.0.1:3377/api/herozero/business/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":"1","method":"company.list","params":{}}'

Methods: {type}.new, {type}.get, {type}.set, {type}.delete, {type}.list, {type}.find

Adding a New Domain

  1. Create schemas in specs/schemas/{domain}/*.oschema
  2. Add feature flag to Cargo.toml
  3. Register domain in build.rs
  4. Add handler in src/bin/server.rs
  5. Run cargo build

Resources

License

Apache-2.0