Skip to content
youdede

Food orders, price lists and invoices out of email and WhatsApp.

As CTO and shareholder, I built a private B2B platform from scratch. Orders, prices and documents in one place, used by real businesses.

BuildB2B food commerce

Role
CTO, co-founder and shareholder
Period
July 2022 – December 2025
Product
B2B platform built from scratch
Focus
Order, invoice and reorder
Stack
Angular · TypeScript · RxJS · Firebase

In food wholesale, every customer has an agreement of their own.

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.

HTMLCSSSass / SCSSJavaScriptAngularTypeScriptRxJSFirebaseNode.jsGitHub Actions

The challenge

Ordering should be as simple as messaging.

The producer had to piece together information from chats and emails. I wanted to simplify that work while keeping the direct contact with shops.

10Messages for three orders9:1211:20

Frantoio Verdi’s phone

  • Bottega Van Dijk
  • Gastronomia De Molen
  • Deli Centrum
  1. Bottega Van DijkGastronomia De MolenA changing orderThe right version is the latest message, on WhatsApp or by email.
  2. Deli CentrumOld price listEvery customer has their own price, and each has a different PDF.
  3. Bottega Van DijkA price to find“The same as last time” is in a chat from September.
  4. Bottega Van DijkAccountsManual invoiceLine items, VAT and details are entered again by hand, and then the invoice has to be found.

At 11:20Three orders scattered across ten messages and two apps. Hardly the most efficient way to work.

The decisions

The relationship between producer and shop determined what to build.

A catalogue for a few
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

Only businesses came through the door.

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.

The features

The same product could have a different price for every customer.

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.

  • €52.60€54.00−€1.40

  • €51.80€54.00−€2.20

  • €49.50€54.00−€4.50

Frantoio Verdi

Oil & condiments

Extra virgin olive oil

€54.00Excl. VAT

Add to cart

The record

There is much more to declare about a food item than its name.

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.

Dried apricots

  1. Food, drinks and tobacco
  2. Food
  3. Fruit and veg
  4. Dried fruit

VAT9%from category

Dried apricots

Subject-centred crop600 × 600 · WebP

Ingredientsquantities

  • ApricotsOpen Food Facts99.5%
  • Sulphur dioxideOpen Food FactsAllergen0.2%
  • Rice flourProducer’s own0.3%

AllergensEU list

Sulphites

Values per 100 g

Energy285 kcal

Protein5 g

Carbohydrate59 g

of which sugars56 g

Fibre14.4 g

Sodium25 mg

Expiry

Best before12months

Order and payment

After checkout, the order moved forward one step at a time, all in the same place.

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.

Order2024-04-0001
Gastronomia De Molen
26/04/2024 · Frantoio Verdi
StatusOpenFulfilled
PaymentOpenPending
  • Extra virgin olive oil€144.003 × carton of 69%
  • Dried apricots€36.004 × 500 g bag9%
  • Glass oil cruet€120.008 × unit21%
Subtotal€300.00
Invoice activity log
  • Draft26/04/2024Frantoio Verdi
  • Sent26/04/2024Frantoio Verdi
  • Viewed26/04/2024Gastronomia De Molen
InvoiceSentViewed
INV-240426-0001
Date26/04/2024
Due date03/05/2024+ 7 days
DescriptionVATAmount
Extra virgin olive oil9%€144.00
Dried apricots9%€36.00
Glass oil cruet21%€120.00
Shipping60%9%€7.20
Shipping40%21%€4.80
VAT by rate
9%on €187.20€16.85
21%on €124.80€26.21
Taxable€312.00
Total€355.06
Shippingsplit by rate
9%€180.00
21%€120.00
To split
€7.20€4.80
9%12.00 × 60%€7.20
21%12.00 × 40%€4.80
Delivery notePDFNL
  • Extra virgin olive oil3 × carton of 618 bottles
  • Dried apricots4 × 500 g bag4 bags
  • Glass oil cruet8 × unit8 units

The foundations

One product that opens in the browser and installs on a phone.

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

What happens after you write to me.

Every project starts with a conversation. Here’s how it goes, from your first message onwards.

  1. 01 · Today

    Tell me what you’re trying to do and what’s getting in the way.

  2. 02 · Within one working day

    I read your message and reply personally, usually suggesting a twenty-minute call.

  3. 03 · The call

    We explore the options and see whether I can help.

  4. 04 · The first step

    If it makes sense to continue, we agree on the scope and the first step of the engagement.