← Back to home中文

Private project | Lead engineer and project manager

Multi-Store Equipment Rental and Operations System

This system handles equipment rentals and day-to-day operations across stores. It includes an online booking site, an operations dashboard, shared login, and payment event handling. Three engineers designed and built it together. I led engineering and managed the project, from clarifying requirements and designing the system to writing frontend and backend code and running acceptance tests.

Client and brand details are omitted. This page covers the overall system design.

Problems to solve

System design

Parts

Booking

① Booking website

Customers can book equipment, register, and sign in by email. The site supports multiple languages. Customers can change bookings and pickup or drop-off plans under My Orders. The site estimates a new price with discounts applied.

React 19, TypeScript, Vite, TanStack Router / Query / Form, Zod, Tailwind CSS, i18next

② Booking API

Handles bookings, member accounts, and payments. It connects to shared SSO as a confidential client and sets up hosted checkout with a third-party payment provider.

NestJS, Drizzle ORM, PostgreSQL, Redis, JWT

Operations

③ Operations dashboard

Store and operations staff use it for orders and refunds, in-store rentals, shuttle and vehicle scheduling, driver and vehicle assignments, shipment records, store transfers, warehouses and products, discount codes, customers, and role permissions.

React, TypeScript, Vite, TanStack Router / Query / Form, Ant Design, GraphQL codegen, Vitest

④ Operations API

The GraphQL API handles shuttle schedules and pricing for order changes. Staff can preview, publish, unpublish, and restore website guides and itinerary content. Images are kept in object storage. An AI agent can manage content through MCP but has no access to other functions.

NestJS, GraphQL, Drizzle ORM, PostgreSQL, Redis, scheduled jobs

Shared login

⑤ SSO service

One login service for all systems. It separates public and confidential clients, manages the lifecycle of several session layers and tokens, and keeps sign-in status in sync across browser tabs.

__Host- cookie, separate public and confidential clients

Payments

⑥ Payment event router

Receives webhooks from the payment provider. It verifies the signature, saves the event, looks up where to send it by order, and forwards it through a queue. Redis prevents replay.

NestJS, BullMQ, Redis, Drizzle ORM, PostgreSQL

Analytics

⑦ Ad and conversion tracking

The site loads GA4 and Meta Pixel only on the production domain and after the user consents. Consent Mode controls ad and analytics storage. Login, callback, and in-store order pages do not report events. Only source attribution parameters are kept from the URL. If users decline, the site withdraws consent and clears ad cookies.

GA4 (gtag, Consent Mode), Meta Pixel, consent banner

Testing, deployment, and operations