CartSensePOS
Developer Reference Architecture

Platform Specifications

A deep dive into the isolated data models, atomic transaction pipelines, and device synchronizations powering CartSense.

Multi-Tenancy Model

Isolated Tenant Boundaries

How CartSense partitions organizational operations, storefront databases, and billing schemas.

Logical Data Isolation

Every organization operates under a unique Tenant ID. All table operations (products, orders, invoices, and devices) filter automatically through logical boundaries inside PostgreSQL indexes to guarantee tenant segregation.

Location Scope Routing

Locations (stores, warehouses, headquarters nodes) act as regional clusters. Cashiers are assigned to specific locations, restricting POS order pipelines to their registered location scope.

Stripe Billing Tiers Integration

Usage billing monitors tenant API call volumes and active cashier devices in real time, automatically adjusting invoices for overages.

Concurrency & Speed

High-Volume Transaction Pipelines

Architected for high checkout speeds and race-condition prevention during peak hours.

Prisma Database Transactions

Prisma client transactions (`$transaction`) process inventory decreases and order logging as singular atomic operations, preventing double-sell conflicts on popular products.

Distributed Cache Layer

Read-heavy product catalogs and active menu definitions load directly from system-memory caches, dropping register retrieval latency under 15ms.

Connection Pooling & Throttling

Backend rate-guards monitor network requests, shielding core PostgreSQL databases from infinite loops or spikes.

KDS & POS Terminal Sync

Cashier & Kitchen Device Sync

Orchestration layer mapping physical tablets, receipt printers, and Kitchen Display Systems.

Cryptographic Device Token Keys

Physical devices enroll using 64-character encrypted hardware tokens. Only registered, authenticated terminal nodes can access checkout endpoints.

Kitchen Display Systems (KDS)

Orders submitted from storefront cashier cash registers stream instantly to specific KDS screens, sorting preparation categories (e.g. bar, kitchen) in real time.

Receipt & Drawer Registers

Support local hardware drawer protocols and standard thermal print systems (ESC/POS) direct from cashier tablets.

POS User & RBAC Management

Fine-Grained Capability Controls

Managing employee directories, shifts, overrides permissions, and audit logs.

Role-Based Access Control (RBAC)

Divide permissions across Super Admin, Store Manager, and Front Cashier. Manager capabilities restrict discount applications or drawer overrides.

Audited Action Logging

Critical activities (such as editing catalog prices, voiding checkout tickets, or changing tax rates) register directly in the tenant change audit history.

Shifts & Drawer Reconciliation

Track individual cashier drawer logs, comparing logged cash transactions with physical checkout values at shift closing.