Loading...
Loading...

The story of building Srimaccafes — a full-stack e-commerce platform for a specialty coffee brand — covering Redis caching, Razorpay webhook idempotency, Cloudinary image delivery, and building an admin dashboard for non-technical staff.
Srimaccafes is a production e-commerce platform I built for a specialty waffle cup. The client needed an online store that could handle high traffic, deliver images fast, process payments reliably, and — most importantly — be manageable by non-technical staff after launch.
waffle cup product pages are image-heavy. Every page load hitting MongoDB for product data would be slow and expensive. I implemented Redis caching at two levels:
Result: 94% cache hit rate. Pages load in under 200ms even with dozens of high-res coffee images.
Payment webhooks fire at least once — sometimes twice. Without idempotent handling, a single successful payment could create duplicate orders, duplicate inventory deductions, and duplicate shipping labels.
The solution: maintain a processedWebhooks collection in MongoDB. Each webhook carries an order_id. Before processing any webhook, check if that order_id has already been processed. If yes, return 200 immediately without processing. If no, process and mark as done.
This eliminated duplicate orders entirely.
The client's staff had no coding experience. The admin dashboard needed to be intuitive enough for them to manage inventory, update product descriptions, upload new product images, and view orders — without any training.
Key design decisions:
Was this post helpful?
Comments
0Be the first to share your thoughts.