POS V2 — Research Hub

Architecture decisions backed by industry research

Research carried over from V1 + new V2-specific research
Last updated: March 17, 2026
21
Research Topics
200+
Sources Cited
21
Completed
0
Planned

Architecture Decision Log

DecisionChoiceAlternatives ConsideredOriginStatus
Business Rules EngineBefore/After Hooks Condition/Action, JSON Rules EngineV1 Done
Shared Code Strategypos-logic package Copy-paste, git submodulesV1 Done
Sync Version TrackingGlobal version counter Per-row version (V1, broken)V1 V2
Sync ArchitectureRegistry-based per-entity handlers Monolithic sync, event sourcingV1 V2
Conflict ResolutionPer-entity ownership (HQ/Store wins) Generic CRDT, last-write-wins for allV1 V2
Backend AbstractionCommand-based adapter Direct fetch(), separate API clientsV1 Done
Money RepresentationCents (integers) Decimals, stringsV1 Done
Tax RatesBasis points (825 = 8.25%) Decimals, percentagesV1 Done
Store ↔ HQ CommunicationWS notifications + HTTP data Pure WS, polling, gRPCV1 Done
Outbox PatternTransactional outbox Direct push, event sourcingV1 Done
Database Schema StrategyBIGINT cents, soft deletes, global syncVersion, idempotency keys, audit triggers Normalized, denormalized, hybridV2 Done
Authentication ModelCustom RBAC + Argon2 + Jose CASL (ABAC), Casbin (PBAC), bcrypt, sessionsV2 Done
Auth vs Business RulesRBAC for permissions, Rule Engine for business logic ABAC with attribute-based rules, mixed auth+rulesV2 Done
Modular ArchitectureHybrid registration, Public APIs + Events, Phase-based DB separation Microservices, pure manual registration, direct DB access between modulesV2 Done
Event BusCustom, transactional events pattern (emit after commit), separate from rule engine Node EventEmitter, EventEmitter2, mitt, emitteryV2 Done
Offline StrategyNot needed — local store-server + PostgreSQL per store SQLite, IndexedDB, OPFS, service workersV2 Done
Frontend StackPrimeVue 4 + Vee-Validate/Zod + ECharts + Lucide + Day.js, light/dark only Vuetify, Naive UI, Element Plus, shadcn-vue, AG Grid, Chart.jsV2 Done
PromotionsCondition/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 AnalysisShared HQ/Store schema, RecordDeletedLog, ReasonCodes centralized, ItemDynamic enhanced Soft deletes everywhere, free-text reasons, separate schemasV2 Done
Worksheet State Machine10-state machine (draft→completed), per-store independent status Linear 4-state (V1), single global statusV2 Done
Worksheet TypesUnified table + change_data JSONB, 5 Phase 1 types + 4 Phase 2 18 separate tables (MS RMS), single type column with nullable fieldsV2 Done
Worksheet ApprovalSingle-level MVP, approval_chain JSONB for future multi-level Multi-level from start, no approval requiredV2 Done
Worksheet SyncWorksheet as first-class sync entity, atomic per-store application Individual product syncs (no worksheet reference), push-basedV2 Done
Worksheet RollbackReverse worksheet (swap old/new), pre-sync supersede + post-sync reverse No rollback (create new), hard deleteV2 Done
Reports & DashboardJSON-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
TransfersBoth HQ+Store initiated, in-transit inventory state, variance tracking Store-only initiation, no in-transit state, no varianceV2 Done
Tauri UXNative menu bar, toolbar, status bar, shortcuts F1–F12, compact CSS, single-view + modals Custom title bar, tabs/MDI, web-style CSS, no shortcutsV2 Done
POS Terminal4-tier feature priority, dual-zone layout, 17-step sale flow, manager PIN overrides Single-zone layout, simplified flow, no tiered prioritiesV2 Done
Testing StrategyModified pyramid (60% integration, 30% unit, 10% E2E), real PostgreSQL, Playwright, factory pattern, 20min CI Standard 70/20/10 pyramid, mocked DB, Cypress, fixture filesV2 Done
Vue 3 PatternsComposition API only, Script Setup, Pinia Setup Stores, useXxx() composables, defineModel(), readonly state Options API, Vuex, mixinsV2 Done
Library Patternsfastify-type-provider-zod, Drizzle relations, Jose HS256, Argon2id OWASP 2026, PrimeVue 4 renames Manual JSON Schema, raw SQL joins, jsonwebtoken, bcryptV2 Done

All Sources

// Rule Engine

// Sync Architecture

// Modular Architecture

// Event Bus System

// Worksheet System

// Promotions & Specials

// Reports & Dashboard

// Inter-Store Transfers

// Frontend Stack

// Tauri Native Desktop UX

// POS Terminal Features

// Testing Strategy

// Vue 3 Patterns

// Library Patterns

// Tauri + Shared Code

// Feature Roadmap