Getting Started

Build your first pipeline.

Ranvier models workflows as typed pipelines. Each step is a Transition and they chain together into an Axon. Follow this guide to go from zero to a working pipeline in under 30 minutes.

1. Your First Axon

Create a project, write a Transition, chain it into an Axon, and execute it. Takes about 5 minutes.

let axon = Axon::simple::<String>("greeting")
    .then(BuildGreeting);

let mut bus = Bus::new();
let result = axon.execute("World".into(), &(), &mut bus).await;

2. Chain Transitions

Compose steps with .then(). The compiler checks the typed Next handoff between steps at build time.

let axon = Axon::simple::<String>("pipeline")
    .then(ValidateInput)
    .then(ProcessData)
    .then(FormatOutput);

3. Test Transitions

Transitions are plain async functions. Test them directly or test the full Axon pipeline with execute().

#[tokio::test]
async fn test_pipeline() {
    let result = axon.execute(input, &(), &mut bus).await;
    assert!(result.is_next());
}

4. Custom Errors

Use thiserror + serde for structured domain errors. Match on specific error variants for precise handling.

#[derive(Error, Serialize, Deserialize)]
enum AppError {
    #[error("not found: {0}")]
    NotFound(String),
    #[error("validation: {0}")]
    Validation(String),
}

5. Use the Bus

Pass request-scoped context through a per-execution, type-indexed Bus. Presence and access policy are runtime checks.

bus.insert(TenantId::new("tenant-a"));
// Inside transition:
let tenant = bus.read::<TenantId>();

6. Resilience

Built-in retry with exponential backoff, dead-letter queue (DLQ), and persistence for checkpoint/resume workflows.

axon.with_dlq_policy(DlqPolicy::RetryThenDlq {
    max_attempts: 3,
    backoff_ms: 100,
});
Typed boundary: Next/Fault retain Rust types. Branch/Jump/Emit payloads are schema-validated JSON, and Bus presence and authorization are runtime boundaries.

Learning Paths

Quick Start

Build your first Axon workflow in under 30 minutes.

hello-worldtyped-state-treebasic-schematicoutcome-variantstesting-patterns

HTTP Services

Build production HTTP APIs with routing, auth, and real-time features.

typed-json-apireference-todo-apiadmin-crudreference-chat-server

Advanced Patterns

Master resilience, persistence, and enterprise patterns.

order-processingbus-capabilitypersistenceretry-dlqreference-ecommerce-order

Governance and Full Stack

Apply explicit request governance and connect a maintained full-stack reference.

request-governance-demoreference-fullstack-admin
Full guide with runnable code: Getting Started Guide