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│
└─────────────────────┘
| Layer | Role | Technology |
| Thin Client | POS terminal UI; no business database | Vue 3, Vite, Pinia, Vue Router; Electron (Windows) or Capacitor (Android) |
| Edge Server | Store LAN hub; SQLite master; sync and print | Node.js ≥24, Express, Socket.io, better-sqlite3 |
| Website | Remote catalog and order source | WordPress + 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 area | Shared | Electron | Android | Edge Server |
| POS checkout | ✓ | | | ✓ |
| Catalog management | ✓ | Aux window | Route | ✓ |
| Kitchen board | ✓ | Aux window | Route | ✓ |
| End of day | ✓ | Aux window | Route | ✓ |
| Settings & users | ✓ | | | ✓ |
| Multi-window UX | | ✓ | | |
| Native setup.json | | ✓ | ✓ | |
| Product image LAN cache | ✓ | Disk | Native FS | ✓ |
| Label / receipt printing | ✓ | | | ✓ |
| WooCommerce sync | | | | ✓ |
| WAN / internet status toast | ✓ | | | ✓ |
| Till session / PIN | ✓ | IPC sync | Overlay | ✓ |
Key Terms
| Term | Meaning |
| Edge Server | Headless Node.js hub on the store LAN; owns SQLite, Woo polling, printing |
| Thin Client | POS app with no business DB; all data from Edge Server |
| Till user | Operator identified by display name + four-digit PIN on the Edge Server |
| Till session | App-wide auth after boot PIN; bearer token authorizes till and settings APIs |
| Till Order | Order created at POS (ORD-… id) |
| Web Order | Order ingested from WooCommerce (WOO-{id}) |
| Local_Only | Product on Edge Server but not pushed to website |
| Permission profile | Named preset (Manager, Cashier, Kitchen, Training) copied onto till users |
| LAN health | Thin Client can reach the Edge Server (GET /api/health top-level ok) |
| WAN health | Edge 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
Known Gaps and Placeholders
| Gap | Status | Location |
| Discount code UI | Stub — endpoint not configured | CatalogProductDetail.vue |
checkout.max_discount_percent | Not enforced in payment modal UI | PaymentMethodModal.vue |
| Electron aux-window lock overlay | Post-#49 follow-up; blocks window open without session | CONTEXT.md |
| Android project not in repo | Generated locally; gitignored | client/android/ |
| Product grid access | Automatic; not grantable (pos.grid excluded) | actionCapabilityRegistry.ts |
Appendix A — Vue Routes and Guards
| Route | Name | View | Guard |
#/ | pos | PosView | None |
#/catalog | catalog | CatalogManagementView | catalog.open |
#/catalog/composite | catalogComposite | CompositeConfigStandaloneView | catalog.open |
#/kitchen | kitchen | KitchenOrdersView | kitchen.view |
#/eod | eod | EndOfDayView | eod.view |
#/settings | settings | SettingsView | Any settings.* |
#/client-functions | clientFunctions | ClientFunctionsView | None |
Source: client/src/router.ts
Appendix B — API Endpoint Index
Base URL: http://<edge-server-ip>:3005
Health
| Method | Path | Description |
| GET | /api/health | LAN liveness + bootstrap flag + internet WAN snapshot (ok, targetHost, checkIntervalMs, timestamps, lastFailureSource) |
Products and Catalog
| Method | Path | Description |
| GET | /api/products | POS product list |
| GET | /api/products/:id | Single product |
| POST | /api/products | Create staff product |
| PATCH | /api/products/:id | Staff edit + async Woo push |
| PATCH | /api/products/:id/local-only | Toggle local-only |
| POST | /api/products/:id/image | Upload product image |
| GET | /api/products/:id/composite | Composite definition |
| GET | /api/products/:id/composite-kit | Composite kit browser |
| GET | /api/catalog/usability-config | Catalog usability |
| GET | /api/catalog/wooco-component-key | WOOCO component key |
| GET | /api/catalog/wooco-composite-groups | Search WOOCO groups |
| POST | /api/catalog/bootstrap | Initial bootstrap |
| POST | /api/catalog/re-bootstrap | Guarded re-bootstrap |
Orders and Kitchen
| Method | Path | Description |
| POST | /api/orders | Till checkout |
| GET | /api/orders/kitchen | Active kitchen board |
| GET | /api/orders/:id | Single order |
| PATCH | /api/orders/:id | Till kitchen dismiss |
| GET | /api/orders/eod | EOD report for date |
End of Day
| Method | Path | Description |
| GET | /api/eod/records | Stored EOD record |
| POST | /api/eod/records | Close EOD |
| POST | /api/eod/records/reprint-receipt | Reprint EOD close receipt |
Customers
| Method | Path | Description |
| GET | /api/customers | List customers |
| POST | /api/customers | Create customer |
| GET | /api/customers/:id | Get customer |
| PATCH | /api/customers/:id | Edit customer |
Sync
| Method | Path | Description |
| GET | /api/sync/status | Sync diagnostics |
| POST | /api/sync/products | Pull products from Woo |
| POST | /api/sync/push-catalog | Push catalog reconcile |
| POST | /api/sync/push-customers | Push customers reconcile |
Printing
| Method | Path | Description |
| POST | /api/print/label | Label print job |
| POST | /api/print/receipt | Receipt print job |
| POST | /api/print/jobs | Generic print job enqueue |
| GET | /api/print/jobs/:jobId | Poll job status |
| POST | /api/admin/print/test-label | Test Brother label |
| POST | /api/admin/print/test-escpos | Test ESC/POS |
Authentication
| Method | Path | Description |
| POST | /api/till/sign-in | Till PIN sign-in |
| POST | /api/till/sign-out | Till sign-out |
| POST | /api/admin/settings/sign-in | Settings sign-in |
| POST | /api/admin/settings/sign-out | Settings sign-out |
Admin Settings and Users
| Method | Path | Description |
| GET | /api/admin/settings | Settings snapshot |
| PATCH | /api/admin/settings/printers | Printer config |
| PATCH | /api/admin/settings/woocommerce | Woo credentials |
| PATCH | /api/admin/settings/website-login | Website login |
| POST | /api/admin/settings/test-woocommerce | Test Woo connection |
| POST | /api/admin/settings/test-website-login | Test website login |
| GET | /api/admin/till-users | List till users |
| POST | /api/admin/till-users | Create till user |
| PATCH | /api/admin/till-users/:id | Update till user |
| DELETE | /api/admin/till-users/:id | Delete till user |
| GET | /api/admin/permission-profiles | List profiles |
| POST | /api/admin/permission-profiles | Create profile |
| PATCH | /api/admin/permission-profiles/:id | Update profile |
| DELETE | /api/admin/permission-profiles/:id | Delete profile |
| POST | /api/admin/till-users/:id/apply-profile | Apply profile to user |
Composites Admin, Images, Debug
| Method | Path | Description |
| GET | /api/admin/composite-items | Query composite items |
| POST | /api/admin/composite-items/rebuild | Rebuild composite items |
| POST | /api/admin/wooco-composites/rebuild | Rebuild WOOCO composites |
| GET | /images/:catalogProductId.jpg | Serve cached product image |
| GET | /api/images/status | Image phase status |
| POST | /api/debug/ingest-woo-order/:wooOrderId | Manual Woo order ingest |
Appendix C — Socket.io Events
| Event | When emitted | Client consumers |
order_upserted | Checkout, Woo ingest, dismiss, EOD settle | useOrderStore |
product_upserted | Staff product create/edit | PosView, CatalogManagementView |
catalog_image_progress | Image worker progress | PosView image cache |
catalog_images_ready | Bootstrap images complete | PosView image cache |
internet_status | WAN down/up transition; also on socket connect | TillAppShell 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
| Capability | Label | Surfaces |
| catalog.open | Manage catalog | POS header, catalog route |
| catalog.edit | Edit products | Catalog management |
| catalog.create_product | New product | Catalog management |
| catalog.composite_configure | Configure composite | Catalog conversion |
| catalog.upload_image | Upload photo | Catalog detail |
| catalog.print_label | Print label | Catalog detail |
| checkout.submit | Submit orders | Payment modal |
| kitchen.view | Kitchen board | POS header, kitchen route |
| eod.view | End of day | POS header, EOD route |
| eod.submit | Close EOD | EOD view |
| settings.printers | Printers | Settings |
| settings.woocommerce | Store API keys | Settings |
| settings.website_login | Website login | Settings |
| settings.users | Users | Settings |
Starter Profiles
| Profile | Summary |
| Manager | All capabilities + all settings + max discount 100% |
| Cashier | checkout.submit only |
| Kitchen | kitchen.view only |
| Training | Grid/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