Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions content/work/business-rules.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: "Business rules as data, one engine for UI and backend"
summary: "Hundreds of eligibility, compatibility and validation rules kept as data and evaluated by one engine, so the screen and the server always give the same answer."
sector: "Telco"
role: "Lead Developer"
themes: ["domain-modeling-rules"]
kind: "client"
programme: "telco-service-orchestration"
period: "2025 — now"
date: "2025-10-01"
stack: [".NET", "ASP.NET Core", "PostgreSQL", "Vue 3", "Vue Flow"]
---

## Context

Whether a product can be added to a quote, combined with another, or changed
on an existing order depends on hundreds of rules. When the UI checks one
version of a rule and the backend another, users see one answer on screen and
get a different one when they submit. And every rule written in code waits for
a release when the business changes it.

## How a rule works

A rule is a row, not code. The engine reads it and runs it.

<Flow
title="Anatomy of a rule"
steps="Scope: where it applies | Parameters: values it needs | Condition: when it fires | Result: block, warn or set"
notes="Each rule has a type (eligibility, compatibility, validation or confirmation), a stage, the item it applies to, and validity dates. | Parameters are read through small named commands, such as a quote attribute or a characteristic of a product. There are about two hundred of them. | The condition is an expression over those parameters. | A rule can stop the user with a message, ask for confirmation, or set a value. A rule that sets a value can feed another rule, and the editor shows these chains as a graph."
/>

## The decisions

- **One engine.** The UI doesn't have its own copy of the rules. It calls the
same engine the backend uses, so the answer is the same everywhere.
- **Rules are data.** A rule has a lifecycle and validity dates. A rule built
from existing commands is added or changed without a deployment.
- **Commands are code.** When a rule needs something new to read or set, it
becomes a new command: written once, reviewed and tested like any other code,
then reusable by every rule.

## My part

I led the team that built it.
40 changes: 0 additions & 40 deletions content/work/generic-user-tasks.mdx

This file was deleted.

100 changes: 59 additions & 41 deletions content/work/internal-learning-platform.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "One engineer, every layer, three months to production"
summary: "An internal training platform built AI-natively: backend, frontend, database, DevOps and operations owned by one engineer, delivered in a governed cycle."
summary: "An internal training platform I built alone with AI: backend, frontend, database, DevOps and operations, live in three months and running without trouble since."
sector: "Corporate learning"
role: "Founder & engineering lead"
themes: ["delivery-operations", "quality-test-strategy"]
Expand All @@ -18,56 +18,74 @@ featured: true

## Context

An organization needed one place for its training: a programme catalogue,
sessions, requests, approvals, attendance and certificates, replacing an older
system whose data was migrated in. A product owner shaped the requirements and
the screen mockups. Every engineering role was mine.
The organization needed one place for its training: a programme catalogue,
sessions, requests, a two-step approval, attendance and certificates, replacing
an older system whose data we migrated. A product owner shaped the requirements
and the screen mockups. All the engineering was mine.

<Compare
beforeTitle="What this usually takes"
before="Backend developer | Frontend developer | Database administrator | DevOps engineer | Someone to run it after go-live"
afterTitle="How it was delivered"
after="One engineer owning every layer | A product owner for requirements and mockups | A governed cycle where AI writes and the cycle decides what is done"
afterTitle="What it took"
after="Me, with AI doing most of the typing | A product owner for requirements and mockups | Written rules that every change has to pass"
/>

## The system

- **Application:** .NET 10 Clean Architecture with CQRS on PostgreSQL, a
separate worker for scheduled jobs, and a Next.js front end behind a BFF, so
tokens never reach the browser.
- **Integration:** single sign-on with Entra ID, user sync from the HR system,
an email queue with retries.
- **Delivery:** a self-hosted GitLab with its own runner, CI/CD to separate
development, test and production environments, tagged releases with
generated notes.
- **Operations:** structured logs kept in the database and archived on a
schedule; tiered backups with a stated recovery point and restores that are
rehearsed; a daily read-only health check of production.
- **Rules:** every domain rule written as a numbered invariant, each tied to a
test, with the reasoning recorded as a decision record.

## How a task moves

