Engineering Log
Building SupplyMars
The decisions behind SupplyMars, the trade-offs, and what I learned when things broke, from the first commit onwards.
2026
-
6 October – 8 November 2026
Five weeks, 119 pull requests
A new PHP runtime, pages that update themselves, architecture rules enforced in CI, and two production incidents, found and fixed at the cause.
-
March 2023 – November 2026
From hand-written code to Claude Code
How the way I build changed over three years, from writing every line myself, with ChatGPT for the odd question, to an agent working from my issues and rules, and what has stayed mine throughout.
-
2024 – 2026
A domain model that owns its rules
The thread that runs through every rewrite. Entities that answer for themselves, built whole, with typed IDs and immutable values, one path for every write, and rules checked where the change is made.
-
23 – 26 October 2026
Live pages with Mercure
Order and purchase order pages that update themselves as the simulation runs, built on server-rendered HTML, with a security model that says exactly what a subscriber can learn.
-
20 – 24 October 2026
FrankenPHP in worker mode
One image in place of nginx and PHP-FPM, then a kernel that stays loaded between requests. Faster pages, flat memory, a rule that keeps it safe, and an incident traced to its root.
-
October 2026
A UI kit the project owns
Flowbite and a set of hand-converted components gave way to the Shadcn kit from Symfony UX Toolkit, copied into the project as its own files. Generic names for the kit, descriptive names for the app's own components, and wrappers wherever a composition repeats.
-
2 – 4 June 2026
FormFlow becomes a package
My controller pattern moved out of the app into its own versioned Composer package, with ports the app implements, names that say what each flow is for, and a CSRF flaw fixed on the way.
-
April – June 2026
From admin tool to product
A dashboard that answers "what should I do next?", demo orders anyone can place, help on every page, then Symfony 8.1 with its deprecations cleared.
-
February – April 2026
A staff tool that feels alive
A design pass over the whole app. A darker default that borrows Mars's greys, oranges and reds, colour that tells staff a record's status and supplier at a glance, motion that draws the eye to what just changed, and a home page built from real screenshots.
-
March 2026
A public demo you can't break
Going public meant letting strangers sign in as staff. A second stack restored from live every night, credentials removed in the same step, and the guards a public repository needs.
-
February 2026
A REST API next to a server-rendered app
A JSON API for the catalogue and orders that reuses the web's handlers, documents itself, and leaves the server-rendered UI untouched. And why not API Platform.
-
13 – 18 February 2026
Audit week
I ran a structured audit of my own codebase, then worked through it in a week. Backups, failure handling, a deny-by-default firewall, money in exact arithmetic, and an interface pass that cut 15 icon sets to 3.
-
February 2026
Customer Insights
The two-layer reporting design from 2024, extended from products and orders to customers. Segments by lifetime orders, geography by where orders ship, refreshed twice an hour.
-
January – February 2026
Reviews and a support desk
Two new bounded contexts in two weeks. Product reviews with moderation and an eligibility rule, and a support desk built on pools that staff choose to work.
-
3 – 8 February 2026
An app without an SPA
Modals, inline editing and native swipe-back on iPhone, all on server-rendered pages with Turbo. Plus PO Rewind, for undoing a purchase order.
-
January 2026
PHP 8.5, PHPStan level 7, and writing it all down
The month the bounded-context rebuild merged, the test suite was rebuilt for it, static analysis went to level 7 with an empty baseline, and the project got its documentation and first ADRs.
-
October 2025 – January 2026
Rebuilding by bounded context
Three months on a branch, turning folders by type into eight bounded contexts, with commands, handlers, repository interfaces and a new controller pattern, FormFlow. 1,200 files changed, and no change to the schema.
2025
-
October 2025
Domain events, take two
Events that carried whole entities became small, past-tense facts with an ID and what changed. One listener dispatches them after each flush, replacing calls by hand in sixteen classes, and the Doctrine hooks that held the pricing rules gave way to events.
-
October 2025
A public ULID for every URL
Every record behind a URL got a ULID, an identity set in the constructor rather than by the database on insert, added to tables with rows in them through a nullable column, a streamed backfill and a typed ID per entity. Finishing the job, and two bugs, came a year later.
-
June – July 2025
Summer 2025: shaping the production stack
With the app in containers, six weeks of building out what runs around it. Redis for sessions and cache, a hardened nginx, a cron container that runs the simulated business, RabbitMQ, local dev tools and a first k6 load test.
-
April – June 2025
Leaving the Bitnami box
From deploy scripts that asked for a domain name and every secret in turn, to Docker images and a GitHub Actions pipeline that tests and deploys on every push to main.
-
January – March 2025
Winter 2025: 295 tests to 1,014
Three months spent making what existed solid before adding more. A unit and an integration test for every entity, service, DTO and listener, one options class in place of six and a single base for the CRUD handlers, and Tailwind v4.
-
February 2025
Orders built whole
Orders, order lines, purchase orders and their items stopped being assembled with setters. Private constructors and named ones build each in one call, with what it needs to be valid, and the test factories build them the same way.
2024
-
November – December 2024
From a live query to a sales warehouse
Sales reporting started as a live GROUP BY over delivered purchase order items. The next day it became a daily table, then pre-computed summaries, the two layers the reports still use. Then charts, order sales, an overdue orders report and the first KPI dashboard.
-
October 2024
Search, a Mars theme, and going public
The month the project got a public face and its name. Search and filters held in the URL, the Mars theme with 250 AI-generated product images, the public pages, every admin screen locked to staff, and every address moved to Mars.
-
20 September – 14 October 2024
Hardening the status tree
The simulator ran the status rules faster and more often than any person would, and the edge cases came out in a day. A refunded status, a command that re-derives every status, rules for cancelling a line, and rejected purchase orders refunded and sourced again.
-
September 2024
Six days to a supply chain that runs itself
One lifecycle stage a day, from placing an order to delivering it, each a console command with rules meant to look like a real supplier's. The status log became the simulator's clock, a lock let a person take an order out of the machine's hands, and supplier stock started to move on its own.
-
July 2024
Domain events and an audit trail
Orders, lines, purchase orders and their items started raising events, and one status log recorded every change with who made it and when. The services dispatched the events after the flush, by hand, and Doctrine's own listeners were kept apart.
-
April – June 2024
Orders, purchase orders and a status tree
Customer orders and purchase orders arrived together, with prices copied onto each line and one editable purchase order per supplier per order. By June statuses were enums with transition rules, and an order's status stopped being set by hand; it is worked out from what its suppliers have done.
-
February – June 2024
Evolving a CRUD abstraction
Four versions of one idea in four months. A helper that every admin screen shared, then a strategy per entity, then a service per operation, then the business operations as named services of their own, the shape the rest of the year was built on.
-
February – April 2024
Choosing a supplier
Every product can come from several suppliers, so each one has an active source, the cheapest active supplier with stock, with more stock breaking a tie. Listeners re-pick the source when a supplier's stock, cost or status changes, and in April a supplier's range could build the catalogue on its own.
-
January – April 2024
Starting from a login page
The first three months. A Symfony skeleton with sign-up and login became a catalogue with a pricing engine, suppliers, image uploads, a three-tier test suite and a deploy script, and the skeleton called Butterfly became an e-commerce back end called Turtle.
-
February 2024
Pretty prices: markup, VAT and charm pricing
Prices worked out from cost, a markup that cascades from category to subcategory to product, VAT, and a rounding rule that ends a price in .99 or .95. The rounding rules started as a table and became an enum the same day.
-
January 2024
Why I built SupplyMars
A few small tools to try the way PHP is written now, which slowly hardened into a full e-commerce operations suite. Where it started, what I wanted to learn, and how a part-time project kept one shape.
Each post is dated by the period it covers. Posts before November 2026 were written up in November 2026 from the commit history and pull requests on GitHub.
Go Deeper
Behind the Posts
Every change these posts describe is in the repository, alongside the decisions and the docs. The stack page explains how it fits together.