E-commerce Shopping App — Mobile API
Catalog, Cart, Secure Checkout & Order Tracking for Shoppers

Customer-facing API for a shopping app. Shoppers browse categories, search and filter products, manage a cart and wishlist, check out securely, and follow their orders until delivery. Promotions and coupons are applied server-side.
Architecture & System Design
A Node.js and Express API. Catalog endpoints are read-heavy, so category trees and product listings are cached in Redis and invalidated when products change. Checkout re-prices the cart on the server, reserves stock, creates a payment, and only confirms the order once payment succeeds.
- Server-side cart pricing so totals can't be manipulated from the app
- Redis caching for categories and listings keeps browsing fast
- Stock reserved during checkout to avoid overselling
- Order status updates pushed to the shopper's device
Engineering Challenges
Overselling Popular Items
During promotions, many shoppers could check out the last units of a product at the same time.
Reserved stock atomically at checkout with conditional updates, releasing reservations if payment fails or times out.
Stock levels stay correct even under sudden traffic spikes.
Trustworthy Totals
Prices, discounts and delivery fees calculated in the app could drift from the server's rules.
Made the API the only place prices are calculated; the app displays the server's breakdown.
Customers always pay exactly what the business rules say.
Core Features
Catalog & Search
Categories, search, filters and sorting with paginated results.
Clean Code
1// Reserve stock for every cart item, or none of them2"color:#c792ea">export "color:#c792ea">async "color:#c792ea">function reserveStock(db, cart) {3 "color:#c792ea">await db.transaction("color:#c792ea">async (trx) => {4 for ("color:#c792ea">const item of cart.items) {5 "color:#c792ea">const updated = "color:#c792ea">await trx("products")6 .where("id", item.productId)7 .andWhere("stock", ">=", item.quantity)8 .decrement("stock", item.quantity);910 "color:#c792ea">if (!updated) "color:#c792ea">throw "color:#c792ea">new OutOfStockError(item.productId);11 }1213 "color:#c792ea">await trx("carts")14 .where("id", cart.id)15 .update({ reserved_until: trx.raw("NOW() + INTERVAL 10 MINUTE") });16 });17}Want something like this for your business?
I design and build full stack products end to end. Tell me about your idea and I'll get back to you with a plan.