Back to Projects
Next.js Fashion Storefront & Shopping Experience
Click to Expand
Feature 1 of 3

Next.js Fashion Storefront & Shopping Experience

High-performance customer storefront featuring responsive product catalog, coupon promotions, pre-order reservation engine, and PromptPay checkout.

Nida

Fullstack Engineer & System Architect

E-Commerce Platform for Fashion Brand

Demo Video2026

An e-commerce platform engineered on a Turborepo monorepo architecture, featuring a Next.js customer storefront, a React back-office admin portal, dual decoupled NestJS APIs, and PostgreSQL with Prisma ORM. Powered by deterministic background job automation via BullMQ and Redis for auto-cancellation of unpaid orders and stock restocking, accompanied by a Dual-Token authentication engine with Refresh Token Rotation and Redis session invalidation.

Technologies Leveraged

TurborepoTurborepoNext.jsNext.jsNestJSNestJSPostgreSQLPostgreSQLPrismaPrismaRedisRedisBullMQBullMQDockerDockerTypeScriptTypeScriptTailwindCSSTailwindCSS

The Problem & Challenge

E-commerce retail faces severe operational challenges: stock-hoarding by unpaid orders and bots locking up inventory, unreviewed return requests leading to customer dissatisfaction, payment gateway webhook race conditions, and vulnerabilities in administrative access that could compromise customer financial transactions and stock accuracy.

The Engineering Solution

I engineered a unified Turborepo monorepo with automated background job queues using @nestjs/bullmq and Redis to deterministically govern order timeouts (auto-cancelling unpaid orders and restocking within 15 mins for PromptPay). Additionally, I implemented a Dual-Token authentication architecture featuring Refresh Token Rotation with token reuse detection, one-time token admin invitation onboarding, a pro-rated net price calculation engine for partial refunds, and Omise payment webhook idempotency.

Technical System Architecture

1

Turborepo Monorepo structure managing Next.js Storefront, React Admin Portal, NestJS Store API, NestJS Admin API, and shared Prisma/Zod validation packages.

2

BullMQ & Redis 7 background worker cluster managing delayed jobs for unpaid order auto-cancellation, 48-hour return review timeouts, and 5-day delivery auto-completion.

3

Dual-Token Authentication (15-min Access Token + 7-day Refresh Token) with cryptographic Token Family Rotation, replay attack revocation, and Redis-backed session invalidation.

4

Zero-Knowledge Admin Onboarding via Redis-backed One-Time Setup Tokens (48h TTL) sent through automated email invitations without hardcoded initial passwords.

5

E-Commerce Core Engines: Pre-Order reservation quotas, Coupon abuse-prevention engine, pro-rated net cost refund ledger, and weight-based shipping matrix.

6

PostgreSQL 16 relational database with Prisma ORM, implementing comprehensive audit trails (StockMovement and AdminAuditLog) for 100% operational traceability.

Key System Highlights

Automated Order Lifecycles

BullMQ & Redis delayed workers handle auto-cancellation, restocking, and return timeouts deterministically.

Dual-Token Authentication

15-min JWTs + 7-day Refresh Tokens with cryptographic rotation, replay attack detection, and instant multi-device revocation.

Turborepo Modular Monorepo

Decoupled Next.js storefront, React admin back-office, and separate NestJS APIs sharing Prisma and Zod packages.

Pro-Rated Refund Ledger

Automated item-level net cost breakdown ensuring precise partial refunds and immutable transaction audit trails.