Status Of WPPOS

10/06/2026 – Ant

WPPosTill — Application Features Catalog

WPPosTill — Application Features Catalog

Generated: 2026-06-10
Scope: Implemented features plus known gaps and placeholders.
Audience: Operator summary first; developer detail in appendices.

Overview and Architecture

WPPosTill is a LAN-based point-of-sale stack for kitchen and retail operations. Three tiers work together:

┌─────────────────────┐     HTTP + WebSocket      ┌─────────────────────┐
│   Thin Client       │ ◄──────────────────────► │   Edge Server       │
│   (Electron/Android)│                           │   (Node.js + SQLite)│
└─────────────────────┘                           └──────────┬──────────┘
                                                             │
                                                    WooCommerce REST +
                                                    WordPress media API
                                                             │
                                                    ┌──────────▼──────────┐
                                                    │  Website / WooCommerce│
                                                    └─────────────────────┘
LayerRoleTechnology
Thin ClientPOS terminal UI; no business databaseVue 3, Vite, Pinia, Vue Router; Electron (Windows) or Capacitor (Android)
Edge ServerStore LAN hub; SQLite master; sync and printNode.js ≥24, Express, Socket.io, better-sqlite3
WebsiteRemote catalog and order sourceWordPress + WooCommerce (+ WPClever WOOCO)

Design principle: Thin clients talk only to the Edge Server. WooCommerce credentials, printing, and SQLite data stay on the server. State mutations follow CQRS: commands via HTTP; local UI state updates from Socket.io broadcasts.

Platform Feature Matrix

Feature areaSharedElectronAndroidEdge Server
POS checkout
Catalog managementAux windowRoute
Kitchen boardAux windowRoute
End of dayAux windowRoute
Settings & users
Multi-window UX
Native setup.json
Product image LAN cacheDiskNative FS
Label / receipt printing
WooCommerce sync
WAN / internet status toast
Till session / PINIPC syncOverlay

Key Terms

TermMeaning
Edge ServerHeadless Node.js hub on the store LAN; owns SQLite, Woo polling, printing
Thin ClientPOS app with no business DB; all data from Edge Server
Till userOperator identified by display name + four-digit PIN on the Edge Server
Till sessionApp-wide auth after boot PIN; bearer token authorizes till and settings APIs
Till OrderOrder created at POS (ORD-… id)
Web OrderOrder ingested from WooCommerce (WOO-{id})
Local_OnlyProduct on Edge Server but not pushed to website
Permission profileNamed preset (Manager, Cashier, Kitchen, Training) copied onto till users
LAN healthThin Client can reach the Edge Server (GET /api/health top-level ok)
WAN healthEdge Server can reach the public internet (internet.ok on health + Socket.io)

Full glossary: CONTEXT.md

Operator Summary

What staff can do on the till, grouped by work area.

POS and Checkout

  • Browse products on a category-tabbed grid with images, SKU, and price
  • Refresh the catalog manually from the Edge Server
  • Add simple products; adjust quantity with +/- controls
  • Configure composite products (WOOCO bundles) via fulfillment picker
  • Preview composite kit contents; edit composite lines in basket
  • Attach a customer at checkout (create new or walk-in)
  • Payment methods: CASH, CARD, OTH, Charity
  • Apply preset discount percentages at checkout
  • Submit checkout (permission-gated); basket clears on success
  • Navigate to catalog, kitchen, EOD, settings (permission-gated)
  • Switch user or log out; basket preserved across handoffs
  • Real-time product image updates when catalog images finish downloading
  • See a “No internet” banner when the Edge Server loses WAN connectivity (web orders and website sync may lag; local till sales continue)
  • See “Internet restored” briefly when WAN recovers

Catalog Management

  • Search and filter products by name or SKU; category accordion filter
  • Create products via two-step wizard (simple or composite)
  • Edit name, SKU, price, categories, visibility, advanced meta
  • Mark products local-only; control website visibility
  • Upload product photos; convert simple to composite
  • Configure composite sections, groups, and pricing
  • Meal-prep nutrition fields for Meal Preps category
  • Print product labels with quantity selection
  • Draft guards against losing unsaved changes
  • Read-only mode when user lacks edit permission

