Case study · Headless e-commerce

Headless commerce and real-time POS sync for a multi-location retailer

Greentown Discount, a retailer in Windsor, Ontario with several locations, needed its online store, in-store POS and back office to agree on stock, customers and orders in real time. I worked across their WooCommerce store, a Laravel 12 IMS/POS backend and a Next.js storefront.

ClientGreentown Discount (Canada)
BackendLaravel 12 · MySQL
StorefrontNext.js on Vercel
IntegrationsGreenline POS · Moneris
The challenge

One source of truth across stores, POS and web

With several physical stores, the online catalogue had to reflect what each location actually had in stock. Orders placed online had to reach the POS, and cancellations or completions at the till had to flow back. Customers expected accounts, order history and reliable payments.

The original setup was a WooCommerce store synced with Breadstack through webhooks. I worked on that integration, analysing and documenting the two-way product sync, webhook directions and performance, before the business moved to a headless architecture.

The solution

A Laravel backend that speaks WooCommerce

The core is a Laravel 12 IMS/POS application that powers the admin and point of sale, and serves the storefront through a WooCommerce-compatible API (wc/v3 and wc/store/v1), plus its own API for stores, coupons, reviews, chat and customer accounts. Storefront access uses consumer key and secret authentication, and secrets never leave the server.

  • Per-location, in-stock-only catalogue: each store shows only what it can actually fulfil.
  • Greenline POS sync: products, inventory, customers and sales sync every five minutes, plus continuous order-status reconciliation. Signed inbound webhooks give near-instant updates, with the scheduler as the backstop. Storefront customers and orders are pushed back to Greenline.
  • Verified card payments: Moneris charges are recorded in a charge ledger and checked at order creation (a real charge, the correct store, an amount at least the order total, and not reused) before an order is marked paid.
  • Customer accounts: registration, login, password reset, order history and self-service cancellation, all ownership-checked on the server, plus signed public invoices with a real barcode.
  • Back-office modules: orders, customers, promotions and coupons, analytics, pickup and delivery with a driver app, live chat, reviews and segments, with per-module permissions and per-store user scoping.

The customer-facing Next.js storefront runs on Vercel and talks to this API, so it stays fast while the backend handles the complexity.

Outcome

Results

Scheduled POS sync interval
5min
API namespaces served (wc/v3, wc/store/v1, ims/v1)
3
Real-time stockStore inventory synced with Greenline POS every 5 minutes and via signed webhooks.
Accurate cataloguesEach location shows only items it can fulfil.
Safe paymentsEvery card charge verified server-side before an order is marked paid.
Fast storefrontNext.js on Vercel, decoupled from back-office load.

Tech stack

  • Laravel 12
  • PHP 8.2
  • MySQL
  • Vue 2 admin
  • Next.js
  • Vercel
  • WooCommerce API
  • Greenline POS
  • Moneris
  • Webhooks

Need your store, POS and back office in sync?

I build integrations that keep inventory, orders and customers consistent across every channel.