Leanpub Header

Skip to main content

From Blueprint to Core

This book is 100% completeLast updated on 2026-07-04

A .NET architecture book that proves what it teaches: build NEXUS-1's Domain and Application layers with Clean Architecture, DDD, and CQRS — zero database, zero web server, fifty green tests. Every rule watched failing on purpose, every layer diagrammed in UML. Nineteen chapters, nineteen Deep Dives, one honestly bounded software core.

Minimum price

$100

$160

You pay

Author earns

$

Also available for 4 book credits with a Reader Membership

PDF
About

About

About the Book

Most architecture books show you a diagram and ask you to trust it. From Blueprint to Core shows you the diagram, then makes you prove it — with a compiler, a test runner, and nothing else.

This is the first volume of a three-part trilogy that builds the backend of NEXUS-1, a fictional Phase-0 nuclear-plant digital twin, from an empty folder to a fully tested Domain and Application layer — without a database, without a web server, and without a single line of infrastructure code. By the last page, fifty tests are green, every business rule has been watched failing on purpose at least once, and the core of a seventeen-context platform runs in about six hundred milliseconds on nothing but the .NET SDK.

That absence is not a shortcut. It's the argument. Clean Architecture's central claim is that the heart of a system — its rules, its language, its invariants — should be provable independently of the database, the framework, and the wire format around it. Most books that teach this claim show you a toy example and ask you to believe it scales. This one builds the real thing: five projects, seventeen bounded contexts (five fully populated, twelve honestly reserved), and a domain model translated line-by-line from an existing DDD specification into idiomatic, modern C# — records, primary constructors, collection expressions, and all.

What Makes This Book Different

It practices what it teaches. Every architectural decision is made once, in the open, and then held to for the rest of the book — the SharedKernel is frozen at five citizens in Chapter 4 and never grows again; the after-commit event-dispatch decision made in Chapter 9 becomes contract language in Chapter 12 and stays load-bearing through Chapter 19. When an earlier chapter's own code needs correcting, the correction happens on the page, in a diff, not silently.

It shows its refusals, not just its successes. Every invariant in this book is proven by a test that commits the exact crime the rule forbids and watches it fail by name. An inventory audit in Chapter 18 finds ten refusals the book itself forgot to test — and pays every one of them back, in the open, in an appendix.

It draws what it explains. Nineteen chapters are followed by nineteen two-page Deep Dive companions — plain-language explanations and original UML diagrams (use-case, class, sequence, and state-machine figures) for readers newer to software architecture, adding floors under the material without ever watering down the technical standard above them. A recurring "Where We Are in the Solution" panel tracks the growing codebase and test count from an empty tree to fifty green tests, so you always know exactly how much of the system exists at any page.

It knows exactly what it hasn't built yet. The book ends with an Epilogue titled The Honest Boundary of Volume I — an itemized account of everything deliberately absent (persistence, HTTP, authentication, logging) and which volume owns each one. The forward ledger is not a marketing footnote; it's the map the rest of the trilogy is built against.

What's Inside

  • Part I — The Architectural Foundation. Solution structure, the Dependency Rule, the SharedKernel, and dependency injection — five projects, seventeen context folders, zero circular references, enforced by the compiler rather than a linter.
  • Part II — The Domain Layer. Entities, value objects, aggregates, domain events, and domain services — culminating in three full bounded-context walkthroughs (alarm management, root-cause analysis, and reinforcement learning) proving the patterns hold at scale, not just in isolation.
  • Part III — The Application Layer. Ports before adapters, CQRS as two disciplined code paths, commands and handlers that orchestrate without ever deciding a business rule themselves, and a closing case study — one operational night traced end to end through every layer the book built.
  • Part IV — Proving the Core. The testing discipline made systematic: an invariant inventory that audits itself, test-data builders that only ever open legal doors, and the honest-fakery doctrine that keeps fifty tests fast without ever lying about what they've proven.
  • Seven appendices — an installation guide, the full solution skeleton with every elided listing and exercise solution restored, the tools-and-packages ledger, the bounded-context-to-schema map, sources, a glossary, and an index.

Who This Book Is For

Developers who know some C# and have heard of Clean Architecture or Domain-Driven Design but have never seen either one built all the way through, without hand-waving, on a project large enough to feel real. Architects who want a worked example they can hold their own team's decisions against. And anyone who has ever finished an architecture book feeling like they understood the diagram but couldn't have written the code — this book is the missing middle step.

No prior NEXUS-1 reading is required. The companion volumes referenced throughout — covering the plant physics, the root-cause engine, the reinforcement-learning model, and the underlying schema atlas — are companions, not prerequisites: everything you need to follow this book's code is inside it.

About the NEXUS-1 Companion Series