Kitchen Board

  • View active Till and Web orders on one board
  • Source badges, line items, composite child lines
  • Dismiss Till orders (Web orders dismiss via Woo status on server)
  • Real-time order updates without manual refresh

End of Day

  • Select business date; view sales summary report
  • Review orders by source; view stored EOD records with drift warnings
  • Enter declared totals: cash, Just Eat, Deliveroo, other, direct payments
  • Close the day (settles orders, persists record, optional receipt print)
  • Reprint EOD close receipt

Settings

  • Printers — label and receipt host/port; test prints
  • Store API keys — Woo credentials; test; sync status
  • Website login — WordPress app password; test
  • Users — CRUD till users; PIN and permissions
  • Permission profiles — reusable presets; apply to users
  • Developer — client functions console; rerun setup wizard

Printing

  • Product labels (Brother); order receipts (ESC/POS); EOD close receipts
  • Optional auto receipt on new orders (server config)
  • Test prints from Settings; async jobs with status polling

Security and Sessions

  • Boot PIN gate (four-digit); till session with 12-hour default TTL
  • Switch user (basket preserved); logout with confirmation
  • Lockout after 5 failed PIN attempts (15 minutes)
  • Permission gating on routes, buttons, and server APIs
  • Bootstrap mode when zero till users; empty permissions block sign-in

First-Run Setup

  • Connect to Edge Server; configure Woo and website credentials
  • Configure printers; create first till user (Manager profile)
  • Writes setup.json on the client

Platform Features

Shared Thin Client

All operator features run on both Electron and Android via the same Vue app.

AreaDetails
Views#/, #/catalog, #/catalog/composite, #/kitchen, #/eod, #/settings, #/client-functions
StatePinia: cart, orders, catalog
Real-timeorder_upserted, product_upserted, catalog_image_progress, catalog_images_ready, internet_status
WAN statusGlobal app-shell banner via internet_status; distinct from LAN connection failures
Key pathclient/src/

Electron (Windows Kiosk)

FeatureDescription
Singleton auxiliary windowsCatalog, Composite config, Kitchen, EOD, Client Functions
Cross-window session syncTill session via IPC; aux windows hydrate from main
Setup JSON bridgeFilesystem read/write via main process
Product image cacheDisk under userData/product-images
Catalog draft guardPrompt before closing with unsaved changes
Portable buildelectron-builder → WPosTillTerminal

Android (Capacitor)

FeatureDescription
Single WebViewAll screens as hash routes
Setup JSONCapacitor Filesystem (Data directory)
Product imagesNative file URIs for cache
Cleartext HTTPEnabled for LAN Edge Server
App IDuk.co.basekitchen

Edge Server

Infrastructure

  • Express + Socket.io; SQLite WAL; health check (GET /api/health with LAN liveness + internet WAN snapshot); CLI setup wizard
  • WAN reachability monitor — ICMP ping to google.com every 5 min while up, 20 s while down; logs [Internet] transitions; does not pause sync workers
  • Outbound WAN failure detection — transport errors on public fetch URLs and WooCommerce HTTP 5xx mark WAN down (401/429 do not; LAN hosts ignored)
  • Background daemons: sync, images, print queue, Woo poller, WAN monitor, bootstrap

Authentication and Admin

  • Till PIN sessions; capability middleware; bootstrap mode bypass
  • Admin settings; till user and permission profile CRUD

Catalog, Customers, Orders

  • Full product CRUD; local-only; image upload and LAN serve
  • Customer CRUD with async Woo push; repeat_orders metric
  • Till checkout; Woo ingest; kitchen API; dual Till/Web identity

End of Day

  • Live report; stored records; close day; reprint receipt

Printing

  • Async job queue; Brother labels; ESC/POS receipts; EOD receipts
  • Printer registry; category template resolver; test endpoints

Sync and Composites

  • Bootstrap; re-bootstrap; push/pull reconcile; offline queue
  • WOOCO composite definition, kit browser, materialized tables

Realtime

  • Socket.io broadcasts: order_upserted, product_upserted, catalog_image_progress, catalog_images_ready, internet_status
  • New Socket.io connections receive current WAN snapshot on connect

