muhaiman.dev
Muhaiman A.S.
Full-Stack Web Application

NSMAH — Multi-Vendor E-Commerce Logistics & Checkout Architecture

Implementing delivery class management, coupon validation engines, and checkout state stabilization on a live multi-vendor platform.

RoleFull-Stack Engineer
CategoryFull-Stack Web Application
Platform TypeMulti-Vendor E-Commerce
DeploymentCoolify + Docker
Technologies & Tags
Next.jsTypeScriptTanStack QueryMongoDBZodDockerCoolify
NSMAH — Multi-Vendor E-Commerce Logistics & Checkout Architecture

Overview & Monorepo Foundation

NSMAH is an active multi-vendor e-commerce platform built on modern TypeScript web standards. The application was structured as a monorepo using Next.js, TanStack Query, MongoDB, and Zod for schema validation. While the baseline multi-vendor catalog was already functional, the platform needed granular shipping rules, a promotional discount engine, and critical state fixes across the customer checkout journey.

My role was to design delivery class controls within the admin interface, build an end-to-end coupon system, wire both into the vendor and storefront layers, and resolve synchronization bugs affecting live orders.

Delivery Classes & Multi-Vendor Shipping Rules

E-commerce logistics require flexible shipping calculations based on product dimensions, merchant locations, and fulfillment requirements. I built a delivery class management interface within the admin panel that allowed administrators to define custom delivery rules and assign them to specific product lines.

Integrating these rules into the checkout pipeline required calculating shipping fees accurately when a customer purchased items from multiple vendors within a single shopping cart. I ensured delivery calculations and vendor splits executed cleanly without breaking existing merchant settings or disrupting active store listings.

Full-Stack Coupon & Discount Engine

To support promotional campaigns, I implemented a full-stack coupon validation engine across the backend APIs and frontend checkout views.

The engine handled promotional discount rules, expiration windows, minimum order thresholds, and usage limits directly within the application layer. On the storefront, I built responsive discount application forms with clear error feedback, updating subtotal calculations, tax rules, and vendor payout figures in real time upon successful code redemption.

Checkout State Stabilization & Containerized Deployment

A major part of this engagement involved diagnosing and resolving checkout inconsistencies. I fixed state synchronization issues where cart items, selected shipping addresses, and payment calculations fell out of sync during navigation. This eliminated hydration mismatches and race conditions during multi-step checkout transitions.

To protect live transactions during active updates, I containerized the monorepo using Docker and managed deployments through Coolify. This allowed us to maintain an isolated staging environment where the client could thoroughly test shipping calculations, coupon logic, and checkout flows before promoting updates to production.