Food producers and shops in the Netherlands work this way: the supplier knows the buyer and gives them their own price. That direct relationship was the thing to preserve. Everything around it, though, relied on messages and documents recreated by hand.
That is why I co-founded Atrium, as CTO and shareholder. The product, architecture and code were my responsibility: I decided what to build, then built it, from the first empty file through to releases in production.
Access by invitation kept the producer’s prices, customers and relationships private. An open catalogue would have exposed the very thing their livelihood depended on.
Food has its own rules
I modelled the product around everything that comes with a food item. A generic e-commerce schema with a few extra fields would have cost less, but fallen short of what the label required.
WhatsApp stayed
Unexpected issues went back to WhatsApp, with the message already written. Invitations could start there too. Removing it would have asked shops to change their habits before they even joined.
Orders went beyond checkout
Invoicing, shipping, payment and reordering all lived in the same product. Leaving them out would have sent the work back into email.
Who joins
Onlybusinessescamethroughthedoor.
The producer invited customers by email or on WhatsApp. I tied registration to business registers. Anyone joining looked up their company in the Dutch register, or in a European database if they were outside the Netherlands. The product filled in the name and address.
A Gmail address was not enough: personal email addresses were rejected. The email address had to be verified, and the phone number was checked against the rules for its country.
I built the catalogue around this. The producer listed an item just once, with its pack formats: bottle, carton, case. Then they decided what to charge each customer.
Each shop signed in and found its own prices, the ones agreed with the supplier.
I designed the product record starting from the label, not the catalogue: everything The European regulation on the provision of food information to consumers. It sets out what must appear on a food label and how. requires to be declared was part of the item. Ingredients with their Quantitative ingredients declaration: the percentage of an ingredient stated on the label. It is required when the ingredient appears in the product’s name or characterises it. percentages, the 14 allergens, the nutrition declaration per 100 g, the date of minimum durability or use-by date, and alcoholic strength by volume.
Each part also existed on its own. The producer saved ingredients, allergens and nutritional values once and reused them across other items: a new product did not mean filling everything in from scratch.
The record did the rest. Ingredients came from Open Food Facts, the open food products database, and a line pasted from the label split into separate ingredients automatically. The producer added any that were missing. The browser checked the photo, then the server automatically cropped it to a square centred on the product.
The category determined the VAT rate: choose from 800 categories and subcategories, and the right rate was already there. Alcoholic strength by volume only appeared where it was needed.
I brought the work after the sale into the product too. The producer marked the order as fulfilled and created the invoice from it: sequential number, line items and VAT broken down by rate. They checked the preview and sent it. The customer received it in their own language, and the delivery note was ready to print.
Delivery and payment each had their own status on the order. Anyone opening it could see where things stood without scrolling back through a conversation. Reordering simply meant starting from a previous order.
I added another calculation for shipping. In a cart with products at 9% and 21%, the shipping cost was split between the two VAT rates, in proportion to each one’s share of the total.
Due date03/05/2024001234567890123456789301234567890123456789/001234567890123456789501234567890123456789/201234567890123456789001234567890123456789201234567890123456789401234567890123456789+ 7 days
The people using it did not want to change how they worked, and every extra step was a reason not to join. That is why I wrote it as a A web application that opens in the browser and installs on a phone like an app. One thing to write and update, instead of a different app for every phone., in Angular 15 and TypeScript: it opened straight from a link, and anyone who wanted to could install it as an app. When a new version came out, it notified them and updated itself. While someone was working, the data could change in front of them: a revised price, an order moving to a new status. RxJS kept it in sync, so the screen always showed where things stood.
Underneath was Firebase, and everything started from a simple rule: money did not go through the browser. An order was not edited: it grew one event at a time (created, fulfilled, invoiced, sent, viewed, paid), and only the server could add one. The server also assigned invoice numbers, one after another, with no duplicates. For everything else, the database rules decided, document by document, who could read what and who could write it.
Anything that could not live in the browser ran in Cloud Functions: looking up a company in business registers, checking and cropping photos, sending emails.
Atrium spoke English and Dutch, from the interface to the products, and the emails followed: Postmark sent 16 different types of email, from order confirmation to invoice, each in both languages. Invoices and delivery notes, meanwhile, were generated as PDFs directly in the browser.
Staging and production were two separate projects, so a new version could be tested before it reached customers, and each could be deployed with a single command. Once in production, I knew what was happening: every user action went into an activity log that survived a lost connection, and new orders came through on Slack.
Working together
Whathappensafteryouwritetome.
Every project starts with a conversation. Here’s how it goes, from your first message onwards.