← Back to Selected Work
CASE STUDY 02

Shree Collections D2C Platform

A full-stack, serverless direct-to-consumer (D2C) e-commerce web application and single-page admin management portal engineered for boutique retail fashion.

Scope
Serverless D2C Platform & Admin Hub
Role
Full-Stack Architecture & Cloud Security
Category
E-Commerce · Payment Infrastructure
Deployment
Firebase Hosting & Cloud Functions v2
JavaScript ES Modules Firebase Cloud Functions v2 Cloud Firestore Razorpay API (Card & UPI) HMAC-SHA256 Verification Firebase Auth & OAuth Cloud Secret Manager Role-Based Access Control Resumable Storage Uploads Single-Page Admin Dashboard
Engineering Summary
"Zero idle server cost with maximum revenue security: Shree Collections recalculates canonical order totals on the server in Cloud Functions before initializing Razorpay payment orders, eliminating client-side price tampering while maintaining sub-second user responsiveness."

01 / Concept & Product Architecture

Transitioning boutique retail fashion to direct-to-consumer digital channels requires balancing zero fixed infrastructure overhead with enterprise-grade payment safety. We engineered a serverless hybrid architecture: static frontend assets load instantly from a global CDN, while all transactional operations—including payment initialization, coupon rules, and inventory updates—are executed inside isolated Node.js serverless functions guarded by strict database security rules.

02 / Core Engineering Pillars

Serverless Razorpay & HMAC Security
Processes Card and UPI digital payments tailored for Indian retail shoppers. Uses Node.js native `crypto` to perform cryptographic HMAC-SHA256 signature verification (`${orderId}|${paymentId}`) against payment gateway secrets stored in Cloud Secret Manager.
Server-Side Canonical Price Engine
Eliminates client-side price tampering by fetching current product documents and shipping exemption rules directly from Firestore inside Cloud Functions, recalculating order costs to the exact paise before creating gateway transaction orders.
Idempotent Webhook State Guards
Features an event-driven `razorpayWebhook` listener operating inside Firestore atomic transactions (`db.runTransaction`), ensuring payment confirmation even if the buyer closes their browser window during bank processing.
Single-Page Operational Admin Hub
Provides store managers with real-time revenue analytics, inventory low-stock alerts (≤ 5 units), drag-and-drop Firebase Storage asset uploads, promo code creation, and full order fulfillment tracking (`pending` → `delivered`).

03 / Platform Engineering Checklist

Every layer of the Shree Collections platform was engineered to satisfy strict security, reliability, and business execution standards:

BUILD WITH CAARVN LABS

Need a high-performance e-commerce or serverless platform?

From serverless cloud functions and payment gateway integrations to real-time database rules and operational admin dashboards, we build digital products engineered for security and scale.