E-commerce / Outsource

VAS Printing

An on-demand print e-commerce platform for the North American market, operating as an execution engine that orchestrates the entire order lifecycle across a network of partner print shops.

Overview

VAS Printing is a print-industry e-commerce platform for the North American market — not an ordinary online print website, but a production orchestration system (execution engine). The business owns no print shop; instead it sells standardized internal products and automatically routes each order to the best-fit print shop in its partner network, optimizing for cost, production time and delivery region.

The system serves two customer groups at once: retail customers and resellers/agencies — wholesale ordering, custom pricing, and anonymous delivery (blind shipping).

The product comprises three applications: a WebStore for customers and resellers, an Admin CMS with 16 operational modules, and a Core Engine handling asynchronous business logic. Scale: a TypeScript monorepo of roughly 190k lines of code, 77 data entities, 291 API endpoints, 9 permission roles, an end-to-end E2E business test suite, and a fully automated CI/CD pipeline.

The problem to solve

Running a print-broker model manually hits four bottlenecks: pricing is uncontrollable because each print shop's costs shift constantly by quantity tier, material and production time — pricing via spreadsheets leads to selling at a loss or losing orders; orders 'drift' when price and shipping change after the customer has ordered, causing disputes and revenue mismatches; production fragments when a multi-item order must be split across several print shops and shipments, impossible to track by hand as volume grows; and there is no operational data — no way to measure real profit margin, each shop's on-time delivery rate, or reseller commissions.

How we approached it

  • The business architecture is organized into six linear layers, each with clear data boundaries and no permission to skip ahead.
  • Product Normalization: standardize the internal print catalog and map it to the partner print shops' products.
  • Pricing Decision: compute price from real cost plus margin, then publish it as an immutable price snapshot.
  • Order Lock: lock the entire price, shipping fee and chosen print shop in an atomic transaction right at checkout.
  • Fulfillment & Supplier Execution: push orders automatically via the print shop's API, or fall back to a controlled manual processing queue.
  • Shipping & Tracking: ship by production group, consolidating tracking across multiple carriers.
  • Finance / Marketing / Reports: cash flow, commissions, campaigns and reports — read only from locked data.
  • An inviolable design principle: the frontend only reads the price snapshot and never computes price itself; marketing cannot edit prices outside the Pricing Engine — eliminating the entire class of 'displayed price differs from charged price' bugs.

What the product does

Multi-audience WebStore

One storefront for both retail customers and resellers: resellers get custom pricing, wholesale ordering and anonymous delivery (blind shipping).

16-module Admin CMS

All operations in one admin system: products, pricing, orders, print shops, shipping, finance, commissions and reports.

Automatic print-shop routing

Each order is automatically routed to the best-fit print shop by cost, production time and delivery region.

Order terms locked at checkout

Price, shipping fee and print shop are hard-locked at order time and cannot drift afterward.

Technical challenge

Problem

In a print-broker model, costs and shipping fees fluctuate constantly. If the price shown when a customer browses differs from the price charged at payment, or the price changes after ordering, the system sells at a loss, triggers disputes and breaks reconciliation — a class of bug that must be eliminated entirely, not merely reduced.

Solution

Checkout runs in a single transaction: it creates an immutable price snapshot and shipping snapshot, locks the product-variant records in a fixed lock order to rule out deadlocks, and re-validates every price commitment before commit. Combined with the principle that the frontend only reads the snapshot rather than computing price, every number the customer sees is exactly the number charged and reconciled — on data that cannot be altered retroactively.

Results

  • Eliminated the entire 'displayed price differs from charged price' class of bugs by locking the price snapshot at checkout.
  • No business event is lost even when a service dies mid-operation, thanks to an outbox pattern written within the same business transaction.
  • Runs on 12+ asynchronous queues with per-task-type retry and exponential backoff.
  • Standardized and automated the entire order lifecycle — pricing, production, shipping, reconciliation — in a single system.

Highlights

  • TypeScript monorepo ~190k LOC · 77 entities · 291 API endpoints
  • 3 apps: WebStore, 16-module Admin CMS, asynchronous Core Engine
  • Atomic Snapshot Lock — immutable price lock at checkout
  • Outbox pattern over 12+ queues — no business event lost

Explore other products