Get in touch

I'm always excited to take on new projects and collaborate with innovative minds.

Phone Number

+92 305 9971189

Based in

Lahore, Pakistan · remote

Social

HomeHector Case Study

Hector Case Study

Enterprise operations platform · Full system review

28+ Modules
Enterprise ERP · Case Study

HectorMulti-brand operations platform

One system for several brands. Each brand's orders, stock, and users stay isolated from the others. It covers 11 sales channels through warehouse, supply chain, HR, and analytics.

Built as a full-stack engineer at Retrovgames. The platform belongs to them. This page describes the system I designed and shipped there.

RetroFamRetro vGamesRelated brands

Both store portals open after the customer signs in.

Hector ERP
Hector enterprise operations platform dashboard
7
Business Domains
28+
Modules
11
Sales Channels
20+
API Integrations
100+
Mongoose Models
80+
Route Files

Business Context

Problem, approach, and outcome at a glance

The Challenge

A multi-brand e-commerce operation was running orders, inventory, procurement, fulfillment, returns, and HR across disconnected tools — manual handoffs, duplicate data entry, and no single source of truth under heavy transactional load.

The Solution

Hector unifies the entire operational lifecycle in one platform: order intake from 11 channels, warehouse fulfillment with hardware integrations, supply chain procurement, inventory (dual-system migration), post-sale workflows, analytics, and granular RBAC across every module.

The Impact

Three to four people were doing this order work by hand. The same flow now runs with one person. Hector processes 200 to 300 orders a day across the marketplaces. Report corrections that used to be pulled from separate tools now come out of Hector in one click.

11 Sales Channels

Unified order intake pipeline

Shopify (RetroFam)Shopify (Retro vGames)Walmart US / CA / MXWooCommerceNeweggTemuAmazon SP-APIeBay ScrapperMercari (CSV)Manual OrdersAmazon (Dedicated View)

7 Business Domains · 28+ Modules

Every domain is open. Collapse any section you do not need.

Order Processing

Central hub ingesting orders from 11 channels simultaneously — Shopify (RetroFam & Retro vGames), Walmart US/CA/MX, WooCommerce, Newegg, Temu, Amazon SP-API, eBay Scrapper, Mercari CSV, and manual orders.

  • WFO — Walmart Fulfillment with USB scale integration via SerialPort and ShipStation rate shopping
  • TOF — Temu native label system with PDF rendering and label history
  • Dedicated Amazon order processing view and order analytics dashboard

Order Fulfillment + SSOT

Post-pick workflow: packing with photo capture, dropship OOS tracking, ShipStation label generation, and SSOT — a pre-computed aggregate per order updated via BullMQ.

  • Performance & activity logs for fulfillment teams
  • Multi-carrier rate shopping through ShipStation

eBay Scrapper

Separate from marketplace eBay — manages buyer accounts, generates labels via EasyPost, tracks shipments via webhooks, with dedicated health check routes.

Sourcing

Staff submit sourcing requests; sourcers create, purchasers pick up. Role mapping via sourcerPurchaserMappingModel with dashboard and timeline logs.

Purchasing

Purchasers act on sourcing requests — pending queue, active listings, returned listings, cross-referenced with SNP data.

SNP — Seller & Purchaser Dashboard

Feature-rich supply chain hub: SKU listings, real-time auctions via Socket.IO, price management feeding the Pricing Engine, supplier management, and competitor scrape crons via BullMQ.

Procurement Management

Most complex module — PO creation with multi-step forms, box tracking, document attachments, shipping details, landed cost allocation, kits, targets, barcode receive scans, CSV bulk import, and multi-warehouse delivery routing.

Inbound

Receives procurement at warehouse — parcel and bulk shipments, flagged orders, unidentified parcels, activity logs, and period-scoped inbound inventory valuation.

Internal Warehouse Transfer

Mirrors procurement pattern for inter-warehouse stock moves — boxes, documents, costs, shipping, serial numbers, activity logs, and dashboard with multi-warehouse support.

Inventory Management (New)

Future-state inventory: master SKU quantities warmed in memory at startup, warehouse scoping, ledger for every stock movement, cycle counts, exceptions, reports, and WFS overlay.

Inventory Management (Legacy)

Original system still live during migration — coexists with new module; no deletion until cutover complete.

Virtual Inventory

All-time in/out calculation per SKU — answers 'what do we have right now?' across procurement, transfers, sales, and returns.

WFS Inventory

Walmart Fulfillment Services stock tracking at Walmart FCs with replenishment pipeline service.

Products

Master catalog — base products, kits/bundles, serial number tracking with auto-generation, marketplace listings, and cross-platform SKU mapping.

Scan

Warehouse floor tool with GlobalScannerContext, barcode + QR lookup, camera scanning via Quagga2 and ZXing.

Brand Returns (RMA)

Full return lifecycle — customer and manual returns, defect reports with activity logs, physical receiving, auto-sync from Shopify/WooCommerce/Walmart crons, Freshdesk ticket creation, ShipStation label tracking.

Reshipment

Re-sends when original shipment fails — links to dropship and FFJ records with export support.

Repair & QA (Refurbishment)

Multi-stage QA: scan-in, workshop repair tracking, PDF testing guides, troubleshooting docs, multi-warehouse QA stages.

Trade-Ins

