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...

Fifteen volumes, one engineering journey—from nuclear systems and digital twins to DDD, .NET, microservices, and formal proof.
Bought separately
$1799.84
Minimum price
$399
$599
About the Bundle
The NEXUS-1 Engineering Library is a fifteen-volume journey through one coherent engineering problem:
How can a complex system be understood, modelled, implemented, distributed, examined, and ultimately defended without losing meaning, accountability, or technical honesty?
This is not a collection of unrelated technical books.
It is a sequence.
Each volume begins where an earlier volume reached its honest boundary. A physical system becomes a digital twin. The twin produces signals and alarms. Alarms become causal evidence. Evidence supports decisions. Decisions require data, language, rules, contracts, implementations, runtime boundaries, and finally explicit properties that can be examined under time, concurrency, failure, and distribution.
The journey begins with From Grid to Core, where the reader approaches a nuclear-power-plant-inspired demonstrator from familiar engineering ground and walks upstream from the electrical grid toward the reactor core.
It ends with From Flow to Proof, where the architectural promises accumulated throughout the series are expressed as state machines, contracts, safety and liveness properties, temporal models, concurrency models, ownership relations, refinement obligations, counterexamples, and evidence.
Between those two points lies the complete NEXUS-1 journey.
Not from one framework to another.
Not from one fashionable pattern to the next.
But from physical reality to software meaning, from meaning to implementation, from implementation to distribution, and from distribution to disciplined architectural confidence.
At the centre of the bundle is NEXUS-1, a browser-based Phase-0 industrial digital-twin demonstrator inspired by the structure and operational complexity of a nuclear power plant.
The demonstrator gives the series one continuous technical world.
The reader does not encounter a new shopping cart, order form, or miniature example in every volume. The same plant, units, signals, alarms, incidents, causal relationships, policies, schemas, bounded contexts, services, events, audits, and failure paths return throughout the series.
A signal introduced while explaining the plant can later become:
This continuity is what makes the bundle more than the sum of its books.
The reader can watch the same system acquire new layers of meaning without losing the layers that came before.
NEXUS-1 is explicitly an educational demonstrator. It is not connected to any real facility, sensor, reactor, or control system. It is not safety-class software, certified operational guidance, or a substitute for nuclear-engineering practice.
Its purpose is architectural and educational: to provide a sufficiently rich system through which serious engineering questions can be explored without pretending that a demonstration platform possesses real-world operational authority.
The journey begins with the physical system.
The reader starts at the electrical switchyard—familiar territory for many electrical, control, and software engineers—and moves upstream through the generator, turbines, steam system, primary circuit, reactor vessel, neutron population, feedback mechanisms, xenon behaviour, protection systems, and digital-twin simulation.
This volume establishes the physical language that gives every later software decision its meaning.
Before modelling the system, the reader must first understand what the system is.
Once the system can be observed, it can also fail.
This volume examines alarm floods and the difference between the loudest symptom and the actual origin of a disturbance. It develops a deterministic, grounded, and auditable root-cause method in which an engineered causal engine decides and a language model explains.
The distinction is deliberate:
The engine decides. The model explains.
The volume introduces causal graphs, telemetry corroboration, grounding, abstention, evidence chains, anti-hallucination controls, and the discipline required when analytical software must explain its conclusions without inventing them.
A system that can be observed and diagnosed can also be used as a training environment.
This volume introduces reinforcement learning through a small, readable, tabular Q-learning agent. The policy is not hidden inside a neural network. It remains a table that an engineer can inspect, query, print, persist, challenge, and understand.
The agent learns inside a simplified digital twin and remains advisory-only.
Its purpose is not to demonstrate artificial authority. It is to demonstrate interpretable learning:
The agent learns. The engineer understands.
The series then pauses and looks beneath the deterministic reactor-kinetics model.
This theoretical companion connects classical birth-death processes, continuous-time Markov chains, neutron-population dynamics, delayed neutrons, master equations, extinction, criticality, and deterministic point kinetics.
It shows how a stochastic population model can be understood alongside the compact deterministic equations used by the real-time demonstrator.
The objective is not to claim that a reactor is literally a queue. It is to use one mathematically disciplined model as a bridge toward another—and to state clearly where that bridge ends.
With the physical and analytical world established, the series turns toward software meaning.
This volume introduces Domain-Driven Design from zero and applies it to NEXUS-1. It develops the domain language, entities, value objects, aggregates, repositories, domain services, application services, domain events, bounded contexts, context maps, and consistency boundaries of the platform.
The central question is no longer only what data exists.
It is:
Who owns its meaning, who owns its rules, and where is change allowed?
NEXUS-1 becomes a domain model rather than merely a collection of screens and tables.
The domain model now needs a durable data backbone.
This volume designs the database behind the digital twin and builds the same conceptual system through two paths: Database First and Code First.
SQL Server, Entity Framework Core, schemas, normalization, keys, constraints, indexes, lookup discipline, temporal history, concurrency, performance, identity, migrations, and the relationship between physical assets and their digital representations are examined through one complete platform.
The database is treated not as storage beneath the architecture, but as one of the places where architectural truth must remain visible.
The design journey becomes a reference atlas.
This volume writes down the complete multi-sector SQL Server backbone of NEXUS-1. The platform is divided into seventeen explicitly named sectors, with stable keys, typed lookup tables, foreign-key passports, indexes, audit structures, history, ownership, and dependency maps.
The schema becomes a navigable technical artifact rather than an invisible implementation detail.
One database becomes a system only when its boundaries are named, its keys are stable, and its history can be replayed.
The SQL truth is then mapped into C# and Entity Framework Core.
This volume applies the discipline:
One entity. One configuration. One schema folder. One clean DbContext.
It develops enterprise EF Core configuration classes, explicit table and constraint names, relationships, precision, defaults, indexes, concurrency, migrations, configuration discovery, and context organization across the full NEXUS-1 schema.
The objective is not simply to make EF Core work.
It is to make persistence decisions reviewable, searchable, repeatable, and architecturally visible.
Before implementation continues, the series turns its own analytical discipline inward.
This retrospective volume reopens earlier architectural decisions and asks whether they still hold under evidence that became available later.
It is neither an apology nor a defence.
It is an audit.
Earlier decisions are examined through the sequence:
This volume establishes one of the deepest principles of the wider project:
Engineering confidence should be calibrated, not performed.
The next three books form one continuous implementation arc and should be read together.
They move from the innermost software rules toward persistence, public contracts, runtime evidence, observability, and deployment.
The first volume of the backend trilogy builds the Domain and Application layers of NEXUS-1 in .NET.
Clean and Onion Architecture, the Dependency Rule, the Shared Kernel, entities, value objects, aggregates, domain events, domain services, CQRS, commands, queries, handlers, validation, ports, and unit testing are developed without requiring a database or web server.
The absence of infrastructure is not a limitation.
It is the proof that the core can stand independently.
Every important invariant is demonstrated both while holding and while being deliberately violated and watched to fail.
The second volume gives the tested core persistence and a public API without allowing either to redefine its rules.
The Infrastructure and API layers arrive: EF Core, repositories, Unit of Work, optimistic concurrency, migrations, the write half of the outbox, controllers, DTO translation, RFC 7807 problem details, idempotency, versioning, authentication, JWT validation, authorization, and an explicit HTTP contract.
The central discipline is the seam.
The database and the wire serve the core. They do not become the core.
The final volume of the backend trilogy proves, observes, and ships the system.
Integration testing, disposable SQL Server environments, in-process API testing, concurrency cases, the outbox dispatcher, retries, at-least-once delivery, idempotent effects, structured logging, correlation IDs, health checks, environment configuration, secrets, Docker, continuous integration, runtime probes, and deployment evidence complete the implementation arc.
There is no later trilogy volume to inherit unfinished obligations.
What remains outside the implementation is named as a later phase or as an explicit boundary—not hidden behind a vague promise.
A bounded context is not the end of architecture.
A serious system moves between contexts.
This advanced DDD volume examines what crosses those boundaries and what must remain protected when it does: domain events, integration events, published language, anti-corruption layers, outbox and inbox patterns, process managers, sagas, compensation, retries, eventual consistency, projections, delayed truth, audit flow, and context relationships.
It is deliberately positioned before microservices.
Before a system is split into independently deployed services, it must first understand its language, ownership, contracts, events, workflows, failure modes, and consistency boundaries.
The modular architecture is now tested against distribution.
This volume does not present microservices as a maturity badge or an automatic destination. It asks whether selected NEXUS-1 boundaries are strong enough to survive as independent runtimes.
Service candidates, business capabilities, data ownership, database-per-service, public APIs, synchronous and asynchronous communication, message brokers, delivery guarantees, outbox and inbox patterns, ordering, duplicates, sagas, distributed workflows, observability, resilience, security, identity propagation, deployment, migration, coexistence, rollback, release gates, and operational responsibility are examined through one continuous system.
The governing rule is conservative:
Do not split a system because microservices are modern. Split only when the boundary is already true.
The final volume asks what the entire architecture has actually promised.
A diagram can show components and arrows. It cannot, by itself, establish that:
From Flow to Proof develops a proof-oriented architectural method using state machines, preconditions and postconditions, temporal logic, TLA+, Petri nets, relational modelling, Alloy, meaning-preserving mappings, safety, liveness, fairness, reachability, counterexamples, refinement, and explicit evidence boundaries.
These methods are not treated as disconnected academic subjects.
They are coordinated around one engineering concern:
What exactly has the system promised, and what evidence justifies believing that the promise survives time, failure, translation, concurrency, and distribution?
The volume does not claim that a checked model proves production software, infrastructure, people, networks, or physical reality.
Formal evidence strengthens engineering judgement.
It does not replace engineering responsibility.
That honest distinction is where the NEXUS-1 journey ends.
Most technical libraries separate their subjects.
One book teaches databases. Another teaches DDD. Another teaches EF Core. Another teaches microservices. Another introduces formal methods through unrelated mathematical examples.
The NEXUS-1 Engineering Library takes a different approach.
It keeps one system alive across all fifteen volumes.
The same technical world is examined through:
The result is not a framework catalogue and not a sequence of CRUD tutorials.
It is a sustained engineering argument.
It asks the reader to follow not only what was built, but why each layer exists, what assumptions it depends on, what it protects, what it makes harder, and where its authority ends.
The books are supported by the NEXUS-1 Phase-0 browser demonstrator and by a public project repository containing practical companion material.
Depending on the volume, the artifacts include:
The repository is not a substitute for the books.
The books explain the pressure, decision, assumption, trade-off, and honest boundary.
The artifacts allow the reader to inspect, execute, modify, challenge, and extend the corresponding technical material.
Together, the books and artifacts also create a foundation for later domain-specific automation and AI-assisted engineering workflows. Such assistance must remain grounded, governed, auditable, and subordinate to deterministic checks and human responsibility.
The goal is not artificial authority.
It is artificial assistance with an honest boundary.
This bundle is written for readers who want to understand complex systems as connected engineering structures rather than as collections of tools.
It is especially relevant for:
Some volumes begin from first principles. Others are deliberately demanding.
The complete journey requires patience because the system is not simplified into a toy merely to make every chapter easy.
The objective is not speed.
It is depth, continuity, engineering judgement, and intellectual honesty.
One sentence runs through the entire NEXUS-1 series:
Nothing claims to exist that does not.
A demonstrator is named as a demonstrator.
A model is named as a model.
An approximation is named as an approximation.
An advisory recommendation is never presented as a command.
A language model explains but does not silently become the decision engine.
A checked formal model is never confused with proof of production software or physical reality.
A deferred implementation is named as deferred.
A remaining uncertainty is left visible.
This is not modesty added after the architecture.
It is part of the architecture.
This bundle is lovingly dedicated to my wife, Vladimirka, whose encouragement gave me the confidence to put all of this “on paper” — to transform years of engineering thought, study, experimentation, doubt, persistence, and imagination into a body of work that could be shared.
She encouraged me not only to continue building NEXUS-1, but also to preserve the reasoning behind it: the questions, the decisions, the mistakes, the lessons, and the long journey from an idea carried privately in the mind to a complete engineering library.
Without her encouragement, much of this work might have remained only thought.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
About the Books
Have you ever wondered what happens when a skilled software, electrical, or control systems engineer opens a nuclear plant simulator for the first time? You instantly recognize the generators, turbines, and grid connection. But then you hit a screen labeled Reactor Kinetics, a value called pcm, or a button marked SCRAM, and find yourself in uncharted territory.
From Grid to Core is written specifically to bridge that gap.
Unlike traditional nuclear textbooks that begin with dense atomic physics and hand down axioms from page one, this book takes a deliberately reversed engineering approach. We start at the 400 kV switchyard—ground you already own as an engineer—and walk upstream, room by room, until we reach the nuclear core. Every new concept is explained using the language you already speak: control loops, negative feedback paths, numerical solvers, and component degradation.
Try the Live Software Demo Now!
This book is a hands-on, deeply integrated companion guide to NEXUS-1, a fully interactive, browser-based nuclear plant operator console and digital twin.
No server, no installation, and zero setup required. The entire simulator runs locally in your browser. You can load it right now, play with the control rods, monitor the core parameters, and watch the physics engines calculate the math live:
👉 Play with the Live Simulator: https://gregory82gr.github.io/Nexus-1-phase-0/
What’s Under the Hood? (The Engineering Blueprint)
This is not a cosmetic layout or a sci-fi game. The companion book explains the literal software architecture and mathematical implementations executing live inside the NEXUS-1 Phase 0 demonstrator:
How Every Chapter is Structured
To ensure maximum utility, every single chapter follows a predictable engineering blueprint:
👤 Who This Is For
This project requires zero prior nuclear knowledge. If you are fluent in software engineering, systems design, control theory, or basic engineering, and you want to demystify how a modern Pressurized Water Reactor (PWR) works by driving a real, live-computed simulator, this book is built for you.
Author: Grigorios Kyriakos Agathangelidis.
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης.
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
Something trips. In the next four seconds, two hundred alarms fire. The board is a wall of red, every annunciator is screaming, and the one alarm that actually matters — the cause — is buried somewhere in the flood, indistinguishable from the two hundred consequences stacked on top of it. "Loudest alarm wins" is how that ends badly.
And now there's a new temptation: point a large language model at the flood and ask it what happened. It will give you a fluent, confident, beautifully-worded answer — and you will have no way to know whether any of it is true.
From Flood to Cause is written to resolve both problems at once, around a single governing principle:
The engine decides, the model explains.
A deterministic causal engine — not a neural network — identifies the root cause from an engineered fault-propagation graph and corroborating telemetry. The language model never diagnoses, never ranks, never votes. It runs strictly downstream, in an advisory-only role, to put the engine's conclusion into cited language a person can audit — and it abstains the moment grounding is absent. This book shows you, end to end, how to build a system like that and why every piece is where it is.
Try the Live Console Now!
This is a hands-on companion to NEXUS-1, a fully interactive, browser-based root-cause console. No server, no installation, zero setup. Every incident, graph node, edge weight, and delay window in the book is drawn from this live system — nothing is invented. Load it, trigger a cascade, and watch the engine collapse the flood to a single origin:
👉 Play with the live console: https://gregory82gr.github.io/Nexus-1-phase-0/
What's Under the Hood? (The Engineering Blueprint)
This is not a prompt-engineering listicle. It's the literal architecture and the discipline that makes an LLM safe to put near an operating decision:
How Every Chapter Is Structured
Every chapter follows the same engineering blueprint:
👤 Who This Is For
If you are a software, data, control-systems, or SRE engineer — comfortable with C#/.NET, SQL, and systems design — and you are being asked to put a language model somewhere its answers actually matter, this book is built for you. It assumes no background in alarm management or nuclear engineering; it builds the reasoning up from the screens and the code. It is the diagnostic-and-AI companion to From Grid to Core, and it stands entirely on its own.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
Power is drifting below target.
An operator can correct it. A conventional controller can correct it. A page of carefully tuned if-rules can probably correct it too.
But what happens when the operating conditions change, the assumptions behind those rules begin to break down, and the trade-off between accuracy, stability, and actuator wear becomes too complex to tune by hand?
And now there is a new temptation: hand the problem to a machine-learning model and let it learn for itself.
It will produce recommendations.
It may even produce excellent recommendations.
But if the recommendation affects a control system, one question matters more than all the others:
Can you explain exactly why it chose that action?
From Trial to Policy is written around a single governing principle:
The agent learns, the engineer understands.
This book shows how to build a reinforcement-learning agent that remains completely readable after training. No hidden layers. No black-box neural network. No mysterious weights distributed across millions of parameters. The result of learning is a simple, inspectable Q-table: a finite set of states, a finite set of actions, and a number describing the long-term value of each possible choice.
Every recommendation can be traced.
Every action can be explained.
Every learned policy can be read directly by a human.
The book takes reinforcement learning apart piece by piece and rebuilds it from first principles. Agent. Environment. Reward. State. Action. Exploration. Policy. Nothing is assumed, and nothing is hidden behind mathematical jargon. Each concept is mapped directly to C#, .NET, SQL Server, and a working industrial-style control problem.
Try the Live Console Now!
This is a hands-on companion to NEXUS-1, a fully interactive browser-based optimization console. No installation, no server, zero setup. Every state, action, reward curve, policy grid, and training result shown in the book comes directly from this live system.
Open the console, start training, and watch the policy emerge from thousands of episodes of trial and error.
👉 Play with the live console:
https://gregory82gr.github.io/Nexus-1-phase-0/
What's Under the Hood? (The Engineering Blueprint)
This is not a machine-learning theory book. It is the architecture of a working, interpretable reinforcement-learning system.
• The Control Problem — how a familiar feedback loop becomes a learning problem.
• Agent, Environment, Reward — the three building blocks of reinforcement learning, mapped directly to C# interfaces and classes.
• The Digital Twin Training Ground — why learning happens inside a fast surrogate model rather than on the real system.
• State and Action Design — turning a continuous world into 35 readable states and five discrete control actions.
• The Q-Table — the entire learned policy stored as 175 auditable numbers.
• The Learning Algorithm — Q-learning explained step by step, arithmetic by arithmetic, without requiring a machine-learning background.
• Exploration versus Exploitation — why an agent must sometimes try apparently bad actions in order to discover better policies.
• Policy Interpretation — reading the learned table directly and understanding why every decision was selected.
• Advisory Deployment — how a learned policy becomes operational advice while remaining bounded, inspectable, and human-approved.
• C# and SQL Server Implementation — complete architecture, persistence model, training workflow, reward logging, and policy storage.
How Every Chapter Is Structured
Every chapter follows the same engineering blueprint:
What You Already Know — connecting new reinforcement-learning concepts to familiar software-engineering ideas.
The Concept — a precise explanation of the mechanism and why it exists.
One Figure — a focused diagram illustrating the idea being discussed.
See It in NEXUS-1 — exactly where the concept appears in the live console.
Honest Boundary — a transparent discussion of limitations, assumptions, and what the demonstration genuinely does versus what it deliberately simplifies.
No magic.
No hype.
No claims that learning systems are smarter than they are.
Only mechanisms that can be inspected, explained, and reproduced.
👤 Who This Is For
If you are a C#/.NET developer, software architect, controls engineer, simulation engineer, or systems designer who has never studied reinforcement learning but wants to understand how a real learning agent works, this book is for you.
It assumes you are comfortable with software development and basic engineering reasoning. It assumes no prior knowledge of machine learning, neural networks, statistics, or control theory.
By the final chapter you will be able to open a policy table, inspect every learned action, and understand exactly how trial and error became a decision-making strategy.
This volume is the reinforcement-learning companion to NEXUS-1 and the third book in the companion series following From Grid to Core and From Flood to Cause.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
What does a digital twin look like when you stop describing it in diagrams and actually give it a database?
From Schema to System is the complete data-backbone reference for the NEXUS-1 companion system. It takes the architecture introduced in From Table to Twin and writes it down as a full SQL Server / EF Core friendly schema atlas: one database, seventeen bounded contexts, hundreds of tables, typed lookup tables, primary keys, foreign keys, indexes, audit columns, and verification queries.
This is not a book about database theory in the abstract. It is a concrete schema reference for an industrial digital-twin platform built around the NEXUS-1 demonstration environment. The plant fleet, instrumentation layer, digital twin, alarm management, event management, maintenance records, root-cause engine, reinforcement-learning policy store, robotics fleet, radiation monitoring, emergency preparedness, compliance, reporting, and audit trail are all modelled as connected sectors of one database.
The central idea is simple:
A digital twin is only as trustworthy as the data backbone that holds it together.
If a unit exists in the reactor fleet, the same UnitId should be visible in instrumentation, alarms, root-cause analysis, maintenance, reporting, and audit. If a signal feeds a twin variable, that binding should be explicit. If an alarm becomes an incident, and the incident becomes a root-cause investigation, and the investigation produces corrective actions, the chain should be queryable. If the system claims that something happened, the database should be able to show where that claim came from.
This book is the schema map for that chain.
What This Book Contains
The book contains the complete NEXUS-1 schema atlas:
The schemas covered are:
Together, these sectors form the complete data backbone behind the NEXUS-1 digital-twin concept.
Why This Book Exists
The earlier NEXUS-1 books each explained one major part of the platform.
From Grid to Core explained the plant and its physics.
From Flood to Cause explained alarm-flood collapse and root-cause reasoning.
From Trial to Policy explained the interpretable reinforcement-learning agent.
From Table to Twin explained why the data model matters and how a schema becomes a digital twin.
From Schema to System is the technical reference that follows from all of them.
It answers the question:
If all of those systems really lived in one coherent platform, what would the database look like?
The answer is not a single table, not a toy schema, and not a collection of disconnected examples. It is a complete, sector-by-sector architecture where every table has a place, every lookup has a type, and every cross-sector relationship is made explicit by a foreign key.
Who This Book Is For
This book is written for:
You do not need nuclear-industry experience to read it. The nuclear-plant setting is the reference system, not the assumption. The real subject is enterprise data architecture for complex industrial systems.
If you have ever wondered how to model a system where telemetry, alarms, incidents, maintenance, root-cause analysis, compliance, reporting, and audit all need to speak about the same physical world, this book is for you.
What Makes It Different
Most database examples are too small to teach architecture. They show customers, orders, products, invoices, and perhaps a few lookup tables. That is useful, but it does not show what happens when a platform grows large enough to need real boundaries.
This book starts where small examples stop.
It shows:
The result is not only a schema. It is a way of thinking about system truth.
Honest Boundary
NEXUS-1 is a Phase-0 demonstration and educational companion system. The schema in this book is a serious software-architecture reference, but it is not a licensed nuclear-plant information model, not safety-class software, not certified for operational use, and not connected to any real facility.
The purpose of this book is to show how a complex digital-twin platform can be structured, keyed, audited, and reasoned about at database level.
It is a schema atlas, not an operating manual.
In One Sentence
From Schema to System is the complete SQL Server / EF Core schema atlas for the NEXUS-1 digital-twin platform: one database, seventeen sectors, fully keyed.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
What does an enterprise EF Core model look like when the DbContext stops being a dumping ground and every entity gets its own professional configuration file?
From Entity to Context is the EF Core configuration companion to the NEXUS-1 schema atlas. It takes the database backbone defined in From Schema to System and shows how that structure can be mapped cleanly into C# using Entity Framework Core, Fluent API, configuration classes, migrations, indexes, relationships, defaults, constraints, and schema-aware folder organization.
This is not a general EF Core tutorial. It is a practical configuration atlas for a large industrial digital-twin platform. The focus is Code First, but not Code First as a toy example. The book shows how Code First can be organized in an enterprise-level project where the model is too large to live inside one OnModelCreating method.
The central idea is simple:
One entity should have one clear mapping, and the context should remain clean.
Instead of filling the DbContext with hundreds or thousands of mapping lines, each entity receives its own IEntityTypeConfiguration<T> class. Keys, table names, schema names, indexes, precision, default values, relationships, delete behavior, row versions, lookup-table conventions, and foreign-key names are placed where they belong: beside the entity they configure.
The result is a model that a programmer can navigate, review, test, migrate, and maintain.
What This Book Contains
The book contains the complete EF Core configuration atlas for the NEXUS-1 companion system.
It includes:
DbContext patternApplyConfigurationsFromAssemblyIEntityTypeConfiguration<T>DATETIME2, decimal precision, and string-length conventionsThe schema sectors covered are:
Together, these chapters show how the full NEXUS-1 data model can be represented in EF Core without losing structure, naming discipline, or database clarity.
Why This Book Exists
From Schema to System answered one question:
If the NEXUS-1 digital twin lived in one coherent SQL Server database, what would that database look like?
From Entity to Context answers the next question:
If that database is mapped professionally in a .NET application, what should the EF Core configuration layer look like?
The answer is not one giant DbContext.
It is not a pile of attributes scattered across entity classes.
It is not a migration file nobody understands.
The answer is a configuration atlas: one entity, one configuration file, one clear place where the database contract is expressed in C#.
Who This Book Is For
This book is written for:
You do not need nuclear-industry experience to read it. The nuclear digital-twin setting is the reference system, not the prerequisite. The real subject is enterprise EF Core organization for large, schema-rich applications.
If you have ever opened a project where OnModelCreating became unreadable, where indexes had random generated names, where relationship configuration was scattered, or where nobody knew which class truly owned the database mapping, this book is for you.
What Makes It Different
Most EF Core examples are intentionally small. They show a few entities, a simple DbContext, and perhaps one or two Fluent API rules. That is useful for learning the basics, but it does not show what happens when the model grows into dozens or hundreds of tables across multiple bounded contexts.
This book starts where small examples stop.
It shows:
DbContext clean in a large projectThe result is not only EF Core code. It is a way of keeping a large C# data model honest.
Honest Boundary
NEXUS-1 is a Phase-0 demonstration and educational companion system. The EF Core mappings in this book are serious software-architecture material, but they are not certified nuclear software, not a licensed plant data model, not safety-class implementation guidance, and not connected to any real facility.
The purpose of this book is to show how a complex digital-twin schema can be mapped professionally in EF Core using Code First discipline, configuration classes, clear naming, and explicit relationships.
It is a configuration atlas, not an operating manual.
In One Sentence
From Entity to Context is the complete EF Core configuration atlas for the NEXUS-1 digital-twin platform: one entity, one mapping, clean context.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
Have you ever worked on a system where the code, the database, and the business language slowly stopped agreeing with each other?
A table says one thing.
A service says another.
A controller knows too much.
An entity is only an anemic bag of properties.
A “rule” lives in five different places.
And everyone uses the same word — Unit, Event, Case, Model, Policy — with slightly different meanings.
From Domain to Twin is written to solve that problem from the ground up.
This book teaches Domain-Driven Design from zero, in plain human language, for mid-level .NET developers who already understand C#, EF Core, SQL tables, APIs, services, DTOs, and application structure, but have never had DDD explained slowly and practically.
It does not begin with abstract theory. It begins with the normal developer problems you already know: confusing models, unclear service boundaries, misplaced business rules, overgrown DbContext classes, fragile database relationships, and systems where nobody is quite sure who owns the truth.
Then it introduces DDD step by step.
You will learn what a domain is, what a model is, why a shared language matters, how entities differ from value objects, why aggregates protect consistency, what repositories should and should not do, where application services belong, what domain events really mean, and how bounded contexts prevent one word from meaning five different things.
But the book does not stop at definitions.
The second half applies every idea to NEXUS-1, a browser-based industrial digital-twin demonstrator. NEXUS-1 contains a plant/fleet model, instrumentation, alarms, root-cause reasoning, digital-twin snapshots, reinforcement-learning recommendations, audit, compliance, reporting, and EF Core persistence. That makes it a much richer DDD example than the usual shopping cart, invoice, or order-processing system.
Through NEXUS-1, the book shows how DDD can organize a serious engineering-style platform:
Unit is not just a string or dropdown value; it is part of the plant domain.Signal is not an alarm; it is measured instrumentation data.AlarmEvent is not a root cause; it is a domain fact that something crossed a configured condition.RootCauseCase protects hypotheses, evidence, rejected candidates, and final verdicts.TwinDivergence is the system admitting that the model and measured reality disagree.Recommendation is not a command; it is advisory output that must stay inside its boundary.AuditEntry is not log noise; it is part of the accountability story.The final part turns the model into implementation. It connects bounded contexts to project structure, SQL schemas, EF Core mappings, aggregate roots, owned value objects, domain methods, application services, repositories, read models, reporting screens, and audit trails.
This book is not a theoretical contribution to DDD. It is a practical learning journey: DDD explained from first principles, then applied to a complex NEXUS-1 digital-twin architecture until the meaning of the system becomes visible.
What You Will Learn
Who This Is For
This book is for software developers, especially .NET developers, who want a practical entry point into Domain-Driven Design.
You do not need prior DDD knowledge. You only need normal development experience: classes, services, controllers, databases, APIs, DTOs, and business rules.
It is especially useful if you have ever asked:
The NEXUS-1 Boundary
NEXUS-1 is a demonstration and educational platform. It is not connected to any real plant, not safety-class software, not certified operational code, and not intended for use in any real nuclear facility.
In this book, NEXUS-1 is used as a rich software-architecture case study: a way to explain how domain language, boundaries, rules, data, and decisions can be organized in a complex industrial-style system.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
Have you ever opened the database behind a system you thought you understood, and found two answers where you expected one? You recognize the tables — Unit, Signal, WorkOrder — but then you hit a folder of EF Core migrations that doesn't quite match the SQL someone else wrote by hand, a DbContext with shadow foreign keys nobody named, and a quiet, nagging question: which one of these is actually telling the truth about my data?
From Table to Twin is written specifically to answer that question.
Unlike most Entity Framework books, which hand you a DbContext on page one and never look back, this book takes a deliberately two-path approach. You build the same industrial schema twice — once by hand in SQL Server, reverse-engineered into C#; once from C# with Code First, generating its own migrations — and then you put the two builds side by side. Where Scaffold-DbContext and Fluent API disagree on naming, shadow keys, and inferred relationships, this book doesn't pick a winner and move on. It prints the disagreement, in a dedicated reconciliation chapter, and shows you which one to trust and when.
Try the Live Software Demo Now!
This book is a hands-on, deeply integrated companion guide to NEXUS-1, the same fully interactive, browser-based digital-twin console used throughout the series — except this volume is the one that finally writes down where all of it actually lives.
No server, no installation, and zero setup required. Open the console, and every schema named in this book, every query quoted, and every row counted can be counted again, live, in your browser:
👉 Play with the Live Console: https://gregory82gr.github.io/Nexus-1-phase-0/
What's Under the Hood? (The Schema Blueprint)
This is not a toy Blog/Post sample database. The companion book walks the literal data backbone of an industrial nuclear-plant digital twin — a schema plausibly past two hundred tables, built to the same standard throughout:
Scaffold-DbContext. Part 2 rebuilds the identical model from C#: configuration classes, value converters, owned types, and generated migrations.CREATE TABLE listings, the book teaches one shape, one SQL generator, and one generic IEntityTypeConfiguration<T> — and proves it in an appendix that lists every table the generator actually produced.RowVersion concurrency — then indexes measured the honest way, with logical reads and execution plans shown before and after, never asserted from memory.SqlBulkCopy, and raw SQL — and the harder discipline of knowing the handful of places in a two-hundred-table schema where EF Core is genuinely the wrong tool.
How Every Chapter Is Structured
To keep sixteen chapters of database design from turning into a wall of DDL, every chapter follows the same five-beat scaffold the NEXUS-1 series has used since Volume I:
👤 Who This Is For
This book assumes you're already fluent in C#, comfortable in .NET, and at home in SQL Server. It does not assume you want a guided tour of Entity Framework's feature list — that is not what this book is. If you've ever inherited a database you didn't trust, scaffolded a model you couldn't quite read, or wondered whether your Code First migrations and your DBA's hand-written schema actually agree with each other, this is the book that walks you through finding out — on a real, running reference you can open and check for yourself.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
Most technical books perform certainty. This one interrogates it.
From Certainty to Calibration is the retrospective closing volume of the NEXUS-1 Companion Series — a return trip through six architectural decisions from the first seven volumes, each one re-examined against a single question: was this actually right, and if not, what would replace it?
Every chapter runs the same disciplined structure:
Six chapters, in full:
A five-lesson survival guide distills the findings into a short, source-agnostic checklist for anyone building audit-heavy or safety-adjacent systems — each lesson closes with a worked example from outside NEXUS-1 entirely (payments, fraud detection, content moderation, medical triage, demand forecasting), as a check that it actually generalizes rather than just restating its source chapter.
The book closes with an honest tally of its own six chapters — how many findings were confirmed, how many were genuinely new, and an admission that most landed somewhere in between — because a retrospective that only ever finds fault in the original design, and never in its own proposals, hasn't actually kept its own rule.
Who this is for: senior software architects, .NET and SQL Server practitioners, and engineers building systems where an audit trail matters. Familiarity with the earlier NEXUS-1 volumes helps but isn't required — Part 0 gives enough context to follow the argument without it.
What this book is not: a defense, an apology, or a claim that the original series was wrong. Every original decision examined here is judged to have been correct under the constraints it was made with. What's new is only ever the second half of the sentence: correct, and here is what it costs now that the constraints have shifted.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
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.
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.
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.
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.
I followed the same Leanpub-style logic as your NEXUS-1 page: strong opening question, clear bridge for the target reader, “under the hood” explanation, transparent boundary, and reader positioning. (Leanpub)
Have you ever looked at a reactor-kinetics screen and wondered why the equations have the shape they do?
You see neutron power, delayed-neutron precursor groups, reactivity, Doppler feedback, moderator feedback, xenon poisoning, and a live numerical solver. The deterministic behaviour looks smooth and continuous. But underneath that smooth curve stands a more fundamental stochastic picture: neutrons are born, removed, counted, and lost through a chain of random events.
From Queue to Core is written to make that hidden bridge visible.
This book explains how the classical birth–death process from queueing theory and continuous-time Markov chains can be used as a disciplined stochastic foundation for understanding reactor kinetics. It does not claim that a reactor is literally a queue. Instead, it uses the birth–death process as a clean mathematical language for neutron-population dynamics: births correspond to fission-created neutrons, deaths correspond to absorption or leakage, and criticality becomes the balance between creation and removal.
The book then walks carefully from that stochastic picture toward the deterministic six-group point-kinetics model used in NEXUS-1. Along the way, it explains the master equation, extinction probability, startup intuition, delayed-neutron groups, mean-field collapse, feedback effects, and the difference between what a stochastic model can claim and what a deterministic engineering solver can claim.
This is a theoretical companion to the NEXUS-1 demonstrator, but it remains practical in spirit. The reader is not only shown equations; the book also includes worked examples, representative NEXUS-1 constants, interpretable comparison tables, and C# algorithms that implement the ideas step by step: a birth–death Monte Carlo path, a master-equation approximation, and a compact point-kinetics-style solver.
What This Book Covers
From Queue to Core develops the bridge in stages:
What Is Under the Hood?
The book connects several layers that are often kept separate:
The stochastic layer
A reactor chain begins as a population process. Individual neutrons appear and disappear randomly. The birth–death model makes that population explicit.
The probability layer
The master equation tracks the probability of every possible neutron population. It is richer than a single trajectory, but also more expensive.
The deterministic layer
Point kinetics tracks the mean behaviour of the neutron population and delayed-neutron precursor groups. This is the layer that becomes practical for a live simulator.
The feedback layer
Doppler feedback, moderator feedback, xenon poisoning, and control input explain why reactor kinetics is not just exponential growth or decay. Feedback turns a chain into a regulated physical system.
The implementation layer
The C# appendix shows how the models can be translated into interpretable algorithms. The purpose is not reactor-control software; the purpose is executable understanding.
Who This Book Is For
This book is for software engineers, C#/.NET developers, systems architects, control engineers, mathematically curious readers, and advanced learners who want to understand the mathematical parentage of the NEXUS-1 kinetics engine.
You do not need to be a nuclear engineer to read it. Some familiarity with probability, differential equations, or simulation helps, but the book is written with the same NEXUS-1 teaching rule used throughout the series: explain the bridge before asking the reader to cross it.
Honest Boundary
This book is not a nuclear-safety manual, not a validated neutronics code, not certified simulation software, and not operational guidance for any real facility. NEXUS-1 remains a browser-based educational demonstrator. The value of this book is conceptual, mathematical, and architectural: it shows how stochastic thinking, deterministic reactor kinetics, and readable software implementation can be connected without pretending that the model is more than it is.
At its heart, From Queue to Core is about one idea:
A deterministic reactor-kinetics curve is not magic. It is the visible engineering shadow of a deeper stochastic chain.
This book is warmly dedicated to my good friend Alekos, with gratitude for his friendship, encouragement, and presence along the journey of turning difficult ideas into written form.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
From Context to Flow is the advanced Domain-Driven Design bridge volume of the NEXUS-1 series. Where From Domain to Twin introduced the essential DDD vocabulary, this book takes the next step: it shows what happens when a domain model begins to move across boundaries as events, contracts, workflows, failures, retries, projections, audits, and delayed consistency.
This is not a microservices implementation guide. It is the book that should come before microservices. Its central question is simple:
Before we split a system into services, do we truly understand its boundaries, its language, its ownership, and its flows?
Using the NEXUS-1 digital-twin demonstrator as a coherent teaching system, the book follows a realistic architectural flow:
Alarm Raised → Alarm Flood Detected → Root-Cause Case Opened → Evidence Attached → Verdict Issued → Recommendation Generated → Audit Entry Written → Compliance Review Triggered
This flow crosses several bounded contexts: ReactorFleet, Instrumentation, AlarmManagement, RootCause, DigitalTwin, ReinforcementLearning, Audit, Compliance, and Reporting. That makes it an ideal environment for advanced DDD because every step forces a serious architectural question: who owns the rule, who publishes the event, who reacts to it, what must remain private, what becomes a public contract, and what happens when the next context is temporarily unavailable?
The book explains advanced DDD patterns in practical language: context maps, upstream/downstream relationships, customer/supplier relationships, conformist relationships, shared kernel, anti-corruption layers, published language, domain events, integration events, outbox, inbox, idempotency, dead-letter handling, process managers, sagas, compensation, timeouts, and eventual consistency.
It also draws a clear line between things that are often confused:
A domain event is not automatically an integration event.
An audit entry is evidence, not workflow.
A bounded context is not automatically a microservice.
A recommendation is not a command.
A projection is not the source of truth.
A retry is not a business decision.
A compensation is not a rollback.
Every chapter keeps the NEXUS-1 standing rule: nothing claims to exist that does not. The book does not pretend that distributed architecture is free. Every pattern is explained with its benefit, its cost, and its honest boundary.
This book is written for C#/.NET developers, software architects, and advanced learners who already understand the basics of DDD and want to move from modelling to architectural flow. It is especially useful for readers who want to understand how a modular system becomes ready for microservices without rushing into deployment boundaries too early.
By the end of the book, you should be able to look at a large system and ask better questions:
Which context owns this language?
Which aggregate protects this rule?
Is this event internal, external, or only an audit fact?
Does this workflow belong inside one application service, or does it need a process manager?
Is this dependency healthy, or does it require an anti-corruption layer?
Can this context become a microservice, or is it only a module with a fashionable name?
The goal is not to make the system more distributed.
The goal is to make the system more honest before distribution begins.
This book is dedicated to Eystathios Andreadis — my brotherly friend and an outstanding surgeon — who reminds us every single day that there are still people whose integrity, compassion, and dedication set them apart.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
From Flow to Services is the architectural bridge between a well-designed modular application and a carefully designed microservice ecosystem. Rather than presenting microservices as the inevitable destination of every modern system, this book argues that distribution should be the consequence of mature boundaries—not the starting point.
Using the NEXUS-1 digital twin as a continuous case study, the book follows the evolution of a complex industrial software platform from advanced Domain-Driven Design into a realistic microservice architecture. Every architectural decision is examined through a single coherent system, allowing the reader to see not only what changes, but why those changes become necessary.
Across more than seventy chapters, the journey moves from service-boundary identification and data ownership to public contracts, asynchronous messaging, outbox and inbox patterns, sagas, eventual consistency, distributed workflows, observability, resilience, security, migration strategies, and operational readiness. Rather than presenting isolated patterns, the book demonstrates how these concepts reinforce one another inside a complete architecture.
One of the central themes of the book is intellectual discipline. It repeatedly challenges popular assumptions, showing why a bounded context is not automatically a microservice, why shared databases undermine service autonomy, why APIs must protect language rather than expose implementation details, and why every architectural benefit introduces corresponding operational costs. The objective is not to persuade the reader to adopt microservices, but to help them recognize when they have genuinely earned them.
Like every volume in the NEXUS-1 series, this book combines architectural theory with practical implementation. The explanations are grounded in C# and .NET examples while remaining focused on timeless architectural principles rather than framework-specific recipes. The emphasis is on reasoning, trade-offs, and design judgement instead of memorizing technologies.
Who This Book Is For
This is not an introductory book on software development, C#, or microservices.
It assumes that the reader already understands object-oriented programming, ASP.NET Core, relational databases, and the fundamentals of Domain-Driven Design. Familiarity with aggregates, bounded contexts, domain events, and clean architecture will significantly improve the reading experience.
The ideal audience includes:
A Word About the Difficulty
This is one of the most demanding books in the NEXUS-1 series.
It deliberately avoids simplified "how-to" recipes in favor of architectural reasoning. Many chapters ask the reader to evaluate competing trade-offs, understand the costs of distribution, and think about language ownership, contracts, consistency, and operational responsibility simultaneously. Readers looking for quick implementation shortcuts may find the material challenging.
However, developers who invest the time will gain something more valuable than a collection of patterns: a structured way of thinking about distributed systems that remains applicable regardless of programming language, framework, or cloud platform.
Near the end of this journey, the reader should not simply know how to build microservices—they should understand when they should not.
This book is dedicated to my friend Anna, whose quiet encouragement, thoughtful attention, and genuine belief in both ideas and people became a reminder that every worthwhile journey is made possible by someone who chooses to listen.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
Volume I built a core with no database and no web server, and dared you to call that a limitation. From Core to Contract is the volume where the database and the wire finally arrive — and the entire discipline is keeping them on their own side of the seam.
This is the second volume of the NEXUS-1 backend trilogy. It takes the fully tested Domain and Application layers built in From Blueprint to Core and gives them the two things Clean Architecture spends its whole life holding at arm's length: persistence and a public API. By the last page, EF Core is mapping an aggregate to real SQL Server tables, HTTP requests are flowing in and problem-details refusals are flowing back out, JWTs are being issued and validated — and not one line of that infrastructure has reached up past the boundary to change a rule the core already proved.
That restraint is the subject of the book. Anyone can wire up a DbContext and a controller. The hard part — the part most books wave through — is doing it so that the framework, the database, and the wire format stay below the seam, adapters to ports that were declared before any of them existed. This volume implements those ports against the exact 654 tables of the published schema atlas, across 17 bounded contexts, and it does so under the same standing rule that governs the whole series: nothing claims to exist that does not. Every project compiles, every class is shown in full, and every invariant is proven by a test that commits the exact crime the rule forbids and watches it fail by name.
It practices what it teaches. Every boundary decision is made once, in the open, and then held to. When the outbox needs a table of its own in Chapter 7, it doesn't quietly appear — it is admitted as a lawful Infrastructure citizen by amending, on the page, the very statute Chapter 2 wrote to keep Infrastructure out of the Domain's tables. When an earlier chapter's own code needs correcting, the fix happens in a visible diff, not in silence.
It shows its refusals, not just its successes. Optimistic concurrency isn't asserted — it's watched, with two real database connections racing for the same row until one loses by name. A DTO leak is proven by shipping the domain-carrying type on purpose and reading the leak back as JSON. Refusals cross the wire as RFC 7807 problem details carrying the platform's published refusal codes, so the client sees the same "no" the core meant.
It draws what it explains. Eighteen chapters are each followed by a two-page Deep Dive companion — plain-language explanations and original UML for readers newer to persistence, EF Core, web APIs, tokens, and authorization, adding floors under the material without lowering the technical ceiling above it. A recurring "Where We Are in the Solution" panel tracks the growing codebase, the migration's table count, and the test total, 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 closes with an Epilogue — The Honest Boundary of Volume II — an itemized account of what is deliberately deferred (the outbox dispatcher, the integration harness, logging, configuration environments, health checks, the container) and which volume owns each one. The seam to Volume III is stated in plain sight; it is part of the design, not an omission.
What's InsideNexusDbContext wired to the configuration atlas of From Entity to Context; repositories as three-line adapters behind Volume I's ports; the Unit of Work with its after-commit dispatch clause; optimistic concurrency armed by a single typed RowVersion; the write half of the outbox; and migrations and seeding that build to the exact tables of the schema atlas.OperatorId is no longer taken on faith but carried, checked, and enforced.DbContext map, and the refusal-code → HTTP-status registry — plus source references, a glossary, and an index.Developers who have read a Clean Architecture or DDD book and then hit the question those books skip: how do you add a database and an HTTP API without the framework leaking upward into the rules you worked so hard to isolate? Architects who want a fully worked persistence-and-API layer to hold their own team's decisions against. And readers of Volume I who want to watch the ports finally get their adapters.
Volume I is a companion, not a prerequisite — but this book assumes a tested Domain and Application core already exists, and From Blueprint to Core is where that core was built. Everything you need to follow this book's code is inside it.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
Most books that teach deployment show you a green checkmark and ask you to trust it. From Contract to Container shows you the checkmark, then makes you prove what's behind it — a real database, a real container, and a gate that will not lie.
This is the third and closing volume of the backend trilogy that builds NEXUS-1, a fictional Phase-0 nuclear-plant digital twin, from a proven Domain and Application core (Volume I) through a real Infrastructure and API layer (Volume II) to a system that ships. Seventeen chapters take the codebase from two hundred tests to a running container answering its own health probes — without a mock standing in for the database, without an assumption standing in for a real failure, and without a claim that outruns what the suite actually proves. By the last chapter, a real SQL Server has been stood up and torn down on every single test run, a dispatcher delivers at-least-once and turns that into an exactly-once effect, every refusal the system can produce carries a correlation id, and a CI gate will not package an image unless the entire suite is green.
That absence of shortcuts is not caution for its own sake. It's the argument. A system that "works" against a fake database or a stubbed dependency hasn't been proven — it has been rehearsed. This volume's whole discipline is refusing that substitute: the harness in Part I runs every integration test against a disposable, genuine SQL Server; the dispatcher in Part II is watched failing under a killed process before it is trusted to recover; the observability in Part III is proven by triggering the exact failure it claims to report; and the container in Part IV is shipped only once a gate — not a developer's judgment — has verified it.
It tests against the real thing, not a stand-in. Every integration test in this book runs against a genuine, disposable SQL Server under Testcontainers — never a mock, never an in-memory substitute. If a query is wrong, the test finds out the way production would.
It watches its own promises fail. Every invariant this book claims — a retry budget, a health probe, a refusal shape — is demonstrated twice: once holding, and once deliberately broken in a test and watched to fail. A guarantee that has never been watched failing is not yet a guarantee.
It closes its own debts in writing, and updates them when it can't. Chapter 1 opens by reading Volume II's debt ledger back as a promise, chapter by chapter. The closing Epilogue reads that promise back a second time — and when one row can no longer be kept as written, the book corrects it on the page rather than letting it quietly disappear.
It audits itself across chapters, not only within them. The back matter doesn't just summarize what earlier chapters built — it cross-checks them against each other, and names what it finds, including a real wiring gap between the CI pipeline and the Dockerfile that no single chapter, read alone, would have caught.
It knows exactly what it hasn't built yet. The trilogy closes on an Epilogue titled The Honest Boundary of the Trilogy — a final, itemized account of everything three volumes still do not do, with nothing deferred to a future book that does not exist.
Developers who have built (or read) a clean, layered backend and want to see it proven against real infrastructure and actually shipped — not just described as production-ready. Engineers who want a worked, honest example of a CI gate, a retry-and-quarantine dispatcher, and a health-probe contract, built end to end rather than assembled from framework defaults. And anyone who has finished an architecture book with a working core and wondered what it actually takes to trust that core outside a debugger.
Volumes I and II are companions, not prerequisites for the code in this book — every class this volume builds on is named and explained where it first matters. But the trilogy's ledger, and the weight of what gets closed here, land hardest if you've read the debt this volume was written to repay.
From Contract to Container is the closing volume of the NEXUS-1 backend trilogy, part of the wider 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 completes the backend, begun in From Blueprint to Core (Domain and Application) and continued in From Core to Contract (Infrastructure and the API); the trilogy closes with a Phase-0 demonstrator, proven and shipped, and an honest account of everything it still does not do.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
From Flow to Proof is a bridge between advanced software architecture and formal reasoning.
Modern distributed systems make promises that ordinary architecture diagrams cannot fully express. They promise that committed information will not disappear, repeated delivery will not repeat a business effect, temporary inconsistency will not become corrupted truth, ownership boundaries will remain intact, and failures will eventually become either recovery or visible evidence.
These are not merely questions about components, APIs, databases, or message brokers. They are questions about system behavior across time, concurrency, translation, and failure.
This book shows how those architectural promises can be stated explicitly, examined systematically, and supported by evidence.
Using the NEXUS-1 digital twin as a continuous architectural setting, From Flow to Proof explores how complex systems can be understood as stateful models whose transitions, contracts, responsibilities, and failure paths are open to inspection. The purpose is not to turn software architects into academic mathematicians, nor to use formal notation as decoration. The purpose is to give engineers a stronger language for claims that prose, diagrams, and ordinary tests often leave dangerously ambiguous.
The book introduces several complementary ways of examining architecture. State machines make lifecycle and forbidden transitions visible. Contracts clarify what individual operations require and guarantee. Temporal reasoning addresses what must never happen and what must eventually happen. Concurrency models expose parallel behavior, waiting, and possible deadlock. Relational models examine ownership, access, and authority. Meaning-preserving mappings ask whether information remains truthful as it crosses boundaries. Refinement connects these perspectives to a central engineering question:
Can a more detailed implementation safely stand in for the architectural promise made by a simpler specification?
These methods are not presented as disconnected mathematical subjects. They are coordinated around one proof-oriented architectural method and one recurring concern:
What exactly has the system promised, and what evidence justifies believing that the promise survives time, failure, translation, and distribution?
The book remains firmly grounded in software engineering. Formal notation is introduced only after the architectural pressure is visible. Important concepts begin in ordinary language, become explicit models, are connected to realistic distributed-system concerns, and are then challenged through broken cases, counterexamples, or deliberately weakened designs.
The reader is not asked merely to trust a pattern. The reader is asked to understand what the pattern protects, what assumptions it depends on, what evidence supports it, and where its protection ends.
A central discipline of the book is its careful use of the word proof. A checked model is not presented as proof that production code, infrastructure, operators, networks, or the physical world will behave perfectly. Models omit details. Implementations may drift. Tests cover selected executions. Monitoring observes only what has been instrumented.
Formal methods strengthen architectural reasoning, but they do not remove engineering responsibility.
For this reason, From Flow to Proof repeatedly distinguishes model evidence from implementation evidence. It connects specifications to contracts, code, tests, database constraints, execution traces, audit records, and operational observations, while preserving an explicit and honest boundary around every conclusion.
The result is not simply a collection of formulas, notations, and tools. It is a proof-oriented way of thinking about architecture.
By the end of the journey, the reader should be better prepared to ask:
The objective is not to make architecture sound certain. It is to make architectural confidence more disciplined, reviewable, reproducible, and honest.
The book is supported by practical artifacts available in the NEXUS-1 project repository:
github.com/gregory82gr/Nexus-1-phase-0
Readers can use the repository alongside the book to inspect the technical materials that support its arguments. Depending on the relevant chapter, these materials may include model definitions, executable checks, structured catalogues, code examples, machine-readable records, diagrams, verification inputs, and supporting evidence artifacts.
The repository is not a substitute for the explanations in the book. It is the practical companion to them.
The text explains the architectural pressure, the modelling decision, the property being examined, the assumptions behind it, and the honest boundary of the result. The repository allows the reader to inspect and work with the corresponding artifacts directly.
This combination is important because From Flow to Proof does not ask the reader to accept formal claims only because they appear in print. Where executable or inspectable evidence exists, the reader is encouraged to open it, examine it, modify it, and observe what happens when an assumption, guard, invariant, or relation is removed.
The artifacts also make the book a useful foundation for future automation. Its structured properties, contracts, formal models, counterexamples, catalogues, refinement records, and evidence descriptions can support later work with domain-specific language models and AI-assisted engineering workflows. Such automation must remain governed, evidence-based, and subordinate to deterministic checks and human responsibility.
The intended direction is not artificial authority.
It is artificial assistance with an honest boundary.
This is not an introductory book on programming, databases, or basic software design.
It is written primarily for experienced developers, software architects, technical leads, and engineers working with systems whose behavior extends beyond one process, one database, or one transaction.
The ideal reader may already understand application development, APIs, relational databases, testing, and object-oriented design, but may have little or no previous experience with formal methods. Advanced mathematical knowledge is not assumed. The necessary concepts are introduced gradually and connected to recognizable engineering problems before formal notation is used.
The book is especially relevant for:
Readers familiar with Domain-Driven Design, asynchronous messaging, outbox and inbox patterns, sagas, eventual consistency, projections, and independent data ownership will recognize many of the architectural pressures. However, mastery of those topics is not assumed. Where an idea is load-bearing, it is explained or explicitly recalled before being used.
This is the most demanding volume in the NEXUS-1 series.
Its difficulty does not come only from mathematical notation. It comes from the need to think about architecture, behavior, time, failure, ownership, concurrency, meaning, and evidence at the same time.
The book deliberately avoids reducing formal methods to a few attractive diagrams or copying tool syntax without explaining the underlying engineering question. It asks the reader to distinguish:
That requires patience.
Some chapters are designed to be read slowly. Definitions matter. Assumptions matter. A small change in a property may completely change what has actually been claimed. Readers looking only for quick recipes or a short catalogue of best practices may find the book unusually demanding.
However, the book is designed not to abandon the reader. Important concepts begin with ordinary examples. The same architectural concerns return under different formal lenses. Understanding accumulates instead of restarting with every new notation. Counterexamples are treated as teaching instruments rather than as failures.
The companion repository also gives the reader a practical path beyond the page. Concepts can be connected to concrete artifacts rather than remaining purely theoretical.
Those who complete the journey should gain more than familiarity with particular tools. They should gain a reusable method for turning architectural promises into explicit questions, selecting appropriate evidence, identifying hidden assumptions, exposing counterexamples, and stating conclusions with greater precision.
The book does not promise certainty.
It teaches calibration.
This book is dedicated “… to my parents…”
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
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
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
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.