Key path: server/src/

Integrations (Edge Server Only)

IntegrationPurpose
WooCommerce RESTProduct/customer pull; order create; order poll ingest
WordPress mediaProduct image upload to website
WPClever WOOCOComposite product meta

Known Gaps and Placeholders

GapStatusLocation
Discount code UIStub — endpoint not configuredCatalogProductDetail.vue
checkout.max_discount_percentNot enforced in payment modal UIPaymentMethodModal.vue
Electron aux-window lock overlayPost-#49 follow-up; blocks window open without sessionCONTEXT.md
Android project not in repoGenerated locally; gitignoredclient/android/
Product grid accessAutomatic; not grantable (pos.grid excluded)actionCapabilityRegistry.ts

Appendix A — Vue Routes and Guards

RouteNameViewGuard
#/posPosViewNone
#/catalogcatalogCatalogManagementViewcatalog.open
#/catalog/compositecatalogCompositeCompositeConfigStandaloneViewcatalog.open
#/kitchenkitchenKitchenOrdersViewkitchen.view
#/eodeodEndOfDayVieweod.view
#/settingssettingsSettingsViewAny settings.*
#/client-functionsclientFunctionsClientFunctionsViewNone

Source: client/src/router.ts

Appendix B — API Endpoint Index

Base URL: http://<edge-server-ip>:3005

Health

MethodPathDescription
GET/api/healthLAN liveness + bootstrap flag + internet WAN snapshot (ok, targetHost, checkIntervalMs, timestamps, lastFailureSource)

Products and Catalog

MethodPathDescription
GET/api/productsPOS product list
GET/api/products/:idSingle product
POST/api/productsCreate staff product
PATCH/api/products/:idStaff edit + async Woo push
PATCH/api/products/:id/local-onlyToggle local-only
POST/api/products/:id/imageUpload product image
GET/api/products/:id/compositeComposite definition
GET/api/products/:id/composite-kitComposite kit browser
GET/api/catalog/usability-configCatalog usability
GET/api/catalog/wooco-component-keyWOOCO component key
GET/api/catalog/wooco-composite-groupsSearch WOOCO groups
POST/api/catalog/bootstrapInitial bootstrap
POST/api/catalog/re-bootstrapGuarded re-bootstrap

Orders and Kitchen

MethodPathDescription
POST/api/ordersTill checkout
GET/api/orders/kitchenActive kitchen board
GET/api/orders/:idSingle order
PATCH/api/orders/:idTill kitchen dismiss
GET/api/orders/eodEOD report for date

End of Day

MethodPathDescription
GET/api/eod/recordsStored EOD record
POST/api/eod/recordsClose EOD
POST/api/eod/records/reprint-receiptReprint EOD close receipt

Customers

MethodPathDescription
GET/api/customersList customers
POST/api/customersCreate customer
GET/api/customers/:idGet customer
PATCH/api/customers/:idEdit customer

Sync

MethodPathDescription
GET/api/sync/statusSync diagnostics
POST/api/sync/productsPull products from Woo
POST/api/sync/push-catalogPush catalog reconcile
POST/api/sync/push-customersPush customers reconcile

Printing

MethodPathDescription
POST/api/print/labelLabel print job
POST/api/print/receiptReceipt print job
POST/api/print/jobsGeneric print job enqueue
GET/api/print/jobs/:jobIdPoll job status
POST/api/admin/print/test-labelTest Brother label
POST/api/admin/print/test-escposTest ESC/POS

Authentication

MethodPathDescription
POST/api/till/sign-inTill PIN sign-in
POST/api/till/sign-outTill sign-out
POST/api/admin/settings/sign-inSettings sign-in
POST/api/admin/settings/sign-outSettings sign-out

Admin Settings and Users

