Back to Projects

Full-Stack · E-Commerce

Rose Misk — Luxury Fragrance Storefront

A security-hardened luxury fragrance storefront with server-authoritative pricing and a Vitest-tested commerce core.

The luxury storefront — a branded shopfront leading with best-sellers and new collections.
Faceted product browsing — filter fragrances by category and type, resolved on the server.
The admin command center — revenue, orders, customers, and pending fulfilment at a glance.

The business problem

What was at stake

For a premium brand, a checkout that can be tricked into the wrong price — or that oversells stock it doesn't actually have — turns straight into refunds, chargebacks, and reputation damage. The business needed a storefront where the price a customer pays is always the price you set, the last item in stock can only be sold once, and the experience holds together even when the small details go wrong.

What this protects

Business guarantees, in plain terms

Checkout can't be gamed.

Every price is re-calculated on the server at the moment of payment; whatever the shopper's device claims is discarded. They pay your price — never a forged one.

You never sell stock you don't have.

Inventory is locked at the instant of purchase, so two shoppers can't both buy the last bottle — no oversells, no refund-and-apology emails.

No sale is lost at sign-in.

A guest's cart survives logging in — items merged, nothing dropped — so you don't lose the order at the very last step.

Under the hood

Rose Misk is a full-stack storefront and admin dashboard for premium fragrances, built on the Next.js 16 App Router. Its defining trait is a layered security architecture where authentication and validation “live next to the data.”

Architecture & Approach

Every privileged read and write is a guarded, Zod-validated Server Action; an optimistic edge middleware handles routing while DB-backed guards enforce the real authorization. Checkout re-derives every price from the database and decrements stock with atomic conditional updates, so two shoppers can never buy the last unit.

Engineering Highlights

Server-authoritative pricing (client totals discarded); Decimal(10,2) money end to end; idempotent, race-safe cancel-restock; a transactional guest→user cart merge that never loses items; server-derived review ratings; and one canonical revenue rule. The commerce core is regression-tested with Vitest (60/60 passing) under strict TypeScript.

Built With

Next.js 16React 19TypeScriptTailwind v4Prisma 7PostgreSQLBetter AuthZodVitest

Have a project like this?

Tell me what you're building — I'll show you how I'd make it secure, fast, and correct.

Start a conversation