← All projects
web2026

Havens Commerce

Havens Commerce

Havens is a full-stack e-commerce platform for a luxury jewelry storefront, built as a NestJS API paired with a Next.js storefront in a single monorepo. It covers real authentication (JWT access/refresh, email verification, password reset), a product/category catalog, cart and checkout, Stripe-powered payments with webhook reconciliation and refunds, order history, saved addresses, and product reviews all role-gated across USER, ADMIN, and DRIVER roles. The auth layer uses atomic compare-and-swap refresh-token rotation with idempotent replay to eliminate race-condition logouts under concurrent requests.

/ Stack

Next.jsNestJSTypeScriptPrismaPostgreSQL

/ Highlights

  • Full-stack build: NestJS REST API + Next.js App Router storefront in one monorepo
  • JWT access/refresh auth with email verification and password reset flows
  • Stripe-powered checkout with webhook reconciliation and admin-issued refunds
  • Role-based access control (USER/ADMIN/DRIVER) with admin endpoints for products, orders, payments, and users
  • Product/category catalog with cart, checkout, order history, and saved addresses
  • Purchase-gated product reviews only verified buyers can review a product
  • Audit-logged admin mutations across products, orders, and payments
  • Atomic CAS refresh-token rotation with idempotent replay, closing a race condition that caused premature logouts on concurrent requests
  • Server-backed wishlist replacing client-only local storage, synced across devices for signed-in users
  • Admin can reply to and remove replies on customer reviews, shown inline as a storefront response
  • Automated review-request emails sent after order fulfillment, deep-linking back to the account page
  • Polished admin dashboard UX: confirm dialogs for destructive/role changes, refined audit log, users, and reviews tables
  • Cloudinary-backed image uploads for user avatars, replacing plain URL-string fields with real file storage