Skip to content

Architecture Overview

Guts is built on proven distributed systems primitives to provide a decentralized, censorship-resistant code collaboration platform.

Vision

"Code collaboration infrastructure that can't be taken down, censored, or controlled by any single entity."

Core Principles

PrincipleDescription
DecentralizationNo single point of failure or control
Censorship ResistanceContent cannot be arbitrarily removed
Cryptographic IdentityVerifiable authorship via Ed25519
Byzantine Fault ToleranceNetwork continues despite malicious actors
Git CompatibilityWorks with standard Git clients

System Architecture

┌─────────────────────────────────────────────────────────────────┐
│                         Guts Network                            │
├─────────────────────────────────────────────────────────────────┤
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐              │
│  │   Node A    │  │   Node B    │  │   Node C    │    ...       │
│  └──────┬──────┘  └──────┬──────┘  └──────┬──────┘              │
│         │                │                │                      │
│         └────────────────┼────────────────┘                      │
│                          │                                       │
│              ┌───────────┴───────────┐                          │
│              │    P2P Mesh Network   │                          │
│              │   (commonware::p2p)   │                          │
│              └───────────────────────┘                          │
└─────────────────────────────────────────────────────────────────┘

Node Architecture

Each Guts node contains multiple layers:

┌─────────────────────────────────────────────────────────────────┐
│                         Guts Node                               │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │                      API Layer                            │  │
│  │  ┌──────────┐  ┌──────────┐  ┌──────────────────────┐   │  │
│  │  │ Git HTTP │  │ REST API │  │     WebSocket        │   │  │
│  │  └──────────┘  └──────────┘  └──────────────────────┘   │  │
│  └──────────────────────────────────────────────────────────┘  │
│                              │                                  │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │                   Application Layer                       │  │
│  │  ┌────────────┐  ┌────────────┐  ┌────────────────────┐  │  │
│  │  │Collaboration│  │    Auth    │  │      CI/CD         │  │  │
│  │  │ (PRs/Issues)│  │(Orgs/Teams)│  │   (Workflows)      │  │  │
│  │  └────────────┘  └────────────┘  └────────────────────┘  │  │
│  └──────────────────────────────────────────────────────────┘  │
│                              │                                  │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │                    Core Layer                             │  │
│  │  ┌────────────────────┐  ┌────────────────────────────┐  │  │
│  │  │    Git Storage     │  │   Consensus Engine         │  │  │
│  │  │  (Content-Addressed)│  │   (Simplex BFT)           │  │  │
│  │  └────────────────────┘  └────────────────────────────┘  │  │
│  └──────────────────────────────────────────────────────────┘  │
│                              │                                  │
│  ┌──────────────────────────────────────────────────────────┐  │
│  │                   Network Layer                           │  │
│  │  ┌────────────────────────────────────────────────────┐  │  │
│  │  │              P2P Network (commonware)               │  │  │
│  │  │  • Ed25519 authentication • Noise encryption       │  │  │
│  │  │  • QUIC + TCP transport   • Peer discovery         │  │  │
│  │  └────────────────────────────────────────────────────┘  │  │
│  └──────────────────────────────────────────────────────────┘  │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Technology Stack

LayerTechnologyPurpose
LanguageRustMemory safety, performance
Async RuntimeTokioAsync I/O, task scheduling
Web FrameworkAxum + TowerHTTP API, middleware
Consensuscommonware::consensusBFT consensus
Networkingcommonware::p2pEncrypted P2P
CryptographyEd25519Digital signatures
StorageRocksDBPersistent storage
Git ProtocolCustom implementationSmart HTTP, pack files

Crate Architecture

The codebase is organized into focused crates:

guts-types (foundation)

guts-storage + guts-git

guts-consensus + guts-p2p + guts-collaboration + guts-auth

guts-node + guts-web + guts-realtime + guts-ci

guts-cli
CratePurpose
guts-typesCore types and primitives
guts-storageContent-addressed Git storage
guts-gitGit protocol implementation
guts-p2pP2P networking and replication
guts-consensusSimplex BFT consensus engine
guts-collaborationPRs, Issues, Reviews
guts-authOrganizations, Teams, Permissions
guts-nodeFull node binary
guts-cliCLI client

Key Concepts

Simplex BFT Consensus

Guts uses Simplex BFT for total ordering of state changes:

  • Byzantine tolerance: f < n/3 malicious validators
  • Finality: 3 network hops to finalization
  • Block time: Configurable (default 2 seconds)

Content-Addressed Storage

Git objects are stored using SHA-based addressing:

  • Automatic deduplication
  • Integrity verification
  • Efficient P2P replication

Cryptographic Identity

Every user has an Ed25519 keypair:

  • Public key = unique identifier
  • All operations are signed
  • Verifiable authorship

Documentation

DocumentDescription
Product RequirementsFull product specification
RoadmapDevelopment roadmap
ADRsArchitecture Decision Records

Released under the MIT License.