Skip to main content

Client project

MBL

Store operations and digital content distribution

01

Project overview

In operationAug 2026 – present

Two systems for the same client, running on one VPS: an in-store sales system, and a download-link system for digital content on Unity game machines. I delivered both on my own; both are in real operation and still being improved.

02

Context and problem

The client needed two things. The first is an in-store sales system where consultants, cashiers and admins work together on orders, stock and revenue. The hard part is coordination: customers should not carry goods around the store, consultants should not leave a customer to fetch goods, and the last item must not be promised to two people. The second is a download-link system for digital content on Unity game machines placed in the store.

03

Scope and requirements

  • Sales system, consultant (phone): enter the customer’s code to open a cart, search products, check stock, add to the cart, add a note and submit the order.
  • Sales system, cashier (desktop): see the open carts, pick the real goods, add or remove items if the customer changes their mind, then confirm payment or cancel the cart.
  • Sales system, admin (desktop): manage products and stock, see revenue, orders by status and each staff member’s productivity.
  • Download-link system: the game machine shows a short code with a QR; the player opens the link on a phone to download music or images; a dashboard shows download statistics.
  • Requirements were settled step by step into a list of decisions, each recorded with its reason, so whoever continues the work does not have to guess.

04

My role and responsibility

I delivered it on my own: listening to and clarifying requirements, writing the plan, coordinating AI tools in implementation, then reviewing and accepting the result.

Where AI helped. AI tools wrote most of the code from a plan I approved. I am responsible for the requirements, the approach, review, testing, acceptance, security and handover.

05

Business flow

  1. Phone

    Consultant

    1. Receive the customer’s code (queue number)
    2. Open the cart for that code
    3. Search products, check stock, add to the cart
    4. Add a note and submit the order

    Stock is held as soon as an item is added to the cart.

  2. Desktop

    Cashier

    1. See the cart that was just submitted
    2. Pick the real goods; add or remove items if the customer changes their mind
    3. Confirm payment received, or cancel the cart

    Confirming deducts the stock; cancelling releases the held items.

  3. Desktop

    Admin

    1. See revenue and orders by status
    2. Manage products and stock
    3. See each staff member’s productivity
High-level illustration drawn from the project’s requirement documents; awaiting confirmation.

06

System analysis

Roles and permissions

  • Phone

    Consultant

    Create a cart, add or remove items, add a note, submit the order.

  • Desktop

    Cashier

    See every cart, add or remove items, confirm payment received, cancel a cart.

  • Desktop

    Admin

    Manage products and stock, see revenue and staff productivity.

  • Two separate systems on one VPS: a NestJS backend with Prisma and PostgreSQL, run with Docker Compose behind Nginx; the dashboard is built with React and Vite.
  • The roles of the sales system share one backend; the screen shown depends on the role of the signed-in user, not on the domain name.
  • Main data flow of the sales system: cart, stock held, payment confirmed (stock deducted) or cancelled (stock released), the order’s event ledger, then revenue and productivity reports.

07

Decisions and trade-offs

  • Hold stock as soon as an item is added to the cart, until the cashier confirms or cancels

    Why
    So that two customers cannot both buy the last item: no customer is promised an item and then finds out at the counter that it is gone.
    Limit
    An abandoned cart keeps stock that nobody buys, so the cashier or admin needs a way to see and release carts left open for too long.
  • Record who created the cart and who added each line; only admins can see it

    Why
    A cart can pass through several hands (consultant, cashier, a shift change). With data at the line level, changing how bonuses are calculated later only means changing a query, not the data.
    Limit
    The final bonus rule is an operating decision for the store, not a technical one.
  • Revenue is summed from the order’s event ledger, not directly on the order

    Why
    An order can be confirmed, returned, and confirmed again over several rounds. Summing on the order loses track of how the money moved, and a return would be subtracted from the wrong day.
  • Keep the two systems separate and share only the server

    Why
    Each system has its own source code, database and configuration, so deploying one does not restart the other.
    Limit
    There are two sets of configuration and two backup schedules to run instead of one.
  • Add a second domain as a DNS fallback

    Why
    On 29 Sep 2026 the DNS provider had an outage; the second domain, added through Cloudflare, let the systems keep serving with no code change.
    Limit
    Two domains run in parallel, so there is one more thing to monitor.

08

Testing and acceptance

  • Automated tests cover the main business flows (authentication, orders, stock, reports), plus checks of the interface contract.
  • The client’s requirements were settled into a closed list of decisions, with no open questions, before going live; that list is the basis for checking at acceptance.

09

Verified outcomes

  • Both systems are in real operation (since August 2026) and still being improved.
  • Handover documents exist for whoever continues the work.
  • On 29 Sep 2026 the DNS provider had an outage; the systems kept serving thanks to a second domain added through Cloudflare, with no code change.

10

Technology

  • NestJS
  • Prisma
  • PostgreSQL
  • React
  • Vite
  • Docker
  • Nginx
  • Cloudflare