Skip to content

Device Phase A In-progress

Device lets an organization register, monitor, and control the physical and software endpoints that run BANA — POS terminals, mobile and web apps — and connect peripherals such as receipt printers, barcode scanners, and the VNPAY SoundBox. Owners track their equipment; cashiers operate on it daily.

1. Identity

PropertyValue
Module IDCORE-04
TierCore
StatusIn-progress
PhaseP1 (Apps + SoundBox), P2 (POS + peripherals), P3 (SoftPOS / advanced)
PriorityHIGH
Primary usersOwner, Manager, Cashier

2. Purpose & Scope

IncludedExcluded
Device registration, status lifecycle, searchVNPAY Terminal backend wiring (table exists, API not connected)
Hardware / software / maintenance info trackingLabel printer integration (Planned)
Mobile, web, and POS terminal client appsWindows POS terminal (Planned)
Peripheral integration (printer, scanner, SoundBox, SoftPOS, external display)Kitchen display / waiter / delivery apps (Planned)
Health monitoring (heartbeat, online/offline, remote deactivation)Cash drawer control (Planned)
CSV import/export of device recordsPayment gateway internals (see Payment)

3. Capabilities

CapabilityWhat the user can doStatus
Device registration & CRUDRegister hardware with i18n name, type, organization; optional merchant + codeIn-progress
Status lifecycleMove a device through NEW → ACTIVATED → DEACTIVATED → SUSPENDED → ARCHIVEDIn-progress
Equipment inventoryRecord hardware, software, and maintenance details per deviceBuilt
Health monitoringSee online/offline status via 5-min heartbeat; offline after 15 min silenceIn-progress
Remote deactivationDisable a device and revoke its session remotelyIn-progress
Mobile appRun POS and management on iOS 14+ / Android 8+ (Tauri)Built
Web appRun back-office and basic POS in modern browsersBuilt
POS terminal appRun full-screen POS on dedicated Android hardwareIn-progress
Receipt printingPrint ESC/POS receipts via USB / network, Vietnamese code page 28, 58/80mmIn-progress
Barcode scanningScan via HID keyboard-wedge or mobile camera/QRIn-progress
SoundBoxHear Vietnamese/English voice payment confirmations over BluetoothBuilt
SoftPOS (NFC)Accept contactless card payments on Android (VNPAY KYC)Planned

4. Module Dependencies

Depends onWhy
CommerceOrganization owns devices; optional merchant assignment; owns the Device entity
OrdersPOS sessions run on devices; receipts and invoice lookup
PaymentSoundBox confirmations and SoftPOS card acceptance

5. Backend Packages

Implementation detail lives in the developer docs — this section only maps the module to the services and apps that power it.

Package / AppRoleDeveloper docs
@nx/commerceOwns the Device entity, hardware/software info, status lifecyclecommerce
@nx/signalReal-time edge — pushes payment/device events to clients over encrypted WebSocketsignal
clientBack-office device & terminal management UIclient
sale-rendererPOS UI — scanning, printing, SoundBox, SoftPOS flowssale-renderer
sale-mainTauri native layer — USB/NFC/printer/scanner plugins, offline SQLitesale-main

6. Key User Flows

7. Roles & Permissions

RoleCanCannot
OwnerRegister, edit, activate, suspend, archive, remotely deactivate devices; configure peripherals
ManagerView devices, monitor health, configure peripherals within scopeArchive or remotely deactivate (scope-dependent)
CashierOperate POS on an activated device; pair and use peripheralsRegister, archive, or remotely deactivate devices

8. Status & Roadmap

PhaseCapabilities
P1Mobile app, web app, SoundBox, offline mode, minimum-version enforcement
P2Device registration CRUD, hardware/software/maintenance info, POS terminal app, receipt printer, barcode scanner, health monitoring
P3SoftPOS (NFC), kitchen display, external customer display, label printing, Windows POS

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.