Speed came from the cycle, not from skipping steps. Every change passes the
same gates, with a review between each.

<Flow
title="One task, end to end"
steps="Issue: read from the tracker | Decide: approach and trade-off | Red: a failing test first | Docs: updated with the code | Green: built until suites pass | Edges: integration tests, real database | Browser: E2E in a real browser | Ship: MR with evidence"
notes="The agent reads the issue from the tracker through MCP, so the work starts from the ticket itself. | A bug starts by proving the cause; a feature starts by agreeing the approach before any code. | The failing test is the bug or the acceptance criterion, written as code. A test that passes without the change is rewritten. | Domain docs, the feature map and decision records change in the same commit, so documentation never drifts from the code. | The change is built until unit, integration and end-to-end suites are green. | Integration tests run against a real PostgreSQL in a container and cover the edge cases, not only the happy path. | Because the rules are written down, the agent can drive the feature in a browser with Playwright and check it against them. | The merge request carries the proof, then moves through development, test and production."
<SystemMap
title="What I built and run"
columns="People: Employees; Coaches; Managers; Admins | Front end: Next.js app; BFF, tokens stay on the server | Back end: .NET API; Worker with scheduled jobs | Data: PostgreSQL; Logs and audit in the database | Around it: Entra ID sign-in; HR user sync; Email queue"
/>

<Timeline items="Month 1: Foundation, single sign-on, CI/CD, first environments | Month 2: Domain modules, approval chain, notifications | Month 3: Load and security testing, migration, go-live | Since: in daily use, changes limited to fixes and polish" />
## Who does what

## Proof before go-live
AI writes most of the code. It doesn't decide what the code should do, and it
doesn't decide when a change is done.

Load- and stress-tested up to 300 concurrent users with no server errors and a
95th percentile under 400 ms. Scanned with SonarQube, OWASP ZAP and a
dependency audit.
| Step | The agent | Me | Checked by |
|---|---|---|---|
| Start | Reads the issue, the logs and the data, and writes down the cause | I agree with the cause, or with the approach for a feature | |
| Test | Writes a test that fails without the change | I check it tests the right thing | The test must fail before the fix |
| Build | Writes the code and updates the docs in the same commit | I review the change | Unit and integration tests on a real PostgreSQL |
| Verify | Drives the feature in a browser with Playwright | I compare it with the rules | End-to-end tests |
| Ship | Opens a merge request with the evidence | I review and merge | CI, then development, test and production |

## How the repository keeps it honest

- **A start file for any agent or new developer.** It says what not to break
and in which order to read: the business rules, a generated map from each
feature to its code and docs, the delivery cycle, the decision records, and
only then the code.
- **Numbered rules.** The core business rules are written as invariants, such
as "the waitlist is filled by an admin, never by the system". Each has a
test, and a rule and its test can only change together.
- **The cycle is checked in.** A skill in the repository walks every change
through the same steps. It has no rules of its own; it only enforces the
order. A step counts only when it was actually run.
- **Production is read-only.** The agent can read logs and query data. It
can't write anything.

When a waitlist bug reached production, the fix went through the same steps
and left three things behind: a decision record, a numbered rule and a test.
That bug can't come back without a test failing first.

## Running it

- A self-hosted GitLab with its own runner, and CI/CD to separate development,
test and production environments.
- Tagged releases with generated release notes.
- Structured logs in the database, archived on a schedule.
- Backups in tiers with a stated recovery point, and a weekly restore of
production data into development, so restores are practised, not assumed.
- A daily read-only health check of production.

<Timeline items="January: The base: sign-in, BFF, HR user sync, CI/CD | February: Training flows, calendar, the domain model written down | March: Domain clean-up and the test suites | April: Four languages, the remaining features, security and performance testing, go-live" />

## Before go-live

Load- and stress-tested up to 300 concurrent users: no server errors, 95th
percentile under 400 ms. Scanned with SonarQube, OWASP ZAP and a dependency
audit.

## Outcome

