Case study / 07

Jewelry Store - Full-Stack E-Commerce Platform

A complete production-grade e-commerce platform for jewelry retail - two Next.js frontends (customer storefront with Material-UI + admin dashboard with Tailwind CSS), an Express.js API, Stripe payment processing, transactional emails via Brevo, and automated PDF invoice generation.

Status
Selected work
System context
TypeScript, Next.js, React, Express.js
Source
Public repository

01 / System behavior

Interactive proof

A project-specific technical mechanism based on the recorded architecture and implementation context.

Interactive proofJewelry Store - Full-Stack E-Commerce Platform
Checkout session
Hosted payment
Verified webhook
Idempotent order update
Email / invoice
Server-confirmed lifecycle

Context and intent

Built as a graduation project, this platform deliberately chose ambition over simplicity - not a CRUD app with a login page, but a full production-grade system where you have to think about payment security, email deliverability, image optimization, multi-role access control, and webhook idempotency.

The Stripe integration handles the full payment lifecycle: the API creates Checkout Sessions with line items and metadata, Stripe redirects to their hosted payment form, and webhooks drive the actual order status. The key insight baked into the implementation: never trust the client-side redirect - only the verified webhook signature is the reliable signal. Every webhook is verified using stripe.webhooks.constructEvent(), and the handler checks idempotency to prevent processing the same payment event multiple times.

03 / Architecture record

Architecture

A structured reading of the architecture recorded with this project.

Architecture recordJewelry Store - Full-Stack E-Commerce Platform
Customer Storefront
Admin Dashboard
Backend API
Read the full architecture record

Three applications working together:

• Customer Storefront (magazin/) - Next.js 14 + Material-UI for product browsing, cart management, and Stripe checkout • Admin Dashboard (admin/) - Next.js 14 + Tailwind CSS for product management, order processing, analytics, and invoice generation • Backend API (server/) - Express.js with Sequelize ORM handling business logic, JWT auth, Stripe webhooks, Brevo emails, and PDFKit invoices

The API connects to PostgreSQL via Sequelize with a rich relational schema including hierarchical categories (parentId self-referencing). Stripe handles payment flow with webhook-driven order status updates. Brevo dispatches transactional emails. PDFKit generates invoices on-demand.

Docker Compose orchestrates the entire stack for local development. GitHub Actions CI/CD pipeline handles testing and deployment.

How the system is shaped

Transactional emails (order confirmations, shipping notifications, password resets) flow through Brevo with templated inline-CSS HTML that degrades gracefully across email clients including Outlook.

When an admin marks an order as shipped, the system generates a PDF invoice on-demand using PDFKit - streamed directly to the browser with no file storage. A custom table renderer handles column widths, alternating row backgrounds, and automatic page breaks.

The security stack includes: bcrypt with 12 salt rounds, JWT with 15-minute access tokens and single-use refresh token rotation, Helmet.js security headers, rate limiting on auth endpoints, parameterized queries via Sequelize, CORS with strict origin whitelisting, and Joi schema validation on every endpoint.

05 / Selected highlights

Selected implementation notes

The decisions and workflows that carry the most explanatory weight.

  1. Stripe Checkout integration with server-side session creation, webhook signature verification, and idempotent event handling - never trusts client-side redirects
  2. Customer storefront (Next.js + Material-UI) with product browsing, advanced filtering (price, material, gemstone), persistent cart, and secure checkout
  3. Admin dashboard (Next.js + Tailwind CSS) with analytics, product CRUD with image uploads, order management with status transitions, and PDF invoice generation
  4. On-demand PDF invoice generation with PDFKit - custom table renderer handling column widths, alternating row backgrounds, and automatic page breaks, streamed directly to the browser
  5. Transactional emails via Brevo with inline-CSS HTML templates for order confirmations, shipping notifications, and password resets
  6. Hierarchical category system with parentId foreign key - supports nested structures (Jewelry > Rings > Engagement Rings) rendered as breadcrumb navigation

06 / Supported metrics

Verified project record

Applications
3
Database Entities
9
Payment Provider
Stripe
Test Layers
3
Security Measures
8
Email Provider
Brevo

Technology in context

TypeScript, Next.js, React, Express.js, Sequelize, PostgreSQL, Stripe, Brevo, PDFKit, Material-UI, Tailwind CSS, JWT, Docker, Mocha/Chai, Supertest, Selenium

View source repository