Backend server fully generated from OSIS schema — OSchema in, API out.
  • Rust 61.8%
  • JavaScript 37.6%
  • HTML 0.2%
  • Shell 0.2%
  • CSS 0.2%
Find a file
mik-tf 2401a6bbdd
Some checks failed
Build and Test / build (push) Failing after 29s
lab publish / publish (push) Failing after 4m48s
ci(lab-publish): publish latest from main, latest-dev from development
Match the canonical pattern so development publishes the latest-dev prerelease
tag instead of overwriting the stable latest release. Pick the release tag by
branch (main -> latest, development -> latest-dev, v* -> ref name).

See lhumina_code/home#268

Signed-by: mik-tf <mik-tf@noreply.invalid>
2026-06-07 17:38:51 -04:00
.claude/status/repospush chore: bump hero_lib, hero_indexer_sdk git refs and update rustls-native-certs, unicode-segmentation 2026-06-01 20:04:44 +02:00
.forgejo/workflows ci(lab-publish): publish latest from main, latest-dev from development 2026-06-07 17:38:51 -04:00
.hero refactor: rename FORGEJO_TOKEN→FORGE_TOKEN, HERO_SOCKET_DIR→PATH_SOCKET; use path_root() for embedder paths 2026-05-29 20:44:01 +02:00
crates chore: remove all hard version pinning from hero_* dependencies 2026-06-06 08:41:26 +02:00
data feat(projects): shrink ProjectStatus to todo|in_progress|done 2026-04-20 18:34:01 +02:00
docs feat: generate OpenRPC docs and JS SDK for all service modules 2026-06-01 20:04:02 +02:00
examples chore: remove all hard version pinning from hero_* dependencies 2026-06-06 08:41:26 +02:00
schema chore: auto-commit local changes before pull 2026-05-31 23:44:42 +02:00
schemas feat(theme): remove Theme entity, ThemeService, and Configuration.theme_id 2026-05-18 12:02:34 +02:00
scripts hero_osis: drop hero_osis_seed binary + --seed-dir startup hook (hero_rpc#117) (#65) 2026-05-21 16:14:06 +00:00
sdk/js feat: generate OpenRPC docs and JS SDK for all service modules 2026-06-01 20:04:02 +02:00
static feat: socket-per-context, hero_osis_ui crate, restructure plan 2026-02-23 18:55:08 +01:00
tests refactor: rename FORGEJO_TOKEN→FORGE_TOKEN, HERO_SOCKET_DIR→PATH_SOCKET; use path_root() for embedder paths 2026-05-29 20:44:01 +02:00
.gitignore chore: ignore Cargo.lock files 2026-06-06 07:54:51 +02:00
Cargo.toml chore: remove all hard version pinning from hero_* dependencies 2026-06-06 08:41:26 +02:00
Cargo.toml.hero_builder_backup chore: migrate hero_lifecycle to hero_lib, drop hero_rpc_server, add dev profile 2026-06-01 09:32:32 +02:00
Dockerfile fix: healthcheck uses /api instead of / (root returns 404) 2026-02-09 10:26:50 -05:00
Dockerfile.build Session 9: fix 5 TODOs + AI assistant enhancements 2026-03-17 12:48:00 -04:00
GETTING_STARTED.md refactor: rename FORGEJO_TOKEN→FORGE_TOKEN, HERO_SOCKET_DIR→PATH_SOCKET; use path_root() for embedder paths 2026-05-29 20:44:01 +02:00
LICENSE Initial commit: Hero Osis OpenRPC Server 2026-02-04 20:23:30 +01:00
PURPOSE.md refactor: rename FORGEJO_TOKEN→FORGE_TOKEN, HERO_SOCKET_DIR→PATH_SOCKET; use path_root() for embedder paths 2026-05-29 20:44:01 +02:00
README.md refactor: rename FORGEJO_TOKEN→FORGE_TOKEN, HERO_SOCKET_DIR→PATH_SOCKET; use path_root() for embedder paths 2026-05-29 20:44:01 +02:00
rust-toolchain.toml chore: migrate hero_lifecycle to hero_lib, drop hero_rpc_server, add dev profile 2026-06-01 09:32:32 +02:00

HeroOsis

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

Quick Start

Use the nushell service command (recommended):

service osis start --update --reset # install, update, and start
service osis start # start existing install
service osis stop # stop the service
service osis status # check status

Or build manually:

make install # Build and install to ~/hero/bin
make run # Start server + UI via hero_proc
make dev # Run server with debug logging (no hero_proc)
make help # Show all available commands

Architecture

crates/
 hero_osis/ — Core types and domain handlers (library)
 hero_osis_server/ — JSON-RPC server over Unix sockets (binary)
 hero_osis_sdk/ — SDK client library (library)
 hero_osis_ui/ — Admin panel + /rpc proxy (binary)
 hero_osis_examples/ — Example programs and integration tests

Sockets

All services bind exclusively to Unix domain sockets:

Service Socket
Server ~/hero/var/sockets/{context}/hero_osis_server.sock
UI ~/hero/var/sockets/hero_osis_ui.sock

No service opens a TCP port. Access via hero_proxy for HTTP.

How It Works

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

schemas/{domain}/*.oschema → build.rs → Generated Code
 ↓
 ┌────────────────────┼────────────────────┐
 ↓ ↓ ↓
 crates/hero_osis/ crates/hero_osis_sdk/ 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

# 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
  • JSON-RPC methods for the domain
  • 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
base Base types and utilities
ledger Ledger, KVS, DNS, groups
media Photos, songs, media management
ai AI agents, bots, chat services
flow Workflow DAGs for agent intelligence
job Distributed job execution

Environment Variables

Variable Default Description
HERO_OSIS_DATA_DIR ~/hero/var/hero_osis/data Data directory
HERO_CONTEXTS root Contexts to register (comma-separated)

Seeding Data

Seeding now flows through the typed SDK seeder (seed::{blank, random, from_dir}) emitted into hero_osis_sdk by hero_rpc#117. The standalone hero_osis_seed binary and the server's --seed-dir startup hook have been removed — see hero_rpc#117 for the replacement entry points.

Adding a New Domain

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

Resources

License

Apache-2.0