Event Modeling
as Code

A human-readable JSON format for designing event-driven systems. Version control your architecture. Generate code from your model.

Giraflow Timeline View

Get Started in Seconds

One command to install, one command to run

Terminal
$ npm install -g giraflow
$ cd your-project
$ giraflow
๐Ÿฆ’ Watching your-project.giraflow.json
๐ŸŒ Open http://localhost:3333

How it works

Giraflow watches your .giraflow.json file and serves a live web visualization. Every change is reflected instantly.

Keep your model in version control alongside your code. Review changes in pull requests. Generate documentation automatically.

  • Auto-detects .giraflow.json files in your project
  • Hot reload on every save
  • Works offline, no account needed
  • Export to SVG, PowerPoint, or HTML

Why Giraflow?

Event Modeling is powerful. But where do you store the model?

โŒ The Problem

  • Proprietary tools lock your designs into their platforms
  • Visual-only formats can't be version controlled meaningfully
  • Models live outside your codebase, getting stale
  • Manual sync between design and implementation

โœ… The Giraflow Solution

  • Plain JSON โ€“ own your models, no vendor lock-in
  • Git-friendly โ€“ meaningful diffs and history
  • Code-adjacent โ€“ model lives with implementation
  • Single source of truth โ€“ generate from model

Features

Everything you need to model event-driven systems

๐Ÿ“

Human-Readable JSON

Edit with any text editor. No proprietary formats. Easy to read, write, and review in pull requests.

๐Ÿ”„

Live Web Preview

Browser-based visualization with hot reload. See timeline, slices, and scenarios update as you type.

๐Ÿ’ป

CLI Tool

Terminal visualization for quick checks. Timeline, slice, and table views. Export to file.

๐Ÿงช

Specifications

Given-When-Then scenarios for commands and projections. Your model becomes executable documentation.

๐ŸŽจ

Wireframes

Link HTML mockups to actors. Visualize what each user role sees and interacts with.

๐Ÿ”—

Schema Validation

JSON Schema for IDE support. Autocomplete, validation, and documentation in your editor.

Simple & Expressive

Model your entire system in one readable file

order-system.giraflow.json
{
  "name": "Order System",
  "timeline": [
    { 
      "type": "event", 
      "name": "OrderPlaced", 
      "tick": 10
    },
    { 
      "type": "state", 
      "name": "PendingOrders", 
      "tick": 20,
      "sourcedFrom": ["OrderPlaced"]
    },
    { 
      "type": "actor", 
      "name": "Warehouse", 
      "tick": 30,
      "readsView": "PendingOrders",
      "sendsCommand": "ShipOrder"
    },
    { 
      "type": "command", 
      "name": "ShipOrder", 
      "tick": 40
    },
    { 
      "type": "event", 
      "name": "OrderShipped", 
      "tick": 50
    }
  ]
}

Timeline Elements

โ—
Event โ€“ Something that happened
Past tense: OrderPlaced, UserRegistered
โ—†
State View โ€“ Read model from events
Noun: PendingOrders, UserProfile
โ—‹
Actor โ€“ Who reads and acts
Role: Customer, Admin, System
โ–ถ
Command โ€“ Intent to do something
Imperative: PlaceOrder, ShipOrder

How It Works

From idea to implementation in four steps

1

Model

Define your timeline with events, states, actors, and commands in JSON

2

Visualize

Use the web preview or CLI to see your model as a swimlane diagram

3

Specify

Add scenarios with Given-When-Then to define behavior

4

Implement

Build your system guided by the model, generate tests from specs

Ready to model your system?

Start designing event-driven systems with a format you can actually version control.