Side project

E-commerce service

A store built for real card checkout, selling digital learning products alongside physical goods. Catalog, cart, and orders share one schema; image bytes live on a file server. Card details stay with the payment provider.

Period
2023.03 — 2023.12
Role
Plan · Design · Build · Ship · Improve · solo
Stack
Next.js, Prisma, file server, cart and orders

Process

  1. Plan

    A store for physical and digital products with real card payment.

  2. Design

    Orders and payment states on one schema; images split out.

  3. Build

    Next.js and Prisma web, a native iOS client.

  4. Ship

    Every PR gets a preview build; merging promotes it to production automatically.

  5. Improve

    Added digital learning products alongside physical goods.

System diagram 6 components · 5 connections Play the flow and trace each connection

Overview

A web store for physical and digital products, with card checkout, catalog, cart, and orders in one Next.js app and Prisma schema. iOS is a native client. Card details stay with the payment provider.

Why I built it

Cart, order, and payment state are transactional. Putting them on the schema was a way to set the domain and the migration plan directly.

When images piled up, the web process should not carry them. An in-house file server accepts uploads, stores bytes, makes derivatives, and issues signed URLs. Payments keep only a billing key from the provider. The Expo shell is gone.

System

Web: Next.js UI and API, Prisma, MySQL, NextAuth v4.

iOS: a native client. There is no Android client.

File server: product and notice image upload, width derivatives, signed read URLs. The web app stores file metadata only.

Mail and SMS go through AWS SES and NCloud SENS. Shipping lookup uses an external tracker.

See this in the system diagram

Architecture and data

Next.js serves pages and APIs and reaches MySQL through Prisma. Large images go to the file server so uploads do not time out on the web process.

Catalog is Product, category, option groups and combinations. Purchase is Cart, Order, OrderItem, Address. Beside that sit Review, Coupon, Point, Banner, Notice, Event. There is no community board.

Screens and protection

Store: list, detail, search, cart, order, payment, shipping. Account: profile, addresses, coupons, points. Admin: orders, products, coupons, stats.

Passwords are one-way hashes. Verification codes and alerts are checked on the server with cooldowns and caps. A billing key remains instead of a card number.

Stack

Web: Next.js 16, React 19, Prisma 6, MySQL, NextAuth 4, Tailwind, Ant Design, Mantine, Radix, PortOne.

App: native iOS. In-house file server.

Notes

Hard parts: order and payment transitions, plus stock and cancel, needed many idempotent cases in the API. Option combinations and cart availability needed tests. Large uploads hit timeouts and proxy limits, so signed-URL expiry was adjusted more than once.

What held: orders, carts, and coupons stay on one Prisma schema and one Next.js app. Binary IO sits on the file server, so the web process stays a coordinator. Card numbers never pass through this server.