POS V2 — Research Hub
Architecture decisions backed by industry research
Research carried over from V1 + new V2-specific researchLast updated: March 17, 2026
21
Research Topics
200+
Sources Cited
21
Completed
0
Planned
Architecture Decision Log
| Decision | Choice | Alternatives Considered | Origin | Status |
|---|---|---|---|---|
| Business Rules Engine | Before/After Hooks | Condition/Action, JSON Rules Engine | V1 | Done |
| Shared Code Strategy | pos-logic package | Copy-paste, git submodules | V1 | Done |
| Sync Version Tracking | Global version counter | Per-row version (V1, broken) | V1 | V2 |
| Sync Architecture | Registry-based per-entity handlers | Monolithic sync, event sourcing | V1 | V2 |
| Conflict Resolution | Per-entity ownership (HQ/Store wins) | Generic CRDT, last-write-wins for all | V1 | V2 |
| Backend Abstraction | Command-based adapter | Direct fetch(), separate API clients | V1 | Done |
| Money Representation | Cents (integers) | Decimals, strings | V1 | Done |
| Tax Rates | Basis points (825 = 8.25%) | Decimals, percentages | V1 | Done |
| Store ↔ HQ Communication | WS notifications + HTTP data | Pure WS, polling, gRPC | V1 | Done |
| Outbox Pattern | Transactional outbox | Direct push, event sourcing | V1 | Done |
| Database Schema Strategy | BIGINT cents, soft deletes, global syncVersion, idempotency keys, audit triggers | Normalized, denormalized, hybrid | V2 | Done |
| Authentication Model | Custom RBAC + Argon2 + Jose | CASL (ABAC), Casbin (PBAC), bcrypt, sessions | V2 | Done |
| Auth vs Business Rules | RBAC for permissions, Rule Engine for business logic | ABAC with attribute-based rules, mixed auth+rules | V2 | Done |
| Modular Architecture | Hybrid registration, Public APIs + Events, Phase-based DB separation | Microservices, pure manual registration, direct DB access between modules | V2 | Done |
| Event Bus | Custom, transactional events pattern (emit after commit), separate from rule engine | Node EventEmitter, EventEmitter2, mitt, emittery | V2 | Done |
| Offline Strategy | Not needed — local store-server + PostgreSQL per store | SQLite, IndexedDB, OPFS, service workers | V2 | Done |
| Frontend Stack | PrimeVue 4 + Vee-Validate/Zod + ECharts + Lucide + Day.js, light/dark only | Vuetify, Naive UI, Element Plus, shadcn-vue, AG Grid, Chart.js | V2 | Done |
| Promotions | Condition/Action pattern, Product Groups for variants, 3-tier stacking (exclusive/joint/regular) | Drools rules engine, hardcoded promo types, SaaS (Voucherify/Talon.One) | V2 | Done |
| Schema: MS RMS Analysis | Shared HQ/Store schema, RecordDeletedLog, ReasonCodes centralized, ItemDynamic enhanced | Soft deletes everywhere, free-text reasons, separate schemas | V2 | Done |
| Worksheet State Machine | 10-state machine (draft→completed), per-store independent status | Linear 4-state (V1), single global status | V2 | Done |
| Worksheet Types | Unified table + change_data JSONB, 5 Phase 1 types + 4 Phase 2 | 18 separate tables (MS RMS), single type column with nullable fields | V2 | Done |
| Worksheet Approval | Single-level MVP, approval_chain JSONB for future multi-level | Multi-level from start, no approval required | V2 | Done |
| Worksheet Sync | Worksheet as first-class sync entity, atomic per-store application | Individual product syncs (no worksheet reference), push-based | V2 | Done |
| Worksheet Rollback | Reverse worksheet (swap old/new), pre-sync supersede + post-sync reverse | No rollback (create new), hard delete | V2 | Done |
| Reports & Dashboard | JSON-definition modular engine, KPI dashboard real-time via WebSocket, materialized views for historical | Hardcoded reports, full OLAP warehouse, third-party BI (Metabase/Tableau) | V2 | Done |
| Transfers | Both HQ+Store initiated, in-transit inventory state, variance tracking | Store-only initiation, no in-transit state, no variance | V2 | Done |
| Tauri UX | Native menu bar, toolbar, status bar, shortcuts F1–F12, compact CSS, single-view + modals | Custom title bar, tabs/MDI, web-style CSS, no shortcuts | V2 | Done |
| POS Terminal | 4-tier feature priority, dual-zone layout, 17-step sale flow, manager PIN overrides | Single-zone layout, simplified flow, no tiered priorities | V2 | Done |
| Testing Strategy | Modified pyramid (60% integration, 30% unit, 10% E2E), real PostgreSQL, Playwright, factory pattern, 20min CI | Standard 70/20/10 pyramid, mocked DB, Cypress, fixture files | V2 | Done |
| Vue 3 Patterns | Composition API only, Script Setup, Pinia Setup Stores, useXxx() composables, defineModel(), readonly state | Options API, Vuex, mixins | V2 | Done |
| Library Patterns | fastify-type-provider-zod, Drizzle relations, Jose HS256, Argon2id OWASP 2026, PrimeVue 4 renames | Manual JSON Schema, raw SQL joins, jsonwebtoken, bcrypt | V2 | Done |
All Sources
// Rule Engine
- ERPNext/Frappe Document Lifecycle Hooks — Python before/after submit pattern
- Odoo ORM Constraints & Computed Fields — Decorator-based validation
- Mongoose Middleware (Hooks) — Pre/post hooks for document lifecycle
- Fastify Hooks Documentation — onRequest, preHandler, preSerialization pattern
- json-rules-engine (npm) — Declarative JSON rule evaluation
- ts-rule-engine — TypeScript condition/action rule framework
// Sync Architecture
- SQL Server Change Tracking — Global version counter pattern
- Couchbase Sync Gateway: Sequence Handling — Global sequence for sync
- Dynamics 365 Row Version Change Tracking
- Oracle Retail Integration Bus — Event-driven per-entity integration
- SAP Retail CIF Documentation — Modular IDoc-based entity sync
- Transactional Outbox Pattern — Reliable at-least-once delivery
- Event Sourcing vs Event-Driven — Architecture comparison
- Dynamics 365 Commerce Architecture — Multi-store sync
// Modular Architecture
- Milan Jovanović — Modular Monolith Architecture — Patterns and boundaries
- mcollina/modular_monolith — Fastify reference implementation by framework creator
- Shopify Engineering — Deconstructing the Monolith — 2M+ LOC modular reorganization
- Fastify Plugin System — Encapsulation and decorator patterns
- @fastify/autoload — Automatic plugin loading from directory
- eslint-plugin-boundaries — Module boundary enforcement at lint time
// Event Bus System
- Odoo ORM — Lifecycle Hooks & Event Patterns — after_commit event handling in enterprise POS
- ERPNext/Frappe Document Lifecycle — after_insert, after_submit event hooks
- Spring @TransactionalEventListener — AFTER_COMMIT pattern reference
- Transactional Outbox Pattern — Reliable event delivery after commit
- Square Developer Platform — Webhook/event architecture for POS
- mitt — Tiny 200-byte event emitter
- emittery — Async typed event emitter for Node.js
- Node.js EventEmitter — Built-in event system reference
// Worksheet System
- Oracle Retail Merchandising System Documentation Library — Centralized HQ worksheet patterns
- Oracle Retail Pricing Cloud — Price Change Overview — Scheduled execution, effective dates
- Oracle RPM Conflict Checking Process — Overlap detection, clearance indicators
- Microsoft Dynamics 365 Business Central — Auditing Changes — Monitored fields log pattern
- Microsoft Power Automate — Multi-Level Approval Workflows — Serial, parallel, conditional chains
- Veeva Vault — Document Lifecycles — State machine with superseded pattern
- SAP Signavio — Multi-Level Approval Workflows — Rules-based routing, escalation
- Temporal — Multi-Tenant Task Scheduling — Per-store independent processing queues
- AWS — Transactional Outbox Pattern — Worksheet sync integration
- State Machine Design Pattern — Transition rules and guard conditions
- Audit Trail Guide — Trullion — Immutable logging best practices
- Microsoft RMS HQ/Store Schema (analyzed March 2026) — Full worksheet table analysis
// Promotions & Specials
- Oracle XStore POS Promotion Engine — Enterprise promotion evaluation architecture
- Voucherify Promotion Rules Engine — Condition/action pattern, stacking rules
- Voucherify Stacking Rules — Exclusive, joint, regular categories
- Medusa.js Discount Architecture — Discounts + reusable rules + campaigns
- Shopify Discount Functions API — WASM-based sub-50ms evaluation
- Commerce Layer Rules Engine — JSON-based condition/action examples
- Talon.One Promotion Engine — 40-60ms evaluation target
// Reports & Dashboard
- Enterprise Reporting Platforms — Jaspersoft
- How to Build a Reporting Platform Effectively — Medium
- Design Patterns for Backend Development — DEV Community
- ERPNext Report Builder Guide — Finbyz
- Making Custom Reports — Frappe/ERPNext Docs
- Odoo Report Engine Documentation
- Microsoft RMS Customization Guide
- 16 KPIs and Metrics for Retail Dashboard — Databox
- Building Effective Retail KPI Dashboards — Retlia
- Real-Time POS Analytics with Lakehouse — Databricks
- Multi-Store Retail Environments — Microsoft Azure
- Store Performance Dashboard Metrics — KORONA POS
- Essential Retail POS Reports — POSNation
- Data Integration Patterns Aggregation — MuleSoft
- Automated Report Generation and Scheduling — Whatagraph
- Real-Time OLAP Databases — Estuary
- PostgreSQL Materialized Views — EPSIO
- Dynamic Report Generation Node.js — jsreport
- ExcelJS Report Generation — npm
- Fluent Reports — npm
// Inter-Store Transfers
- Alice POS — Managing Inter-Store Transfers — Store and HQ initiation patterns
- Alice POS — What Does Inter-Branch Transfer (IBT) Mean — Industry IBT overview
- Retalon — Inter-Store Inventory Transfers — AI-driven transfer optimization
- RMS HQ Worksheet 330 — Inventory Transfer — HQ-initiated transfer worksheet
- Oracle Retail — Store Transfers — Enterprise transfer workflow
- Shopify — Push vs Pull Inventory — Push/pull model comparison
- AccountingTools — Goods In Transit — FOB rules, in-transit accounting
- Oracle JD Edwards — In-Transit Accounting — GL impact of transfer orders
- Unleashed — In-Transit Inventory Guide — In-transit state management
- Finale Inventory — Inventory Shrinkage — Shrinkage tracking and analysis
- o9 Solutions — Multi-Echelon Inventory Optimization — MEIO for auto-rebalance
- Zoho Inventory — Transaction Approval — Approval workflow patterns
- Dynamics 365 — Inter-Store Transfers in AX — Enterprise transfer patterns
// Frontend Stack
- PrimeVue 4 — Official Documentation — Component library, DataTable, theming
- Vee-Validate 4 — Composition API form handling
- Zod — TypeScript-first schema validation
- Apache ECharts — Canvas-based charting for large datasets
- vue-echarts — Official Vue 3 ECharts wrapper
- Lucide Icons — 1500+ tree-shakeable SVG icons
- Day.js — 2KB date library with timezone support
- pinia-plugin-persistedstate — Pinia state persistence
- Vuetify 3 — Material Design component framework (comparison)
- Naive UI — TypeScript-first Vue 3 components (comparison)
- Element Plus — Alibaba-backed Vue 3 components (comparison)
- shadcn-vue — Copy-paste primitives (comparison)
- AG Grid — Enterprise data grid (comparison)
- TanStack Table — Headless table library (comparison)
- Chart.js — Simple charting library (comparison)
- ApexCharts — Modern charting library (comparison)
// Tauri Native Desktop UX
- Tauri v2 Window Menu — Native menu bar API
- Tauri v2 Window Customization — Title bar and decorations
- Tauri v2 Global Shortcut Plugin — Keyboard shortcut registration
- Tauri v2 System Tray — Tray icon and minimize-to-tray
- Tauri v2 Dialog Plugin — Native file/message dialogs
- Tauri Menu API Reference — JavaScript menu API
- Tauri Global Shortcut API — JS shortcut API reference
- tauri-plugin-context-menu — Native right-click context menus
- Awesome Tauri Apps — Real-world Tauri application examples
- Made with Tauri — Production Tauri app showcase
- Windows Status Bar Design — Microsoft status bar guidelines
- Windows Navigation Design — Microsoft navigation patterns
- MDI vs TDI Interfaces — Interface model comparison
- Desktop Navigation Patterns — Nielsen Norman Group sidebar research
- PrimeVue Toolbar — Vue toolbar component reference
// POS Terminal Features
- 2025 Guide to Retail Payments & POS Systems — GoFTX
- POS Terminal Transaction Flow — KingTopTec
- How Does a POS System Work? 2026 Guide — LitExtension
- Pricing Functions in POS — Microsoft Dynamics 365
- POS Returns, Exchanges and Refunds — Lightspeed
- Voids and Refunds — Clover
- Void Transaction vs Refund — Gravity Payments
- Shift and Cash Drawer Management — Microsoft Commerce
- Suspend and Resume Transactions — Microsoft Commerce
- Receipt Formats — Microsoft Commerce
- Manager Approvals — Shopify Changelog
- POS Screen Layouts — Microsoft Commerce
- POS UI Design Principles — Shopify
- POS Systems with Security Features — PaymentSecurityGuide
- Keyboard Shortcuts on POS — LS Central
- Offline POS Functionality — Microsoft Commerce
- Point of Sale Features — Shopify POS
- Capabilities — Square for Retail
- Retail POS System — Lightspeed
- POS Systems — Clover
// Testing Strategy
- Software Testing Pyramid Guide 2025 — Enterprise pyramid ratios and modern adjustments
- Vue 3 Testing Pyramid with Vitest Browser Mode — 70% integration, browser-mode benchmarks
- Fastify Official Testing Guide — inject() pattern, plugin testing
- Testing Modular Monoliths: System Integration Testing — Complete workflow testing, Testcontainers
- GitHub Actions + Monorepo Testing — Affected-only execution, remote caching
- Playwright vs Cypress 2025 — Multi-tab, cross-browser, performance comparison
- Unit vs Integration vs E2E Testing Guide — Ratio recommendations for enterprise apps
- Modern Test Pyramid Guide 2025 — Testing trophy and testing diamond alternatives
- OWASP SQL Injection Prevention — Security testing patterns
- Vitest Coverage Configuration — V8 provider, threshold enforcement
- Database Seeding with Faker.js — Factory pattern and deterministic seeding
// Vue 3 Patterns
- Vue.js Composition API FAQ — Official guide
- Script Setup Syntax — Official docs
- TypeScript with Composition API — Official Vue TypeScript guide
- Pinia Core Concepts — Official Pinia docs
- Vue Router Navigation Guards — Official router docs
- Composables Guide — Official Vue composables guide
- Provide / Inject — Official type-safe DI guide
- Vue I18n Composition API — Composition mode docs
- Vue Performance Guide — Official optimization guide
- PrimeVue 4 DataTable — Lazy loading, column templates
- Vue 3 Best Practices (Medium) — 2025 community patterns
- Pinia Best Practices — Scalable state management
- Vue 3.5 Enhancements (Monterail) — Reactive Props Destructure
- ref vs reactive Guide (LogRocket) — Detailed comparison
- Vue Router with TypeScript — Type-safe navigation
// Library Patterns
- Fastify 5 Documentation — Official docs, breaking changes
- fastify-type-provider-zod — Zod integration for Fastify type providers
- Drizzle ORM Relational Queries — db.query API documentation
- Drizzle ORM Transactions — Transaction patterns
- postgres-js — Connection pooling and configuration
- Jose — JWT signing and verification library
- OWASP Password Storage Cheat Sheet — Argon2id recommended parameters
- node-argon2 — Argon2 bindings for Node.js
- PrimeVue 4 Migration Guide — Component renames, breaking changes
- Tauri v2 Getting Started — ACL, commands, permissions
- specta — Type-safe Rust-to-TypeScript bindings
- Zod — TypeScript-first schema validation
// Tauri + Shared Code
- GitButler — Tauri + pnpm monorepo (50k+ stars, reference architecture)
- Clash Nyanpasu — Tauri v2 monorepo with shared packages
- Tauri v2 Frontend Configuration — Official docs
// Feature Roadmap
- Best POS Features 2026 — Electronic Payments
- Essential POS Features — RetailCloud
- Multi-Store POS Guide 2026 — AppIntent
- Retail KPIs Guide 2026 — Improvado
- 25 Retail KPIs — NetSuite
- Retail Industry Metrics — Tableau