{
  "id": 7983377,
  "title": "[Event Sourcing] Building an Application Fast Using the Event Sourcing Pattern with Sekiban DCB and AI",
  "url": "https://urgent.news/2026/09/17/event-sourcing-building-an-application-fast-using-the-event-sourcing",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-17T08:15:43.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/kary_0009/event-sourcing-building-an-application-fast-using-the-event-sourcing-pattern-with-sekiban-dcb-and-1oa6"
  },
  "original_language": "en",
  "account": "In this article, we delve into building an event-sourced application using Sekiban DCB and AI. The Sekiban DCB Decider template offers pre-built samples that serve as guides for instructing AI in developing the application. We will construct a library management system that allows users to register, borrow, and return books. Using PostgreSQL as our database, we will also create a simple Blazor UI for interacting with the APIs.\n\nTo initiate the project, we run specific commands to create a project from the template. The generated project includes pre-existing samples for Student, ClassRoom, and Enrollment. These samples provide a reference for implementing new features using AI. For this project, I utilized the .NET 10 SDK and Docker containers. The UI was developed using Blazor.\n\nThe implementation process involved carefully studying the existing code for Student, ClassRoom, and Enrollment. We were instructed to follow the existing design and coding styles, adapting them to create new library management features. This approach proved beneficial for AI-assisted coding, as it allowed us to maintain consistency in the overall code structure.\n\nImplementing business rules using the Decider pattern is a key aspect of this template. Business rules reside within Deciders associated with events and states, with two main responsibilities: Validate and Evolve. In the borrowing logic, we implemented rules to ensure that a book can only be borrowed once at a time. If a book is already on loan, an attempt to borrow it again will be rejected. When the borrowing event is applied, the resulting state records the LoanId and UserId.\n\nTo maintain consistency across multiple entities, we utilize Dynamic Consistency Boundary (DCB). DCB uses tags to define which entities must remain consistent together for a particular operation. For our borrowing event, we include tags such as Loan, Book, and User. These tags help Sekiban DCB perform optimistic concurrency control, ensuring that only one user can borrow a specific book at a time based on the defined rules.",
  "summary": "1. Introduction In this article, we will build an event-sourced application using Sekiban DCB and AI. Along with implementing the UI and APIs, we will check whether the application maintains consistency when multiple operations happen at the same time. For this project, I used Codex × GPT-6 Astra . The Sekiban DCB Decider template includes sample implementations that we can use as references when…",
  "key_points": [
    "Sekiban DCB Decider template provides pre-built samples for AI-assisted application development",
    "Library management system built with PostgreSQL, Blazor UI, and .NET 10 SDK",
    "Borrowing logic enforces rules to prevent multiple simultaneous book loans"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}