Skip to content

Contents

A complete listing of every page in the Protean documentation. Use your browser's search (Ctrl+F / Cmd+F) to find any topic.


Getting Started

  • Installation -- Set up Python and install Protean.
  • Quickstart -- Build a domain in 5 minutes with in-memory adapters.

Tutorial: Building Bookshelf

A guided, end-to-end walkthrough of building a complete online bookstore.

Part I -- Getting Started

Part II -- The Domain Model

Part III -- Commands and Events

Part IV -- Services and Read Models

Part V -- Infrastructure

Part VI -- Quality

  • 15. Testing -- Testing strategies for every layer of the application.

Guides

Comprehensive reference organized by topic. Each guide goes deep on a specific area.

  • Guide Overview -- How the guides are organized and where to start.
  • How Do I...? -- Task-oriented index: find the right guide by what you're trying to do.

Choose a Path

Compose a Domain

Define Concepts

Fields

Add Behavior

  • Domain Behavior -- Enforcing business rules through validations, invariants, and methods.
  • Validations -- Field-level validation using types, options, and custom validators.
  • Invariants -- Business rules that must always hold true within an aggregate.
  • Mutating Aggregates -- Modify state through named methods reflecting actions and events.
  • Raising Events -- Notify other parts of the system through domain events.
  • Domain Services -- Complex domain logic that spans multiple aggregates.

Application Layer

Reactive Layer

Essentials

  • Object Model -- Common structure and traits shared by all domain elements.
  • Identity -- Identity generation strategies, types, and configuration.
  • Stream Categories -- How messages are organized and routed.
  • Configuration -- Configure Protean through domain.toml and environment variables.
  • Unit of Work -- Automatic transaction management for aggregate changes.

Server

CLI

Testing


Core Concepts

Architectural theory and the building blocks of domain-driven systems.

Architecture Patterns

Building Blocks

  • Domain Elements Overview -- Tactical patterns organized into four layers.
  • Aggregates -- Clusters of objects treated as a single unit for data changes.
  • Entities -- Mutable objects with distinct identity.
  • Value Objects -- Immutable elements distinguished by properties.
  • Domain Services -- Domain logic that doesn't fit within aggregates.
  • Events -- Immutable facts indicating state changes.
  • Commands -- Intentions to change system state.
  • Command Handlers -- Process commands and execute domain logic.
  • Event Handlers -- React to events with side effects and state synchronization.
  • Application Services -- Coordinate use cases at the boundary between external world and domain.
  • Repositories -- Collection-oriented persistence abstraction for aggregates.
  • Subscribers -- Consume messages from external brokers.
  • Projections -- Read-optimized denormalized views.
  • Projectors -- Specialized event handlers that maintain projections.

Adapters

Plug-in infrastructure that keeps your domain code free of technology dependencies.

Database

Brokers

Caches

Event Stores


Patterns & Recipes

In-depth guides for recurring patterns in domain-driven applications. These span multiple domain elements and represent good practices that Protean supports but does not enforce.

Aggregate Design

Event-Driven Patterns

Architecture & Quality

Identity & Communication


Reference


Community