Reads trade-in data from Customer Portal MongoDB, staff comments locally, email notifications, two-way reply webhook, portal sync.

Customer Portal Management

Portal users, coupons, reviews, FAQs, Retrocoins loyalty, and product sync management.

Email Configuration

Per-event email rules, customizable HTML templates, activity logs, Omnisend marketing events, custom SMTP (Namecheap Private Email).

Refunds

Unified refund management — approval workflow, platform execution, Shopify-native refund posting, unified log across platforms.

Sellerboard Analytics

Platform-by-platform sales analytics — Shopify live; Amazon, eBay, Walmart, Newegg built with per-platform P&L analysis.

Pricing Engine (CPS)

Competitive price system scraping 10+ competitor sites (DKOldies, GameStop, Amazon, eBay, Walmart, Best Buy, Newegg, PriceCharting, etc.) via BullMQ + Cheerio with scrape health monitoring.

Export Center

Download any data as Excel/CSV — platform sales, inventory reports, custom configs via ExcelJS and xlsx.

Administration & Live Monitoring

Real-time active user monitoring via Socket.IO presence — login/logout, page activity, heartbeat, stale presence cron. Admin-only view.

SLA & Tickets Management

Internal ticketing with assignment, escalation, SLA departments, activity audit trail, handling time tracking, real-time due-soon alerts via Socket.IO.

User Management

Granular RBAC from modulesRegistry.js, login history, session logs, failed login tracking, user activity logs, multi-company structure.

Employee Management

Employee records separate from auth users with payroll data per employee.

Attendance

Clock-in/out with kiosk mode for warehouse tablets, validation rules, and company attendance configuration.

Time Off Management

Leave requests with approval workflow, time off types, and per-employee allocation management.

Payroll

Calculation engine, PDF payslip generation, tax configuration, and payroll recalculation support.

Key Architecture Decisions

Patterns that make Hector production-grade

01

Separate Frontend & Backend Repos

Hector-client (React 19 + Vite) and the Hector server (Node.js/Express) are maintained as separate repositories — clear ownership boundaries with REST APIs and shared domain contracts connecting both codebases.

02

JWT + Granular RBAC

Authentication via JWT + express-session. RequirePermission on the client and requirePermission() middleware on the server. Every module registers in modulesRegistry.js with configurable role permissions.

03

Eventually-Consistent SSOT

Single Source of Truth is a pre-computed master collection — updated asynchronously via BullMQ workers after fulfillment events. Never written to directly; always query-optimized.

04

Silent Warehouse Printing

QZ Tray signs certificates server-side (RSA) and sends labels directly to thermal printers — ShipStation, WFO, and TOF native labels print with zero browser dialogs.

05

Dual Inventory Migration

Legacy inventory coexists with the new Inventory Management module during migration. New features ship only in the new system; zero downtime cutover strategy.

06

Hardware + Real-Time Layer

DYMO USB scales communicate via Node.js SerialPort; weight telemetry streams to browsers over Socket.IO for WFO workflows. Multi-warehouse scoping across procurement, transfers, inventory, and QA.

13
Background Crons
2
BullMQ Workers
6
WebSocket Events
40+
Client Page Folders

20+ Third-Party Integrations

Marketplaces, shipping, hardware, queues, and more

Marketplace / Sales Channels

7 integrations
Shopify API

Order sync, webhooks, refunds — RetroFam & Retro vGames

Walmart Marketplace

US/CA/MX orders, WFO labels, returns, tracking

WooCommerce REST

Order sync, webhooks, returns, hold/cancel

Newegg Marketplace

Order sync, label tracking

Temu Open API

Order sync, TOF native labels, after-sales

Amazon SP-API

Order processing

eBay + EasyPost

Scrapper module labels and tracking

Shipping & Fulfillment

3 integrations
ShipStation v1 + v2

Core shipping backbone — labels, rate shopping, tracking

ShipEngine

Rate shopping supplement

EasyPost

eBay scrapper labels, WOF tracking webhooks

Printing & Hardware

3 integrations
QZ Tray

Silent thermal label printing — RSA-signed certificates

SerialPort / DYMO Scales

Live USB weight for WFO workflow

Camera Scanners

Quagga2, ZXing, jsQR for warehouse floor

Cloud, Email & CRM

5 integrations
AWS S3

Packing photos, documents, uploads

Hostinger SFTP

Product image hosting

Nodemailer + SMTP

Transactional emails across all modules

Omnisend

WooCommerce dropship marketing events

Freshdesk

CRM tickets from brand returns

Database & AI

2 integrations
Google Cloud Vision

OCR and document scanning

MongoDB Atlas × 2

Hector DB + Customer Portal DB

Real-Time & Queues

3 integrations
Socket.IO

Presence, auctions, SLA alerts, scale telemetry

BullMQ + Redis

SSOT sync, scrapes, label tracking jobs

node-cron

Returns sync, presence cleanup, cross-ref sync

Core Technology Stack

Full Stack Engineer · Separate repos — React 19 + Vite frontend, Node.js/Express backend

React 19Node.jsExpressMongoDB AtlasSocket.IOBullMQRedisJWT + RBACAWS S3ShipStation

Need an operations platform at this scale?

Hector represents the kind of enterprise infrastructure I design and ship — multi-channel order ops, warehouse integrations, and RBAC across dozens of modules.