Client project · Web app

Montes del Acebo

Orders came in on WhatsApp, stock was counted by hand, and the history of each lot was spread across invoices, notebooks and delivery notes. I built the app that put all of it in one place. The team used it every day, and it was how they showed health inspectors where any lot came from.

When
2024
Status
Used daily until the business was sold
  • Angular
  • Spring Boot
  • Java
  • PostgreSQL
  • Docker
  • Jenkins
  • OpenAPI

A while ago a food distributor got in touch. Their problem was easy to describe: too much paper, and too many places to look. Orders came in on WhatsApp, got confirmed over the phone, and an hour later someone would text to change them. Half of what was going on in the business lived in somebody's head, and nobody could say for sure where anything was.

The day was full of questions a computer should have been answering. Did we order the chicken for Thursday? How much is left from Monday's batch? Who bought the last of lot 90? Has that order gone out yet? Every question meant a phone call, someone stopping what they were doing, and a few lost minutes. Now multiply that by everyone in the warehouse.

Pushing back, with a prototype

After our first meeting, the client showed me how he pictured it: one screen where you'd enter everything in one go. Supplier, prices, lots, temperatures, weights… one long form, top to bottom.

The sketch the client gave me: receiving, stock, butchery and staff roles, all on one sheet.

To him it was the obvious way to do it. I thought it was a pretty serious mistake, and I told him so.

He was still convinced, so instead of arguing I built a quick prototype exactly the way he wanted and showed it to him. I wanted him to see the problem for himself. Does it make sense for the person unloading a pallet at the dock to be typing in purchase prices and VAT while they write down the lots that just arrived? In the same form? With the same permissions as the office?

That first version worked, but it mixed receiving with accounting, showed every field to everyone, and turned a thirty-second job into a screen you had to scroll through.

The first prototype: receiving, pricing, butchery, sales and stock crammed into a few huge forms.

What the app really had to do

We kept talking, and this time we got to the point. They didn't need every bit of paperwork digitised. They needed to know when things arrived, what was done with them and who they were sold to, record the temperature and condition of the goods coming in and going out, and keep each expiry date with its lot.

Once that was clear, the features more or less picked themselves:

  • Full traceability for any lotSearch a lot and you see the supplier, every butchery split and every customer who bought from it.
  • Expiry alertsYou get a warning before a lot expires, not after.
  • Live inventoryAvailable, reserved and in-transit stock, plus what's due to arrive and when, updated with every movement.
  • Automatic delivery notesThey come straight from the movement itself. Nobody has to type them up again.
  • Goods in, goods out and butcheryThe three operations that actually change what's in the cold room.
  • Role-based permissionsEach worker only sees their part, which is also what keeps the app easy to use.

We also left pricing out, which made the first version a lot smaller. A colleague already handled the commercial side, and did it well. All the system had to do was let her link every entry and exit to a delivery note number.

The app, screen by screen

A quick note: the screens below and the public demo are the prototype we used to agree on the workflow. The final app went further, with returns, stock write-offs and expiry settings.

With all that, I rebuilt the prototype around the way they actually work and walked him through it. You can try that version yourself in the live demo. Each screen answers one of the questions that used to end in a phone call.

“Where's this lot?”

Type in a lot number and you get its whole story: which supplier it came from, which splits it went through and which customers it ended up with. Before, you had to piece that together from an invoice, the butchery notebook and a pile of delivery notes. Now it's one search box.

Traceability graph for one lot: the purchase, every split and every sale.

“Did it arrive in good shape?”

Every delivery is logged against its purchase order: temperature on arrival, a food safety checklist, the lots on the pallet and the delivery note number. Nothing goes into stock until that record exists. The receiving report downloads as a PDF from the same screen.

Temperature, checklist, lots and delivery note, recorded while the truck is being unloaded.

“It's been cut up. Now what?”

Butchery is where traceability usually gets lost: one lot goes into the room and a dozen products come out. When you log a split, the weight of the original lot is shared out across those products, and each new lot inherits the history of the one it came from. That's why the search above can keep following the trail past the butchery room.

A lot of whole chicken turned into wings, breasts, thighs and bones. Every piece can still be traced back to where it came from.

“What have we got to sell?”

For each product you see how much is available, reserved and in transit, and what's due to arrive and when. It updates as soon as there's a purchase, a split or a sale. Nobody has to go into the cold room and count to know what they can promise a customer.

Stock for each product, updated as it changes.

“What went out, and how?”

Dispatch works the same way as receiving: temperature, the same checklist, the expiry date of each lot, the number of boxes and a record of who prepared it and who delivered it. If a customer calls about a lot six months later, the answer is already there.

The same checks as on the way in, plus who prepared it and who delivered it.

How it's built

I did the whole project on my own, from the first meetings to deployment, so I stuck to tools I know well and kept the structure strict enough that changes stayed cheap.

  • Hexagonal architectureThe core of the Spring Boot backend (lots, movements, splits and their rules) is plain Java, with no framework or database code in it. REST, PostgreSQL and file storage are adapters around it, so any of them can change without touching the business logic.
  • API-first with OpenAPII defined the API in OpenAPI before writing the code and generated the models from that contract, so the Angular frontend and the backend always agree on what they're sending.
  • Role-based securitySpring Security with JWT. Each role only gets the endpoints and screens it needs, which is how the person at the loading dock never sees a price.
  • Delivery notes in the backgroundThe backend generates delivery note PDFs asynchronously and stores them in S3. Logging a delivery never waits for the document; the file is there to download once it's ready.
  • Automated deploymentsJenkins builds the Docker images and deploys them to Albgott, my private cloud, where the project had its own isolated network.

The result

The client wanted to start using it as soon as there was something to use. Since it ran on infrastructure I already had, there was no time lost choosing a host or setting up a pipeline, and from the first day he could log in and follow the progress. As soon as a minimum version worked, the team started putting real data into it.

From then on it was used every day, and all the lot management and traceability lived in one place. Sales reps used to promise orders over WhatsApp without knowing if there'd be stock on the day; now they could see what was in the cold room and what was due to arrive, and when. In health inspections, showing where a lot came from and where it went was a matter of typing its number.

The app stopped being used when the business was sold. Until then, nothing got lost, and finding anything took as long as typing a lot number.

← All projects