v0.1.0 — Open Source

Commerce that
thinks for itself.

An AI-observable distributed commerce engine built on deterministic DAG workflows, a real-time event fabric, and a pluggable module runtime. Every operation is auditable, replayable, and AI-ready.

Guiding doctrine
"Nothing mutates state directly. Everything flows through workflows and events."

In Hyperrr, all state changes go through declarative workflow DAGs. There are no silent mutations, no fire-and-forget side effects, no state you can't trace back to a cause.

Every operation — a checkout, a refund, an inventory update — is a deterministic, replayable sequence. That makes your commerce engine observable to humans, auditable by compliance teams, and legible to AI agents without any extra instrumentation.

This isn't an add-on. It's the architectural primitive everything else is built on.

System Architecture

Three layers.
One runtime.

The engine, the fabric, and the observer. Each layer does one job precisely, and all three are available to every module you build.

Workflow Engine
Executes commerce operations as deterministic DAGs with parallel step resolution, saga compensation on failure, retry budgets, and human-escalation checkpoints.
pkg/workflow
🔌
Event Fabric
A typed pub/sub bus connects every module. Events are namespaced, immutable records with full trace IDs. Ships in-memory. Drop in NATS JetStream for production.
event-bus
🧠
Context Engine
Tracks every workflow step, input, output, and actor in a live lineage graph. Exposes full execution context to AI agents over SSE via Model Context Protocol.
pkg/ctxengine
🔒
Distributed Locker
Atomic distributed locks prevent double-processing on concurrent workflow runs. In-memory by default. NATS JetStream KV-backed for multi-node production.
pkg/locking
🌐
GraphQL Gateway
A unified GraphQL API stitched dynamically from every loaded module's schema. Add a module, its types and mutations are live at /query automatically. No manual wiring.
api/graph
🤖
MCP Agent Gateway
Automatically translates workflows marked ExposeToAI into tools for LLMs. AI agents discover and call them over SSE. API key auth keeps every invocation scoped and auditable.
api/mcp
Order checkout — live DAG execution trace
validate_cart
completed
──▶
reserve_inventory
completed
validate_customer
completed
──▶
process_payment
running
──▶
ship_order
pending
notify_customer
pending
add_loyalty_pts
pending
completed running pending waiting_human Saga compensation fires on any failure →
How it works

Build a module.
Get everything.

One interface. One registration. Your module gets a shared database, event bus, workflow engine, GraphQL gateway, and MCP agent exposure out of the box.

01 — Implement
Define your module
Implement the mdk.Module interface — ID, Models, Routes, Init, Shutdown. Register it in an init() function. That's the entire contract.
02 — Declare
Add to hyperrr.yml
Add your module's import path under modules: in hyperrr.yml. Run hyperrr build and the engine auto-discovers, code-generates, and wires it in.
03 — Connect
Register workflows & handlers
In your Init, register DAG workflows and step handlers on rt.Workflows(). Subscribe to events on rt.Bus(). The runtime handles execution, retries, and state.
04 — Expose
Available to AI automatically
Set ExposeToAI: true on any workflow and it becomes an MCP tool. AI agents discover and call it over SSE. The lineage engine records every invocation automatically.
Module ecosystem

Commerce, batteries included.

Commerce modules ship out of the box. Each is independently versioned, testable, and replaceable.

commerce.product commerce.order commerce.cart commerce.customer commerce.payments auth.emailpass auth.apikey commerce.taxonomy notification
Go mymodule/module.go
package mymodule

import "github.com/GoHyperrr/mdk"

// Register once in init()
func init() {
  mdk.Register(func() mdk.Module {
    return &Module{}
  })
}

func (m *Module) Init(
  ctx context.Context,
  rt  mdk.Runtime,
) error {
  rt.Workflows().Register(mdk.Workflow{
    ID:         "mymodule.process.v1",
    ExposeToAI: true,
    Steps:      []mdk.Step{...},
  })
  return nil
}
Infrastructure

Zero dependencies
to start. Scale when
you need to.

Every external dependency is a pluggable module. Develop locally on SQLite and in-memory. Ship to production on Postgres and NATS. Same code, swap config.

Database
SQLite (default) → PostgreSQL via GORM
Pluggable
Event Bus
In-memory (default) → NATS JetStream
Pluggable
Distributed Lock
In-memory (default) → NATS KV Bucket
Pluggable
File Storage
Local disk → S3 / GCS / Azure via gocloud
Pluggable
Workflow Engine
DAG execution, sagas, checkpointing
Core
MCP / AI Gateway
Model Context Protocol over SSE
AI-Native
8
Active commerce modules included — product, order, cart, customer, payments, taxonomy, and more.
Workflows execute in parallel DAGs with automatic compensation on failure. No manual rollback code.
1
Binary controls the entire engine — build, serve, configure, diagnose. One CLI to rule them all.
0
External dependencies required to run locally. SQLite + in-memory bus. Clone, build, run.
Open source · MIT license

Start building
in minutes.