Context
This began as a client build for a small bakery. The work was well along when the owners closed the shop and emigrated, so it never went live in their store. By then the system worked end to end. I finished it under a fictional brand, Bloom & Batter, and kept it running as a demo anyone can click through.
The problem
Custom cake orders usually arrive as a WhatsApp thread: photos, half-decided options, a price worked out by hand, and details that get lost between the chat and the kitchen. The customer doesn’t see what they are getting until collection.
What I did
The build puts a visual configurator, an AI preview and Payfast checkout into one system, working from one menu and one order brief. An order runs like this:
- The customer works through five columns: cake type, flavour and filling, how the cake looks, add-ons, and preview. The total updates with every choice. It opens at the plain base cake, with no extras pre-selected.
- Generate Cake Preview sends the design to an image model and shows an impression of the finished cake.
- Wedding cakes, orders above a set total and any order with an inspiration photo go to the bakery for a quote instead of straight to payment, because a decorator has to look at them first.
- Checkout hands over to Payfast. The order is marked paid when Payfast’s server notification arrives, not when the browser comes back, because a redirect can be forged and a customer may close the tab.
- The customer gets a tracking page. The bakery works the order from a password-protected board that shows the same brief the customer approved, with the earliest collection date worked out from the cake’s lead time.
One catalogue file drives all of it. Every option, its price, its lead time, its tile image and the phrase used to describe it to the image model live in one place. The builder, the price, the order brief, the board and the image prompt are all derived from that file, so adding a menu item is one edit. The 34 tile photos on the menu were drawn by the image model from the same descriptions.
The design lives in the URL. A cake in progress is encoded into a query parameter, with no cookie or session behind it. That is how checkout receives the cake and how “back to the builder” restores it, and it means a design can be shared as a link.
Image renders are the running cost, so each preview is filed under a hash of only the choices that change the picture. Ask for the same cake twice and the second request reuses the stored picture.
The server works out the price and the preview prompt again from the design, and an order looks up its preview by the design hash. A price or image link sent from the browser is never used.
The Payfast integration handles three details that each fail with a misleading error: the sandbox merchant needs its passphrase, Payfast strips punctuation from item names before it re-signs them, and the order of the fields is part of the signature.
The result
The demo runs at bakery.yourdesign.co.za. These are the gaps between it and a live shop:
- Orders are held in memory and lost whenever the server instance restarts, which includes every deploy. The original owners declined a database. Storage sits behind an interface, so adding one means writing one implementation.
- Payments run against the Payfast sandbox, so no real payment is taken.
- The menu and prices belong to the demo brand, not to a real bakery.
- There is no automated test suite. Changes are checked by building the app and clicking through it.

