Whoopi Kids

StockSync

Transfer Hub

StockSync Cleanup Audit

Non-destructive audit — no changes made. Generated 2026-04-21. Admin use only.

13

Active Pages

3

Pages to Hide

10

Stale/Deprecated Functions

5

Entities Needing Review

3

Likely Stale Entities (safe to delete after confirmation)

These workflows are critical and must not be disrupted:

  • Lightspeed live lookup (lightspeedSearch + lightspeedInventory)
  • Transfer request/fulfillment flow (TransferRequest → FulfillOrder → createLsTransfer)
  • POS sale creation (createLsPosSale)
  • Shopify image enrichment (shopifyImageLookup + shopifyImageSync)
  • Twilio customer notifications (sendCustomerNotification)
  • Package label printing (PackageLabel + LabelPreview)
  • Receive scan at destination (ReceiveScan)
  • Multi-item customer orders (CreateOrder + OrderItem + CustomerOrder)
  • Admin panel (AdminPanel + Lightspeed/Shopify auth flows)
  • Analytics (Analytics page)

Rule: Hide before deleting. Archive before archiving.

Complete these in order. Do not skip to deletion.

Step 1

Hide ProductSearch, InventoryView, and CreateRequest from navigation

Remove these 3 pages from pages.config.js PAGES object and from App.jsx routes. Do NOT delete the files yet. They still exist and can be restored if anything depends on them unexpectedly.

Risk: Low

Step 2

Archive debug functions: debugLsTransfer, debugPosSale, debugBarcode, testShopifyConfig

These are dev-only diagnostic probes not called by any page or workflow. Move to an 'archived' folder or just leave them but label them clearly as ARCHIVED in the file header.

Risk: Low

Step 3

Delete createPosTransfer and the old shopifyCallback backend function

createPosTransfer is a stubbed placeholder — it generates a fake POS ID and is superseded by createLsTransfer. shopifyCallback (backend) is superseded by the ShopifyCallback frontend page + shopifyExchangeCode. Both are safe to delete.

Risk: Low

Step 4

Mark buildSearchIndex, buildCatalogIndices, patchVariantSystemSkus, cleanupDuplicates as DEPRECATED in their file headers

Add a comment at the top: /* DEPRECATED — superseded by [replacement] — do not invoke in production */. Do not delete yet.

Risk: None (read-only change)

Step 5

Audit database record counts in ProductSearchIndex, InventoryByStore, Product, ProductVariant

Check if these tables have any records. If they are empty or very small, safe to delete after step 1 confirms nothing breaks.

Risk: None (read-only investigation)

Step 6

Review StyleMatrix, SizeVariant, BarcodeIndex for active reads

After steps 1–4 are done, re-audit whether any remaining active code path reads StyleMatrix or SizeVariant. If nothing does, these can be deprecated. Do not rush this step.

Risk: Medium — needs confirmation

Dashboard
ACTIVE

Main landing page. Summary metrics, quick-scan button, pending action lists. Actively used.

ScanScreen
ACTIVE

Primary scan + product lookup flow. Uses lightspeedSearch + live inventory. Core workflow.

Requests
ACTIVE

Transfer request list with tabs (For Me, I Sent, In Transit, etc). Core workflow.

RequestDetail
ACTIVE

Full request detail with action buttons (Fulfill, Not Found, Notify Customer, Complete). Core workflow.

FulfillOrder
ACTIVE

Source-store fulfillment flow — item picking, scan verification, mark sent. Creates LS transfer + POS sale. Core workflow.

PackageLabel
ACTIVE

3×3 shipping label print page. Used after fulfillment. Core workflow.

ReceiveScan
ACTIVE

QR/barcode scan at destination store to mark package as arrived. Core workflow.

CreateOrder
ACTIVE

Multi-item customer order creation — consolidates cart items from ScanScreen into TransferRequests. Core workflow.

Notifications
ACTIVE

In-app notification list. Used in nav bar. Actively used.

AdminPanel
ACTIVE

Admin-only panel: Stores, Users, Lightspeed auth, Shopify auth. Actively used.

Analytics
ACTIVE

Metrics and charts — accessible to managers + admins via menu. Actively used.

ProductSearch Safe to hide first
DEPRECATED CANDIDATE

OLD search flow — searches local StyleMatrix/SizeVariant catalog using a local index. Replaced by ScanScreen which does live Lightspeed lookups. Not in bottom nav. Safe to hide from routing first, delete later after confirmation.

InventoryView Safe to hide first
DEPRECATED CANDIDATE

OLD inventory detail page — reads from StyleMatrix + SizeVariant. Only reachable from ProductSearch. Since ProductSearch is deprecated, this has no active entry point. Safe to hide alongside ProductSearch.

CreateRequest Safe to hide first
DEPRECATED CANDIDATE

OLD single-item request creation form — uses legacy Product/ProductVariant entities (the old catalog system). The current flow creates requests via ScanScreen → CreateOrder → TransferRequest with ls_item_id. This page is not linked from any active navigation path. Safe to hide.

LightspeedCallback
ACTIVE

OAuth redirect callback page for Lightspeed auth flow. Must stay — it handles the popup close + postMessage. Not user-facing but required.

ShopifyCallback
ACTIVE

OAuth redirect callback page for Shopify auth flow. Must stay. Not user-facing but required.

Legend

ACTIVE
DEPRECATED CANDIDATE
LIKELY STALE
UNKNOWN DEPENDENCY
Safe to hide first— Hide from nav/routes before deleting