Linho & Co.
E-commerce storefront with admin
A linen store with sizes and colours tied to live stock, Pix and card checkout, CEP-based shipping and an admin that shows today's sales live.
Concept project · fictional brand and sample dataApp in Portuguese
- 14
- automated tests passing
- 35 ms
- p95 to place an order: stock, order and e-mails
- 30 min
- how long a Pix charge holds the reserved stock
- 69 ms
- median for a filtered catalogue page (SSR)
The brief
Small fashion and home brands in Brazil need a catalogue that handles sizes and colours properly, Pix next to cards, shipping by CEP, coupons and confirmation e-mails. Ready-made themes cover the storefront but not the parts that cost money when they fail: stock that never oversells, prices recomputed on the server, and a payment provider that can be swapped.
What I built
- Catalogue filtered by size, colour, price and stock, with every filtered view as a shareable URL
- Product pages where the image recolours with the chosen variant and sold-out sizes are disabled
- Bag with coupons, CEP-based shipping and a nudge showing how much is left for free shipping
- Checkout with Pix (QR code and copy-paste code) or card, through a payment-provider interface
- Stock reserved when the order is placed and returned when a card is declined or the Pix expires
- HTML order e-mails stored and previewed in the admin instead of being sent
- Admin with live sales, orders, inventory movements and coupons; sitemap and structured data for SEO
The decision that mattered
Overselling ruled out at the database
Placing an order runs in one database transaction that lowers each variant's stock only if enough units are left. If any line can't be reserved, the whole order rolls back and the shopper keeps their bag. A test checks that the last unit can't be sold twice, and the same conditional update works on PostgreSQL.