05Case study

ShiYueGuo · Japanese sweets shop

A complete e-commerce site, built from the front end to the database, where you can actually check out and pay.

The live site takes about 45 seconds to wake up on first visit.

Role
Solo design and development
Year
2023 · iSpan bootcamp capstone
Type
Full-stack e-commerce
Deploy
Render (two services) + Google Cloud SQL
ShiYueGuo home page: illustration of Mount Fuji and cherry blossoms
  • 4 stepscustom gift-box flow
  • 3gift-box sizes
  • PayPalonline payments
  • RWDphone, tablet, desktop

Background

My capstone for iSpan's front-end engineering bootcamp: a complete online store for ShiYueGuo, a fictional Japanese sweets brand. I handled the visual design, front end, back end and database myself and deployed it, so you can sign up, place an order and pay with PayPal.

Features

Catalogue

Products load from the API and appear as category cards that open a detail page.

Accounts

Sign-in and sign-up share one page, with regex validation as you type and a password-strength hint.

Custom gift box

Four steps: choose one of three sizes → place sweets in the box → pick a card and message → confirm.

Checkout

Review the cart, recipient and payment method, pay with PayPal, then see the order and order history.

Architecture

ShiYueGuo architecture Browserphone · tablet · desktopReact SPAReact RouterReact-Bootstrapon RenderExpress REST APIbcrypt · JWTon RenderMySQLGoogle Cloud SQLPayPalreact-paypal-js
The front end talks to the REST API with a JWT; front end and API are deployed as two services, with the database on Google Cloud SQL.

Key design decisions

01

No plain-text passwords

Passwords are hashed with bcrypt before they reach the database and compared by hash at sign-in.

02

Sessions with JWT

A JWT is issued at sign-in, kept by the front end and sent with later requests for the API to verify.

03

Stop bad input early

Fields are validated as you type with a password-strength hint, cutting failed submissions.

04

Break a complex flow into steps

The gift box is four steps that each do one thing, confirmed together before going into the cart.

05

Be upfront about free-tier limits

Front end and API run as separate services with the database on Google Cloud SQL; the ~45-second cold start is stated on the site.

Stack

  • React
  • React Router
  • React-Bootstrap
  • axios
  • react-paypal-js
  • Node.js
  • Express
  • MySQL (mysql2)
  • bcryptjs
  • JSON Web Token
  • Render
  • Google Cloud SQL