From Blueprint to Core is the ninth volume in the NEXUS-1 Companion Series, a set of books that teach software architecture, data design, and applied AI through one consistent fictional demonstrator: a Phase-0 digital twin of a nuclear power plant. Every volume shares the same standing boundary — NEXUS-1 is a teaching platform, never operational guidance, and nothing in the series claims authority over a real facility. This volume opens the backend trilogy; From Core to Contract (persistence and the API) and From Contract to Container (testing, logging, and deployment) complete it.

Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης ΓρηγόριοςΑγαθαγγελιδης ΓρηγοριοςGrigorios Agathangelidis.

Author

About the Author

Grigorios Agathangelidis

Grigorios Agathangelidis is not a nuclear physicist, a nuclear engineer, or a power-plant specialist of any kind. His background is in Electrical Engineering and Software Engineering, and NEXUS-1 began as a personal project built on that background: an attempt to immerse himself in the nuclear-energy domain, study it as thoroughly as a software engineer reasonably can, and then combine what he learned with years of enterprise-software experience. The goal was never to speak as a nuclear-industry authority — it was to explore a genuinely fascinating domain and apply his own skills in software architecture, simulation, visualization, user interfaces, and systems design against a subject substantial enough to make those skills count.

That same discipline is why the series doesn't stop at shipping. A dedicated retrospective volume, From Certainty to Calibration, goes back through the published books and audits their own earlier decisions against evidence that didn't exist when those decisions were made — not as an apology, but as the same audit discipline the series applies to reactor telemetry and alarm floods, turned on itself. From Blueprint to Core's own three-way split into a backend trilogy is a direct application of that lesson: when a book runs the risk of overreaching, the calibrated response is to divide it, state the boundary of each part in the open, and let the next volume inherit an honest ledger rather than a vague promise.

Grigorios writes the NEXUS-1 Companion Series from Edessa, Greece, building each volume as a fully worked, independently verifiable software project rather than a collection of snippets — code that compiles, tests that run, and diagrams drawn from the artifacts themselves rather than from memory.

Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης ΓρηγόριοςΑγαθαγγελιδης ΓρηγοριοςGrigorios Agathangelidis.

Contents

Table of Contents

  • Front Matter
    • Standing Boundary and Copyright Note
    • Preface
    • How to Read This Book (and the Trilogy Map)
  • Part I — The Architectural Foundation
    • 1 · From Eight Books to One Solution
      • Deep Dive 1 · The Vocabulary Under the Story
    • 2 · The Philosophy of Clean/Onion Architecture
      • Deep Dive 2 · Dependencies, Literally
    • 3 · Structuring the Nexus Solution
      • Deep Dive 3 · Five csproj Files, Read Slowly
    • 4 · The SharedKernel
      • Deep Dive 4 · Generics, Records, and Two Kinds of No
    • 5 · Dependency Injection and Composition
      • Deep Dive 5 · What a Container Actually Does
  • Part II — The Domain Layer: The Heart of the System
    • 6 · Entities — Objects with Identity
      • Deep Dive 6 · Reading an Entity Like a Mechanic
    • 7 · Value Objects — Meaning Without Identity
      • Deep Dive 7 · Immutability, Null, and Unrepresentable States
    • 8 · Aggregates and Consistency Boundaries
      • Deep Dive 8 · Diamonds, Doors, and the Boundary Drawn
    • 9 · Domain Events
      • Deep Dive 9 · Publish/Subscribe, and the Direction of Knowledge
    • 10 · Domain Services
      • Deep Dive 10 · Pure Functions With a Business Card
    • 11 · Context Walkthroughs (AlarmManagement, RootCause, ReinforcementLearning)
      • Deep Dive 11 · The Machines, Completed
  • Part III — The Application Layer: The Orchestrator
    • 12 · Ports Before Adapters
      • Deep Dive 12 · Interfaces, Sockets, and Signatures of the Future
    • 13 · Introduction to CQRS
      • Deep Dive 13 · One Bus, Two Lanes, Nested Rings
    • 14 · Commands and Handlers
      • Deep Dive 14 · The Rhythm, Frame by Frame
    • 15 · Queries, DTOs, and Read Models
      • Deep Dive 15 · Shapes for Jobs
    • 16 · Validation and Pipeline Behaviors
      • Deep Dive 16 · Cross-Cutting, Open Generics, and One Look in the Mirror
    • 17 · Orchestration Case Study
      • Deep Dive 17 · The Night, on One Page
  • Part IV — Proving the Core
    • 18 · Unit Testing the Domain
      • Deep Dive 18 · Anatomy of a Test, Anatomy of an Audit
    • 19 · Testing Application Handlers
      • Deep Dive 19 · Doubles, Substitutes, and the Scar Made Visible
  • Back Matter
    • Epilogue: The Honest Boundary of Volume I
    • Appendix A · Installation Guide
    • Appendix B · The Full Volume-I Solution Skeleton
    • Appendix C · Tools and Packages
    • Appendix D · Bounded Context, Namespace, Schema Map
    • Appendix E · Sources and Reference Notes
    • Appendix F · Glossary
    • Appendix G · Index

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub