Zaw Htike Aung

Workmoethuzar

Moethuzar

A fashion store built as a modular monolith: a calm storefront on top, dependable checkout, admin and async workflows underneath.

Role
Full stack developer. Product, interface, architecture and operations.
For
Moe Thuzar, a fashion label in Myanmar
When
2026
Live
moesilkandcotton.com
247commits over three months
8core domains modelled
2surfaces: store and admin

The engineering, in short

  • Idempotent checkout: one transaction, one order, however many times the button is pressed
  • Transactional outbox and an idempotent projector keep the wishlist replayable
  • Variant-level inventory and price snapshots on every order
  • A modular monolith: thin routes, use-case services, pure domain rules

Next.js, TypeScript, Prisma, PostgreSQL, Supabase Auth, Cloudflare R2, Upstash QStash, Vitest

The Moe Thuzar store home page: a model in a white dress on a dark set, with the headline New season favourites.
Fig. 1 moesilkandcotton.com, October 2026.

The problem

Moe Thuzar needed more than a storefront. The shop had to handle variants, stock, promotions, guest and signed-in customers, local payment rules and order tracking, and the team needed tools to run all of it.

Payments in Myanmar are often manual: Yangon customers pay cash on delivery, others transfer money and upload proof. Checkout had to respect both.

The Moe Thuzar product grid: three dresses with stock labels, prices in kyat and wishlist hearts.
Fig. 2 Stock labels come straight from variant-level inventory.

How it is organised

I built it as a domain-oriented modular monolith. API routes stay thin: parsing, auth, validation, error mapping. Services own the use cases and the transactions. Domain modules hold pure rules. Repositories appear only where a query earned one.

Inventory lives at the variant level, which is where it belongs for clothing: size and colour change what is in stock.

  • Catalogue, products, variants, images
  • Cart and checkout
  • Orders and order history
  • Promotions and discount rules
  • Shipping rules and transfer methods
  • Inventory logs
  • Wishlist write model, read model and outbox
The Moethuzar admin catalogue table listing products with status, category, price and inventory.
Fig. 3 The admin catalogue: status, price and stock in one table.

Checkout without duplicates

Checkout validates the cart, confirms stock, resolves shipping, applies promotions, chooses the payment policy for the zone and creates the order inside one transaction. An idempotency key means a retry or a double tap cannot create a second order.

Prices are snapshotted on the order, so a later price change never rewrites what someone paid.

The Moe Thuzar store on a phone.
Fig. 4 The store on a phone, where most orders start.

A wishlist you can replay

Wishlist writes update the canonical table and record an outbox event in the same transaction. QStash delivers the event to a projector that updates the read model, and the projector is idempotent. If delivery fails, the view can be rebuilt from the source of truth.

Admin as a product

Staff manage the catalogue, variants, stock, promotions, transfer methods and orders in an admin that got the same care as the storefront. Rate limiting, request IDs and structured error envelopes keep the system observable.