About the project
DUNAMIS is a B2C e-commerce platform specialized in the optical segment (prescription frames, sunglasses, lenses and accessories), built from scratch as a white-label product. It covers the full purchase journey: a variant-aware catalog, unified checkout and a content engine for inbound marketing.
The problem
Optical retail needs more than a generic store: product variants, prescription-specific attributes, an anonymous cart that survives login and a payment flow that confirms orders in real time. Off-the-shelf stacks usually handle each of these only halfway.
The solution
- Product catalog with variants, textual search and dynamic category filters.
- Anonymous cart and favorites with automatic merge after login (guest-to-auth).
- Unified checkout with MercadoPago (PIX and credit card), HMAC-validated webhooks and real-time order updates over WebSockets.
- Blog CMS with a rich editor (Tiptap), SEO by slug and a double opt-in newsletter.
Architecture and stack
The backend runs on Node.js 22 with Express 5 under a Modular Hexagonal Architecture (Ports & Adapters), keeping domain use cases decoupled from transport (REST and WebSockets) and infrastructure. Persistence uses PostgreSQL 17 with Prisma 6, media lives in Cloudflare R2 behind a storage factory, and payments run through a provider-agnostic Strategy interface.
The frontend is Next.js 15 (App Router) with React 19, TanStack Query and Table, shadcn/ui and Better Auth. Integration and property-based tests (fast-check) run against a dedicated PostgreSQL container to keep cart and coupon math consistent.
Code and ownership
The business-logic source code is confidential. The public repository is a technical case study documenting the architecture, the engineering decisions and the stack used in production.
