8000 GitHub - err0r500/fairway: Vertical-slicing made right · GitHub
[go: up one dir, main page]

Skip to content

err0r500/fairway

Repository files navigation

What is Fairway?

Fairway is a Go framework for building backends from small, self-contained modules that communicate exclusively through a shared event log. Built on Dynamic Consistency Boundaries and FoundationDB.


The Problem

Vertical slicing promises independence but often delivers hidden coupling: shared database tables, one-stream-per-aggregate, or shared domain types force coordination between features.

The Solution

  • Events as contracts — modules share only event schemas, never code or storage
  • Dynamic consistency boundaries — optimistic locking scoped to what a command actually reads, not entire aggregates

Architecture

User action          Event log        Projection
    │                    │                │
    ▼                    ▼                ▼
┌──────────┐    ┌──────────────┐    ┌──────────┐
│ Command  │───▶│    Events    │───▶│   View   │
└──────────┘    └──────┬───────┘    └──────────┘
                       │
               ┌───────▼──────┐
               │  Automation  │  (View → Command, no user)
               └──────────────┘

Quick Start

Prerequisites: Go 1.24+, FoundationDB installed and running.

git clone https://github.com/err0r500/fairway
cd fairway/examples/todolist
go generate ./...
go run .
curl -X POST http://localhost:8080/api/lists/my-list \
     -H "Content-Type: application/json" \
     -d '{"name": "Shopping"}'

curl http://localhost:8080/api/lists/my-list

📖 Documentation

Full docs, patterns, and examples: err0r500.github.io/fairway


Development

FoundationDB must be available to run tests:

export GOFLAGS="-tags=test"
go test ./...

About

Vertical-slicing made right

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

0