← All Projects
EXPERT Full-Stack6-8hMilan

Event-Driven Payment Processor

Build a complete event-driven payment processing system: on-chain events trigger domain workflows, which update state, emit domain events, and project read models. Combines blockchain indexing with DDD and event-driven architecture. This is the closest project to Gnosis Pay's actual backend architecture.

Tech Stack

GoPostgreSQLEvent sourcingCQRSgo-ethereumMessage queue (channels/NATS)

What You'll Learn

  • Event-driven architecture with domain events
  • Event sourcing for payment state reconstruction
  • CQRS with separate read/write stores
  • Saga pattern for distributed transaction coordination
  • Exactly-once processing with outbox pattern

Milestones (0/6)

M1Event store & sourced aggregates
M2On-chain event ingestion
M3Read model projections
M4Saga: payment authorization flow
M5Outbox pattern & exactly-once delivery
M6Integration tests & observability

Architecture Hints

Architecture
Gnosis Chain
┌──────────────┐    ┌─────────────┐    ┌──────────────┐
│  Chain       │───▶│  Command    │───▶│  Event       │
│  Listener    │    │  Handler    │    │  Store (PG)  │
└──────────────┘    └─────────────┘    └──────┬───────┘
                    ┌─────────────┐    ┌───────▼──────┐
                    │  Outbox     │◀───│  Outbox      │
                    │  Publisher  │    │  Table       │
                    └──────┬──────┘    └──────────────┘
              ┌────────────┼────────────┐
              ▼            ▼            ▼
        ┌──────────┐ ┌──────────┐ ┌──────────┐
        │Projection│ │  Saga    │ │  Notif   │
        │(read DB) │ │  Engine  │ │  Service │
        └──────────┘ └──────────┘ └──────────┘
        ┌──────────┐
        │ REST API │
        └──────────┘
This is the Gnosis Pay backend pattern: - On-chain events (card swipes) trigger domain workflows - Event sourcing provides complete audit trail (compliance) - CQRS separates read performance from write consistency - Sagas coordinate multi-step payment flows - Outbox pattern ensures no events are lost

Interview Talking Points