MethodPathDescription
GET/api/admin/settingsSettings snapshot
PATCH/api/admin/settings/printersPrinter config
PATCH/api/admin/settings/woocommerceWoo credentials
PATCH/api/admin/settings/website-loginWebsite login
POST/api/admin/settings/test-woocommerceTest Woo connection
POST/api/admin/settings/test-website-loginTest website login
GET/api/admin/till-usersList till users
POST/api/admin/till-usersCreate till user
PATCH/api/admin/till-users/:idUpdate till user
DELETE/api/admin/till-users/:idDelete till user
GET/api/admin/permission-profilesList profiles
POST/api/admin/permission-profilesCreate profile
PATCH/api/admin/permission-profiles/:idUpdate profile
DELETE/api/admin/permission-profiles/:idDelete profile
POST/api/admin/till-users/:id/apply-profileApply profile to user

Composites Admin, Images, Debug

MethodPathDescription
GET/api/admin/composite-itemsQuery composite items
POST/api/admin/composite-items/rebuildRebuild composite items
POST/api/admin/wooco-composites/rebuildRebuild WOOCO composites
GET/images/:catalogProductId.jpgServe cached product image
GET/api/images/statusImage phase status
POST/api/debug/ingest-woo-order/:wooOrderIdManual Woo order ingest

Appendix C — Socket.io Events

EventWhen emittedClient consumers
order_upsertedCheckout, Woo ingest, dismiss, EOD settleuseOrderStore
product_upsertedStaff product create/editPosView, CatalogManagementView
catalog_image_progressImage worker progressPosView image cache
catalog_images_readyBootstrap images completePosView image cache
internet_statusWAN down/up transition; also on socket connectTillAppShell global banner (useInternetStatus)

internet_status payload: { ok: boolean, message?: string }. When ok: false, message is typically No internet — web orders and sync may be delayed.

Server source: server/src/services/RealtimeBroadcaster.ts
Client source: client/src/services/SocketService.ts, client/src/composables/useInternetStatus.ts

Appendix D — Permission Capability Matrix

CapabilityLabelSurfaces
catalog.openManage catalogPOS header, catalog route
catalog.editEdit productsCatalog management
catalog.create_productNew productCatalog management
catalog.composite_configureConfigure compositeCatalog conversion
catalog.upload_imageUpload photoCatalog detail
catalog.print_labelPrint labelCatalog detail
checkout.submitSubmit ordersPayment modal
kitchen.viewKitchen boardPOS header, kitchen route
eod.viewEnd of dayPOS header, EOD route
eod.submitClose EODEOD view
settings.printersPrintersSettings
settings.woocommerceStore API keysSettings
settings.website_loginWebsite loginSettings
settings.usersUsersSettings

Starter Profiles

ProfileSummary
ManagerAll capabilities + all settings + max discount 100%
Cashiercheckout.submit only
Kitchenkitchen.view only
TrainingGrid/cart; checkout.submit: false

Appendix E — Key File Index

Client — Stores and Services

  • Cart/checkout: stores/useCartStore.ts, order/orderEdgeClient.ts
  • Orders/kitchen: stores/useOrderStore.ts
  • Catalog: stores/useCatalogStore.ts, services/catalogEdgeClient.ts
  • EOD: services/eodEdgeClient.ts, services/eodCloseLogic.ts
  • Print: services/printService.ts, services/printEdgeClient.ts
  • Session: services/tillSessionClient.ts, services/tillCapabilities.ts
  • WAN status: composables/useInternetStatus.ts, composables/internetStatusLogic.ts, layouts/TillAppShell.vue
  • Realtime: services/SocketService.ts

Server — Routes and Services

  • Entry: server/src/index.ts, routes/healthRoutes.ts
  • WAN monitor: services/internetReachabilityMonitor.ts, services/internetReachabilityProbe.ts, services/outboundInternetFetchGuard.ts
  • Auth: routes/tillAuthRoutes.ts
  • Catalog: routes/catalogRoutes.ts, db/productRepository.ts
  • Orders: routes/orderLanRoutes.ts, services/OrderIngestionService.ts
  • EOD: routes/eodRoutes.ts, services/eodCloseService.ts
  • Print: routes/printRoutes.ts, print/PrintJobQueue.ts
  • Sync: services/OfflineSyncEngine.ts, CatalogBootstrapService.ts

Shared

  • shared/wooco/ — Composite logic
  • shared/permissions/ — RBAC
  • shared/receipt/ — Receipt layout

Appendix F — Related Documentation

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Basket