System Security & Compliance

Security & Data Integrity Architecture

BeeTable is built on zero-trust software principles. From tamper-resistant receipt sequence numbers to strict database tenant boundaries, here is how we protect your daily business operations.

Enterprise Engineering•Last Updated: October 2026•4 min read
Key Highlights
  • Strict tenant isolation ensures no workspace can ever inspect or alter another tenant's records.
  • Integer minor-unit financial math prevents precision drift and rounding discrepancies.
  • Completed sales and historical receipts are backed by database triggers that reject silent modifications.
  • Daily automated database backups are encrypted and stored in Amazon S3 storage.

1. Multi-Tenant Database Isolation

Every single table query is filtered by immutable workspace UUIDs.

Our Rust API server verifies the workspace context of every authenticated request against the database session token. Client-provided workspace identifiers are never blindly trusted.

PostgreSQL foreign keys and composite unique constraints guarantee that records (orders, appointments, shifts, inventory) strictly reference the verified workspace.

2. Immutable Financial Ledgers & Math

Every currency figure is stored as an integer minor unit (e.g., Kyats or Cents).

To prevent floating-point calculation errors common in web applications, BeeTable calculates subtotals, line items, and change due using exact integer mathematics.

When a sale or shift is closed, price snapshots are stored immutably. Even if a product price changes tomorrow, historical receipts preserve the exact price at the moment of sale.

Database triggers (such as `commerce_ledger_immutable`) reject unauthorized UPDATE or DELETE commands on financial events.

3. Idempotent Commands & Operational Recovery

Network drops and sudden browser closures never corrupt your business records.

All critical catalog, stock, and booking actions utilize idempotent command tokens stored in `record_commands`. If a network timeout occurs and the request is safely retried, the server returns the cached result without duplicate billing or double-decrementing stock.

Salon appointments enforce database-level conflict locks to guarantee that no stylist or chair can be double-booked across simultaneous browser tabs.

4. Sequential Receipt Identity & Printing

Receipt numbers are unique, gap-resistant, and tied to business issuance snapshots.

Every completed order is assigned a sequential receipt number (e.g., `BT-00000001`) via atomic database sequences (`workspace_document_sequences`).

Receipts include an immutable business snapshot (store name, city, tax details at time of print). Print and reprint events are logged in `receipt_events` for audit transparency.

5. Least-Privilege Runtime Roles

The running API cannot alter database schema or bypass application boundaries.

The production API connects to PostgreSQL using a dedicated non-owner role (`beetable_runtime`) that lacks DDL, table creation, or superuser permissions.

Database migrations (schema upgrades) are executed solely during explicit CI/CD deployment jobs via an isolated administrative account (`beetable_user`).

6. Cloud Infrastructure & Backups

High-availability architecture hosted on AWS Lightsail with automated disaster recovery.

Web and API services run in hardened Docker containers behind Caddy reverse proxy with automated TLS certificate management and HTTP/2 + HTTP/3 support.

Automated daily database dumps are created, verified for restore integrity, and synced to private Amazon S3 buckets.

Other Supporting Documents