In production since the third month and used by around 400 people, with
nothing since go-live beyond bug fixes and cosmetic changes. More than 2,000
automated tests guard it, and when something does go wrong it ends as a rule, a
test and a decision record.
Live since the third month and used by around 400 people. Since go-live the
changes have been bug fixes and cosmetic polish, nothing more.
71 changes: 46 additions & 25 deletions content/work/order-orchestration.mdx
Original file line number Diff line number Diff line change
@@ -1,42 +1,63 @@
---
title: "One process per order"
summary: "How a submitted quote becomes product orders, each running as its own workflow, with downstream systems answering asynchronously and orders that can still be cancelled mid-flight."
title: "One process per order, and the people in it"
summary: "Each product order runs as its own workflow: downstream systems answer late, people step in at hundreds of points, and an order can still be cancelled while it runs."
sector: "Telco"
role: "Lead Developer"
themes: ["workflow-orchestration"]
kind: "client"
programme: "telco-service-orchestration"
period: "2025 — now"
date: "2025-05-06"
stack: ["Camunda 8", ".NET", "ASP.NET Core", "Refit", "PostgreSQL"]
date: "2025-06-01"
stack: ["Camunda 8", ".NET", "ASP.NET Core", "Refit", "Vue 3", "PostgreSQL"]
---

## Context

An order for a business customer touches network inventory, work orders,
billing and people who confirm technical details, and some of those systems
answer days later. Every order needed an explicit state, a way to survive slow
downstream systems, and a precise answer to "can this still be cancelled?".
A business order touches network inventory, work orders, billing and people
who confirm technical details. Some of those systems answer days later. Every
order needs its own state, has to survive slow downstream systems, and needs a
clear answer to "can this still be cancelled?".

Try it: step an order through its process, then cancel it before and after the
milestone.

<Demo id="workflow-stepper" />

## The pattern

- **The process is chosen by data.** A decomposition table, keyed by service and
change type, says which workflow each product order runs. A new scenario is a
row and a process model, not new code.
- **One workflow per product order.** Each runs as its own Camunda 8 instance and
calls back into the services for the business logic, so the model stays about
the flow.
- **Late answers find their order.** Outbound requests carry a message id; a
downstream callback is correlated to the waiting process by it, however late
it arrives.
- **Change is allowed up to a milestone.** The process marks the points after
which cancelling or changing is no longer safe. Before them a request is
applied to the running order; after them it is refused with a reason.
## How it works

- **One workflow per product order.** A submitted quote is split into product
orders, and each runs as its own Camunda 8 process. A table decides which
process a product order runs; the splitting itself is a small strategy per
scenario, so each new scenario stays isolated.
- **The business logic stays in .NET.** The process calls back into the
services to create service orders and update the order, so the process model
only describes the flow.
- **Late answers find their order.** Every outbound request carries a message
id. When a downstream system calls back, the answer is matched to the waiting
process by that id, however late it comes.
- **Change is allowed up to a milestone.** The process marks the point after
which cancelling or changing isn't safe anymore. Before it, the request is
applied to the running order. After it, the request is refused with a reason.

## The people in the process

Across all order types, the processes stop at hundreds of points for a person:
confirm technical details, pick equipment, approve a change. Building a screen
for each one would have given us hundreds of forms drifting apart. So every
user task goes through one pipeline.

<Flow
title="Every user task, one pipeline"
steps="Resolve: handler by order and task | Load: fields from metadata | Fill: current values | Render: component by type | Save: changed fields only"
notes="A task gets its own handler only when it has to enrich or filter data. Everything else uses the generic one. | Each field carries its component type, validation, grouping and order. | Fields that repeat per related product are expanded from the order's own relationships. | The UI picks each component from a registry by its type, so a new field type is one registry entry. | Only the fields the user changed are written back."
/>

Adding a task is mostly configuration, and a fix in the pipeline reaches every
task at once.

## My part

I built the layer the platform uses to talk to Camunda 8: typed clients over its
REST API for process instances, messages, user tasks, jobs, incidents and
deployments. The team built the process models and scenarios on top of it.
I built the Camunda 8 client layer the platform uses for processes, messages,
user tasks, incidents and deployments, and the user task framework: the handler
pipeline, the worklist, the task stepper and the form renderer. I led the team
that built the process models, the scenarios and the task pool on top of them.
50 changes: 0 additions & 50 deletions content/work/order-platform-foundation.mdx

This file was deleted.

Loading
Loading