Chapter 03: Architecture Characteristics

Purpose

This appendix documents the formal architecture characteristics analysis for the Nexus POS Platform. It identifies the driving quality attributes that shape architectural decisions and provides justification for each characteristic’s priority.

Source: Architecture Characteristics Worksheet v2.0 (Expert Panel-Reviewed) System/Project: Nexus - Omnichannel Retail POS (Multi-Tenant Cloud) Architect/Team: Cloud AI Architecture Agents Domain/Quantum: Retail / Inventory Management / Multi-Platform Integration Date Modified: February 19, 2026 Panel Review Score: 6.50/10 → Updated per 4-member expert panel recommendations


K.1 Top 9 Driving Characteristics

These are the primary quality attributes that drive architectural decisions. They are listed in priority order.

RankCharacteristicPriority LevelBlueprint Reference
1AvailabilityCriticalCh 04: Architecture Styles, Section L.10A.1
2InteroperabilityCriticalCh 05: BRD Module 6 (Integrations)
3Data ConsistencyCriticalCh 04: Architecture Styles, Section L.4A
4SecurityElevatedCh 04: Architecture Styles, Section L.8 (Security)
5Compliance (NEW)CriticalCh 05: BRD Module 6 (Integrations)
6ModifiabilityHighCh 04: Architecture Styles, Section L.9A
7ScalabilityHighCh 04: Architecture Styles, Section L.10A.4
8Configurability (ELEVATED from implicit)HighCh 04: Architecture Styles Section L.10A.4, BRD Module 5
9PerformanceHighCh 09: Indexes & Performance

K.2 Characteristics with Definitions and Justifications

K.2.1 Availability (Rank 1)

AttributeValue
DefinitionThe amount of uptime of a system; usually measured in 9’s (e.g., 99.9%).
PriorityCritical
Blueprint ReferenceCh 04: Architecture Styles, Section L.10A.1

Justification:

Continuous POS operation is non-negotiable. Physical stores must be able to process transactions even during brief network outages. The system uses an online-first architecture with a thin offline fallback (ADR-048) — the API is the primary data source under normal conditions, with a minimal SQLite cache that activates only when connectivity is lost.

Architectural Implications:

  • API-primary data access via React Query (server state management)
  • 3-state connection monitor (ONLINE / DEGRADED / OFFLINE)
  • 2-table SQLite fallback (product_cache + sales_queue)
  • FIFO queue flush on reconnection
  • Flag-on-sync price discrepancy for manager review

Online-First Justification

The online-first design keeps POS terminals operational under all network conditions while avoiding the complexity of full local database replication:

Online-First with Offline Fallback
====================================

Normal Operation (ONLINE):
  All reads via React Query → Central API → PostgreSQL
  Real-time prices, inventory, customer data
  No local database sync overhead

Intermittent Connectivity (DEGRADED):
  Reads continue via React Query (stale-while-revalidate)
  Writes queue locally in sales_queue table
  Socket.io heartbeat detects degraded state

Network Outage (OFFLINE):
  Product lookups from product_cache (read-only SQLite)
  Sales written to sales_queue (FIFO)
  POS continues processing sales with cached prices

Reconnection:
  sales_queue entries flush to API in FIFO order
  Server applies current prices, flags discrepancies
  product_cache refreshes from API

The online-first design is governed by five core principles (from Ch 04, Section L.10A.1 / ADR-048):

PrincipleDescription
API-Primary Data AccessAll reads go through React Query with server-side caching. React Query handles background refetching, stale-while-revalidate, and retry logic.
3-State Connection MonitorONLINE (full API access), DEGRADED (intermittent, queue writes), OFFLINE (local fallback only). Transitions based on Socket.io heartbeat + HTTP health check.
2-Table SQLite Fallbackproduct_cache (read-only product/price lookups) and sales_queue (FIFO write queue for completed sales). No full local database replication.
FIFO Queue FlushWhen connection restores, sales_queue entries are submitted to the API in order. No conflict resolution needed — server applies current prices and flags discrepancies.
Flag-on-Sync Price DiscrepancyIf a sale was completed offline with a cached price that differs from the current server price, the system flags it for manager review rather than auto-adjusting.

Event Sourcing Supports Offline Queue

Event sourcing (Ch 04 Section L.4A) supports availability by providing a natural model for the offline sales queue. When the POS client is offline, completed sales are captured as immutable events in the local sales_queue. When connectivity is restored, these events are submitted to the central API in FIFO order. Because each event has a unique ID and the server is the authority on current state, the queue flush is straightforward — no conflict resolution or event merging is required. The server accepts each sale, applies current pricing, and flags any discrepancies for review.


K.2.2 Interoperability (Rank 2)

AttributeValue
DefinitionThe ability of the system to interface and interact with other systems to complete a business request.
PriorityCritical
Blueprint ReferenceCh 05: BRD Module 6 (Integrations)

Justification:

BRD v18.0 Module 6 defines integration with 6 provider families across fundamentally different protocols:

Provider FamilyAuth ModelRate LimitingSync Cadence
ShopifyOAuth 2.0 / PKCE50 points/second (GraphQL)Real-time webhooks
Amazon SP-APIOAuth / Login with Amazon (LWA)Burst + restore token bucket2-minute polling
Google MerchantAPI key + Service AccountQuota-based (daily limits)2x/day batch + real-time local inventory
Payment ProcessorAPI key / OAuthPer-transactionReal-time
Email (SMTP)SMTP credentialsProvider-specificEvent-triggered
Carrier APIsAPI keyPer-requestOn-demand

The system must maintain an Anti-Corruption Layer (ACL) per provider to prevent external schema changes from propagating into the core POS domain. BRD Section 6.2 mandates:

  • Provider Abstraction: IntegrationProvider interface with 5 standard methods per provider: connect(), syncProducts(), syncInventory(), validateData(), healthCheck()
  • Circuit Breaker: 5 failures within 60 seconds triggers OPEN state; 30-second cooldown before HALF_OPEN
  • Idempotency Framework: 24-hour deduplication windows with SHA-256 keying (Section 6.2.5)
  • Transactional Outbox: Atomic inventory reservation + guaranteed event publication

Architectural Implications:

  • Anti-Corruption Layer (ACL) per provider preventing external schema leakage
  • Provider Abstraction pattern (IntegrationProvider) for uniform integration interface
  • Circuit breaker pattern (CLOSED → OPEN → HALF_OPEN state machine)
  • Idempotency framework with configurable dedup windows
  • Transactional Outbox for guaranteed event delivery
  • Rate limiter per provider with adaptive throttling

K.2.3 Data Consistency (Rank 3)

AttributeValue
DefinitionThe data across the system is in sync and consistent across databases and tables.
PriorityCritical
Blueprint ReferenceCh 04: Architecture Styles, Section L.4A

Justification:

Critical for handling the “Inventory Sync” race conditions between physical shoppers and online orders to prevent overselling.

Architectural Implications:

  • Event Sourcing for Sales and Inventory domains
  • Eventual consistency model with conflict resolution
  • Optimistic concurrency control
  • Idempotent event handlers

Event Sourcing Justification

Traditional CRUD systems store only current state. Event sourcing stores every change as an immutable event, providing the full history needed for audit trails, temporal queries, and offline conflict resolution (from Ch 04 Section L.4A):

Traditional CRUD vs Event Sourcing
==================================

CRUD Approach:
+------------------+
| inventory_items  |
|------------------|
| sku: NXP001      |
| quantity: 45     |  <- Only current state
| updated_at: now  |
+------------------+

Event Sourcing Approach:
+------------------+
| events           |
|------------------|
| InventoryReceived: +100 @ 2025-01-01 09:00  |
| ItemSold: -2 @ 2025-01-01 10:15             |
| ItemSold: -1 @ 2025-01-01 11:30             |
| ItemSold: -3 @ 2025-01-01 14:22             |
| AdjustmentMade: -49 @ 2025-01-01 16:00      |  <- Caught discrepancy!
| ItemSold: -1 @ 2025-01-02 09:15             |
| Current State: 45 (sum of all events)       |
+------------------+

Benefits for Retail POS:

BenefitDescription
Complete Audit TrailEvery sale, void, refund, adjustment is recorded forever
Temporal Queries“What was our inventory on December 15th at 3pm?”
Offline SyncEvents queue locally, merge when online
Conflict ResolutionCompare event streams, not states
DebuggingReplay events to reproduce issues
CompliancePCI-DSS, SOX require transaction logs

K.2.4 Security (Rank 4 - Elevated)

AttributeValue
DefinitionThe ability of the system to prevent malicious actions, protect credentials, and restrict access across all trust boundaries.
PriorityElevated (due to multi-platform OAuth, GenAI code generation, PCI-DSS 4.0)
Blueprint ReferenceCh 04: Architecture Styles, Section L.8 (Security)

Justification:

BRD v18.0 elevates security from basic PCI-DSS to 5 concrete security sub-domains:

Security Sub-DomainScopeKey Requirements
1. Authentication & AuthorizationMulti-provider OAuth lifecycle3 OAuth providers (Shopify, Amazon LWA, Google), MFA for admin users (PCI-DSS 4.0 Req 8.4.2), role-based access control
2. Credential Lifecycle ManagementSecrets vault and rotationHashiCorp Vault for 6 credential types, automated 90-day rotation, tenant-specific encryption keys, emergency rotation procedures
3. Supply Chain SecurityDependency and package safetySnyk/OWASP SCA with package firewall, SBOM generation (PCI-DSS 4.0 Req 6.3.2), real-time vulnerability scanning
4. GenAI GovernanceAI-generated code safety6-gate Security Test Pyramid: SAST + SCA + Secrets Detection + Architecture Conformance (dependency-cruiser) + Contract Tests (Pact) + Manual Security Review
5. PCI-DSS 4.0 CompliancePayment card securitySAQ-A boundaries, FIM via Wazuh/OSSEC (Req 11.5.1), session management, audit trail retention (365 days), vulnerability scanning (Req 11.3.1)

Architectural Implications:

  • HashiCorp Vault (Docker container) for centralized credential management
  • 6-gate Security Test Pyramid in CI/CD pipeline
  • Wazuh/OSSEC agents on all POS terminals for File Integrity Monitoring
  • Architecture conformance tests (dependency-cruiser) enforcing module boundaries
  • Pact contract tests against Shopify/Amazon/Google sandbox APIs
  • Audit trail with INTEGRATION category for OAuth operations and webhook verification

POS Security Layers

The system implements a 5-layer defense-in-depth security model (from Ch 04 Section L.9A):

Security Layers
===============

+------------------------------------------------------------------+
|                        INTERNET                                   |
+---------------------------+--------------------------------------+
                            |
                            v
+---------------------------+--------------------------------------+
|                    TLS TERMINATION                                |
|                    (Let's Encrypt)                                |
+---------------------------+--------------------------------------+
                            |
                            v
+------------------------------------------------------------------+
|                    API GATEWAY                                    |
|  +-----------------------+  +-----------------------+             |
|  | Rate Limiting         |  | IP Whitelisting       |             |
|  | 100 req/min/client    |  | (Nexus POS only)      |             |
|  +-----------------------+  +-----------------------+             |
+---------------------------+--------------------------------------+
                            |
                            v
+------------------------------------------------------------------+
|                    AUTHENTICATION                                 |
|  +-----------------------+  +-----------------------+             |
|  | JWT Validation        |  | PIN Verification      |             |
|  | - Signature check     |  | - Employee clock-in   |             |
|  | - Expiry check        |  | - Sensitive actions   |             |
|  | - Tenant claim        |  +-----------------------+             |
|  +-----------------------+                                        |
+---------------------------+--------------------------------------+
                            |
                            v
+------------------------------------------------------------------+
|                    AUTHORIZATION                                  |
|  +-----------------------+  +-----------------------+             |
|  | Role-Based (RBAC)     |  | Permission Policies   |             |
|  | - Admin               |  | - can:create_sale     |             |
|  | - Manager             |  | - can:void_sale       |             |
|  | - Cashier             |  | - can:view_reports    |             |
|  +-----------------------+  +-----------------------+             |
+------------------------------------------------------------------+

Each layer provides independent protection: TLS encrypts data in transit, the API gateway enforces rate limits and IP restrictions, JWT authentication validates identity and tenant context, PIN verification secures sensitive in-store actions, and RBAC authorization controls access to specific operations.

Tenant Data Isolation as Security Evidence

Row-Level Security (RLS) isolation (from Ch 04 Section L.10A.4) provides a strong security boundary enforced at the PostgreSQL database level. Every tenant table includes a tenant_id column and an RLS policy that automatically filters queries by the tenant context set in the connection session variable. Even if application code omits a WHERE tenant_id = ? clause, PostgreSQL’s RLS policies prevent cross-tenant data access:

-- RLS policy on every tenant table
CREATE POLICY tenant_isolation ON products
  USING (tenant_id = current_setting('app.current_tenant')::uuid);

-- Middleware sets tenant context from JWT claims
SET app.current_tenant = 'uuid-of-nexus-tenant';

-- Query automatically filtered by RLS — returns only Nexus products
SELECT * FROM products;

-- Even a query without WHERE clause is safe — RLS enforces isolation
SELECT * FROM orders;
-- Returns only orders for the current tenant

K.2.5 Compliance (Rank 5 - NEW)

AttributeValue
DefinitionAdherence to regulatory standards, platform marketplace policies, and legal requirements across all operating jurisdictions and external channels.
PriorityCritical
Blueprint ReferenceCh 05: BRD Module 6 (Integrations)

Justification:

BRD v18.0 introduces non-negotiable compliance requirements from 3 external platforms plus existing regulatory frameworks:

Compliance DomainRequirementsImpact
PCI-DSS SAQ-ANo card data stored, tokenized payments, FIM on POS terminalsPayment architecture, audit trail, monitoring
Amazon SP-APIProduct taxonomy compliance, FBA packaging rules, listing quality standards, content policy enforcementCatalog validation, product data enrichment
Google MerchantProduct data specifications, disapproval prevention, local inventory accuracy, API v1 migration (Content API EOL August 2026)Data quality engine, inventory sync accuracy
Shopify@idempotent mutation mandate (required 2026-04), webhook verification, POS non-native compliance rules (Decision #99)API client design, idempotency framework
State RegulationsVirginia 5-year gift card minimum expiry, consumer protection, data privacyConfiguration per jurisdiction

Architectural Implications:

  • Platform policy validation engine (“strictest-rule-wins” cross-platform validation per BRD Section 6.6)
  • Automated compliance checking on product data before channel publication
  • Credential rotation policies per platform requirement
  • Audit trail for all external interactions with INTEGRATION event category
  • Jurisdiction-aware configuration (geographic expansion design from ADR-BRD-006)

Tenant Isolation Compliance Benefits

Row-Level Security (RLS) isolation (from Ch 04 Section L.10A.4) directly supports SOC 2, GDPR, and HIPAA compliance requirements:

SOC 2 / GDPR Compliance
=======================

Requirement: "Customer data must be logically separated"

With Row-Level Security (RLS):
- Every table has tenant_id + RLS policy enforced at database level
- RLS policies automatically filter queries — no risk of missing WHERE clause
- Clear audit trail per tenant_id
- Data export for GDPR: SELECT * FROM customers WHERE tenant_id = :id
- Data deletion for "right to be forgotten": DELETE cascading on tenant_id
- Defense-in-depth: even buggy application code cannot leak cross-tenant data

Per-tenant data export is achieved via COPY (SELECT * FROM table WHERE tenant_id = :id) TO STDOUT, making data portability and right-to-erasure requests straightforward. RLS enforcement at the database level provides defense-in-depth isolation that does not depend on application-level query correctness.


K.2.6 Modifiability (Rank 6)

AttributeValue
DefinitionThe ease with which a system can adapt to changes in environment and functionality.
PriorityHigh
Blueprint ReferenceCh 04: Architecture Styles, Section L.9A

Justification:

Plugin architecture is needed for frequent hardware/tax updates without full system rewrites.

Architectural Implications:

  • Microkernel (Plugin) architecture for Nexus POS
  • Hardware abstraction layer
  • Tax calculation plugins
  • Payment processor adapters

K.2.7 Scalability (Rank 7)

AttributeValue
DefinitionDegree to which a product can handle growing or shrinking workloads.
PriorityHigh
Blueprint ReferenceCh 04: Architecture Styles, Section L.10A.4

Justification:

At some point the system must be able to grow to accommodate the number of new tenants.

Architectural Implications:

  • Row-Level Isolation with PostgreSQL RLS (tenant_id + RLS policies)
  • Horizontal scaling of stateless API layer
  • Connection pooling per tenant
  • Resource quotas and throttling

K.2.8 Configurability (Rank 8 - ELEVATED from implicit)

AttributeValue
DefinitionThe ability of the system to support multiple configurations and customize behavior on-demand per tenant, channel, and product level.
PriorityHigh
Blueprint ReferenceCh 04: Architecture Styles, Section L.10A.4, BRD Module 5 (Setup & Configuration)

Justification:

BRD Module 5 spans 3,000+ lines of setup and configuration requirements. The system must support hierarchical configuration at multiple levels:

Configuration LayerScopeExamples
GlobalAll tenants, all channelsSystem defaults, tax engine rules
TenantPer-tenant overridesFeature toggles, branding, business rules
ChannelPer-channel per-tenantSafety buffer modes, sync frequency, listing rules
ProductPer-product per-channelOverride safety buffer, pricing rules, visibility

Key configuration complexity drivers:

  • Safety Buffers: 4-level priority resolution (Product → Category → Channel → Global) with 3 calculation modes (FIXED, PERCENTAGE, MIN_RESERVE) per BRD Section 6.7.2
  • Integration YAML: Section 6.12 defines 400+ lines of declarative integration configuration
  • Feature Toggles: Per-tenant inventory sync strategy (Safe vs. Aggressive), channel enablement
  • Tax Jurisdictions: Modular jurisdiction support with geographic expansion (ADR-BRD-006)

Architectural Implications:

  • Hierarchical configuration resolution with 4-level priority
  • YAML-driven integration rules (machine-readable, version-controlled)
  • Per-tenant per-channel safety buffer settings
  • Runtime configuration hot-reload without service restart
  • Configuration validation engine preventing invalid combinations

K.2.9 Performance (Rank 9)

AttributeValue
DefinitionThe amount of time it takes for the system to process a business request.
PriorityHigh
Blueprint ReferenceCh 09: Indexes & Performance

Justification:

Low latency scanning/checkout is required to prevent queues during high traffic. See also Ch 04 Section L.6 for TPS targets and latency budgets.

Architectural Implications:

  • Optimized database indexes
  • Read replicas for query-heavy operations
  • Caching strategies (Redis)
  • Async processing for non-critical operations

Multi-Tenant Performance Considerations

Row-Level Security isolation (from Ch 04 Section L.10A.4) has specific performance implications for connection pooling and query execution:

Connection Pooling:

Connection Pool Strategy (Row-Level Security)
==============================================

                    +------------------+
                    |  Connection Pool |
                    |  (PgBouncer)     |
                    +--------+---------+
                             |
        +--------------------+--------------------+
        |                    |                    |
        v                    v                    v
+-------+-------+   +--------+------+   +---------+-----+
| Connection 1  |   | Connection 2  |   | Connection 3  |
| Shared pool   |   | Shared pool   |   | Shared pool   |
| All tenants   |   | All tenants   |   | All tenants   |
+---------------+   +---------------+   +---------------+

Tenant context set per-transaction via middleware:
  SET LOCAL app.current_tenant_id = '<tenant-uuid>';

Use transaction pooling mode in PgBouncer.
Connections are shared across all tenants (no per-tenant pools).

Query Performance:

Row-Level Security uses composite indexes on (tenant_id, ...) so that the RLS policy filter and application query merge into a single efficient index scan:

-- Composite index ensures tenant_id filter is nearly free
CREATE INDEX idx_products_tenant_sku ON products(tenant_id, sku);
CREATE INDEX idx_sales_tenant_date ON sales(tenant_id, sale_date);

-- RLS policy automatically appends tenant filter
-- Application writes simple queries:
SELECT * FROM products WHERE sku = 'NXP0001';
-- PostgreSQL rewrites to:
SELECT * FROM products
 WHERE sku = 'NXP0001'
   AND tenant_id = current_setting('app.current_tenant_id')::uuid;

The composite index prefix on tenant_id ensures the RLS predicate adds negligible overhead — PostgreSQL’s query planner merges the policy filter with application predicates for a single index scan. Shared tables also improve cache utilization for common catalog data.

Tenant Performance Isolation

Row-Level Security provides logical performance isolation between tenants. Composite indexes on (tenant_id, ...) ensure each tenant’s queries scan only their own rows, so a tenant with a large product catalog does not degrade query performance for other tenants. Maintenance operations can target tenant-specific data using partial operations:

-- Analyze statistics for tenant-heavy tables
VACUUM ANALYZE products;
VACUUM ANALYZE sales;

-- Partial reindex targeting specific indexes
REINDEX INDEX CONCURRENTLY idx_products_tenant_sku;

-- Monitor per-tenant table bloat via pg_stat_user_tables
-- Alert when dead_tup_ratio exceeds threshold

K.3 Implicit Characteristics

These characteristics are inherently required but not explicitly driving architectural decisions.

CharacteristicDefinitionJustification
Developer Experience (DevEx)The ease with which developers can interact with the system’s tools, code, and processes.Security Enabler: High “False Positive” rates from surface-level scanners cause developers to bypass security. We prioritize Deep SAST (accuracy) and AI-Remediation to ensure security does not degrade velocity.
IdempotencyThe guarantee that repeating the same operation produces the same result without side effects.BRD Section 6.2.5 mandates an idempotency framework with 24-hour deduplication windows and SHA-256 keying. Shopify @idempotent mutations become mandatory 2026-04. Critical for retry-safe integration operations.
TestabilityThe degree to which the system supports testing at all levels.BRD v18.0 defines 36 user stories with Gherkin acceptance criteria. Three platform sandboxes (Shopify Dev Store, Amazon SP-API Sandbox, Google Merchant test account) require contract testing. Architecture must support isolation for unit, integration, and E2E tests.
ObservabilityThe ability to understand system state from external outputs (logs, metrics, traces).Multi-platform monitoring across 3 external channels requires first-class treatment. Integration-specific metrics: circuit breaker state, DLQ depth, sync latency, safety buffer violations, disapproval rate. LGTM stack (Loki, Grafana, Tempo, Prometheus).
ModularityDegree to which a system is composed of discrete components.Update tax logic without breaking inventory system. Module boundaries must be clean enough for independent Claude Code agent development.
Fault ToleranceWhen fatal errors occur, other parts of the system continue to function.Local client survival is required; POS must function if cloud crashes. Integration circuit breaker prevents external API failures from cascading to core POS operations.
AdaptabilityDegree to which a product can be adapted for new environments.Rapid adoption of new retail trends (social commerce). Module 6 designed as Extractable Integration Gateway for future independent deployment.

K.4 Others Considered

These characteristics were evaluated but not prioritized as driving characteristics:

CharacteristicWhy Not Selected
RecoverabilityCovered by Availability + Event Sourcing (replay capability)
Safety & Code QualityAddressed through Security characteristic (6-gate Security Test Pyramid) and DevSecOps pipeline

K.5 Characteristic Trade-offs

Understanding trade-offs between characteristics is critical for making consistent architectural decisions.

Trade-off Matrix

+------------------+------------------+------------------+------------------+------------------+
|                  |   AVAILABILITY   |   CONSISTENCY    |    COMPLIANCE    |  CONFIGURABILITY |
+------------------+------------------+------------------+------------------+------------------+
| AVAILABILITY     |        -         |    TENSION       |   NEUTRAL        |   SUPPORTS       |
| (Online+Fallback)|                  | (Eventual Sync)  |                  | (Local config)   |
+------------------+------------------+------------------+------------------+------------------+
| CONSISTENCY      |    TENSION       |        -         |   SUPPORTS       |   TENSION        |
| (Data Sync)      | (Offline Mode)   |                  | (Audit Trail)    | (Config changes) |
+------------------+------------------+------------------+------------------+------------------+
| COMPLIANCE       |   NEUTRAL        |   SUPPORTS       |        -         |   SUPPORTS       |
| (Regulations)    |                  | (Audit Trail)    |                  | (Jurisdiction)   |
+------------------+------------------+------------------+------------------+------------------+
| CONFIGURABILITY  |   SUPPORTS       |    TENSION       |   SUPPORTS       |        -         |
| (Multi-level)    | (Local config)   | (Config changes) | (Jurisdiction)   |                  |
+------------------+------------------+------------------+------------------+------------------+
| PERFORMANCE      |   SUPPORTS       |    TENSION       |    TENSION       |    TENSION       |
| (Low Latency)    | (Local Cache)    | (Sync Overhead)  | (Validation)     | (Resolution)     |
+------------------+------------------+------------------+------------------+------------------+
| SECURITY         |    TENSION       |   SUPPORTS       |   SUPPORTS       |   NEUTRAL        |
| (Deep Scans)     | (Scan Time)      | (Audit Trail)    | (PCI-DSS)        |                  |
+------------------+------------------+------------------+------------------+------------------+

Key Trade-off Decisions

Trade-offDecisionRationale
Availability vs. ConsistencyAccept Eventual ConsistencyOnline-first with offline fallback (ADR-048); inventory sync can tolerate short delays during brief outages
Performance vs. Security6-gate Security Pyramid with CI/CD gatesSecurity gates run in CI/CD pipeline, not at runtime; only contract tests add deployment time
Performance vs. ComplianceAsync platform validationCross-platform validation runs asynchronously before channel publication; does not block POS checkout
Scalability vs. SimplicityRow-Level Isolation with RLS in Modular MonolithFull tenant isolation via PostgreSQL RLS without schema-per-tenant or microservices complexity
Compliance vs. PerformanceStrictest-rule-wins cached validationValidation rules cached and applied at publish-time, not checkout-time

K.6 Characteristic-to-Chapter Mapping

Quick reference for finding characteristic implementations in the blueprint:

CharacteristicPrimary ChaptersKey Sections
AvailabilityCh 04(L.10A.1)Online-First with Offline Fallback (ADR-048)
InteroperabilityCh 05 Module 6Integration Patterns, ACL, Provider Abstraction
Data ConsistencyCh 04(L.4A), Ch 07Event Sourcing, Schema Design
SecurityCh 04(L.8)6-Gate Security Pyramid, PCI-DSS Compliance
ComplianceCh 05 Module 6Platform Policy Validation, Regulatory Compliance
ModifiabilityCh 04(L.9A)Plugin Architecture, Hardware Layer
ScalabilityCh 04(L.10A.4)Multi-Tenancy (RLS)
ConfigurabilityCh 04(L.10A.4), Ch 05 Module 5Feature Toggles, Safety Buffers, YAML Config
PerformanceCh 09, Ch 04(L.6)Indexes, TPS targets and latency budgets
DevExCh 04(L.6)QA & Testing Strategy
IdempotencyCh 05 Module 6Idempotency Framework, Dedup Windows
TestabilityCh 04(L.6)Contract Testing, Platform Sandboxes
ObservabilityCh 04(L.7)LGTM Stack, Integration Metrics
ModularityCh 04(L.9A), Ch 04(L.9C)Domain Model, Module Boundaries
Fault ToleranceCh 04(L.10A.1)Online-First with Offline Fallback, Circuit Breaker
AdaptabilityCh 05 Module 6Integration Adapters, Extractable Gateway

K.7 Review Schedule

Review TypeFrequencyTrigger Events
Scheduled ReviewQuarterly-
Event-Driven ReviewAs neededNew integration requirements, Security incidents, Performance degradation, New tenant requirements

K.8 Non-Functional Requirements (NFRs)

This section defines measurable targets that validate the architecture characteristics. All NFRs are traceable to BRD requirements.

K.8.1 Performance Requirements

Requirement IDCategoryTargetSourceValidation Method
NFR-PERF-001Checkout Latency< 500ms p99BRD-v20 (implied)Load testing
NFR-PERF-002RFID Bulk Lookup< 200ms for 50 tagsBRD-v20 §1.1E2E testing
NFR-PERF-003Price Calculation< 100msBRD-v20 §1.2Unit testing
NFR-PERF-004Tax Calculation< 50msBRD-v20 §1.17Unit testing
NFR-PERF-005Product Search< 300msImplicitLoad testing
NFR-PERF-006Receipt Generation< 200msImplicitE2E testing

Performance Budget:

Total Checkout Time Budget: 500ms
├── Item Lookup:        100ms
├── Price Calculation:  100ms
├── Tax Calculation:     50ms
├── Payment Processing: 150ms (excluding terminal wait)
└── Receipt/Finalize:   100ms

K.8.2 Availability Requirements

Requirement IDCategoryTargetSourceValidation Method
NFR-AVAIL-001Cloud API Uptime99.9% (8.76 hrs/year downtime)ImplicitMonitoring
NFR-AVAIL-002Offline Queue SizeMax 100 transactionsBRD-v20 §1.16.2Configuration
NFR-AVAIL-003Sync Interval30 secondsBRD-v20 §1.16.2Configuration
NFR-AVAIL-004Parked Sale TTL4 hoursBRD-v20 §1.1.1Configuration
NFR-AVAIL-005Parked Sales per TerminalMax 5BRD-v20 §1.1.1Configuration
NFR-AVAIL-006Payment Terminal Timeout60 secondsBRD-v20 §1.18.2Configuration
NFR-AVAIL-007Connection Timeout10 secondsBRD-v20 §1.18.2Configuration

Availability Tiers:

Cloud Services:     99.9% (allows ~8.76 hrs downtime/year)
POS Terminal:       99.99% (via online-first architecture with thin offline fallback per ADR-048 — brief network outages handled by 2-table SQLite cache and FIFO sales queue)
Database (Primary): 99.95% (with automatic failover)

K.8.3 Scalability Requirements

Requirement IDCategoryTargetSourceValidation Method
NFR-SCALE-001Concurrent Users500 (Black Friday peak)BRD-v20 (implied)Load testing
NFR-SCALE-002Transactions per Second1,000 TPSChapter 04 L.6Load testing
NFR-SCALE-003Tenant Count100+ tenantsChapter 03Architecture
NFR-SCALE-004Export Row Limit1,000 rows maxBRD-v20 §2.5Configuration
NFR-SCALE-005Date Range for Reports365 days maxBRD-v20 YAMLConfiguration
NFR-SCALE-006RFID Tags per Request50 maxBRD-v20 §1.1Configuration

Scaling Strategy:

Stateless API Layer:  Horizontal scaling (Kubernetes HPA)
Database:            Vertical scaling + Read replicas + RLS per tenant
Event Stream:        PostgreSQL event tables (v1.0), Kafka partitioning (v2.0)
File Storage:        Object storage (S3-compatible)

K.8.4 Integration & Timeout Requirements

Requirement IDCategoryTargetSourceValidation Method
NFR-INT-001Payment Timeout60 secondsBRD-v20 §1.18.2Configuration
NFR-INT-002Connection Timeout10 secondsBRD-v20 §1.18.2Configuration
NFR-INT-003Multi-Store Data StalenessMax 5 minutesBRD-v20 §1.7Monitoring
NFR-INT-004Batch Close Time23:00 dailyBRD-v20 §1.18.2Configuration
NFR-INT-005External API Retry3 attempts with backoffImplicitConfiguration
NFR-INT-006Webhook DeliveryAt-least-onceImplicitArchitecture

Integration Patterns:

Synchronous:   REST APIs with circuit breaker
Asynchronous:  Event-driven via PostgreSQL Events + LISTEN/NOTIFY (v1.0)
Webhooks:      Inbound (Shopify/Amazon) + Outbound with Transactional Outbox
File Transfer: SFTP/S3 for bulk imports

K.8.5 Data & Compliance Requirements

Requirement IDCategoryTargetSourceValidation Method
NFR-DATA-001Consent Audit Retention7 yearsBRD-v20 YAMLPolicy
NFR-DATA-002Privacy Request Response30 daysBRD-v20 §2.5Process
NFR-DATA-003Transaction Data Retention7 years (tax compliance)ImplicitPolicy
NFR-DATA-004Gift Card Minimum Expiry5 years (Virginia)BRD-v20 §1.5.2Configuration
NFR-DATA-005Auto-Anonymize InactiveConfigurable (0 = never)BRD-v20 YAMLConfiguration

Data Classification:

Level 1 (Restricted):  Card data (prohibited storage)
Level 2 (Sensitive):   Customer PII, credentials
Level 3 (Internal):    Transaction data, inventory
Level 4 (Public):      Product catalog, store hours

K.8.6 Security Requirements

Requirement IDCategoryTargetSourceValidation Method
NFR-SEC-001PCI ScopeSAQ-A (no card data stored)BRD-v20 §1.18PCI Audit
NFR-SEC-002Payment Data StorageToken only, no PANBRD-v20 §1.18.1Code review
NFR-SEC-003Manager Auth for OverridesPIN requiredBRD-v20 §1.2E2E testing
NFR-SEC-004Blind CountExpected not shownBRD-v20 §1.12UI testing
NFR-SEC-005Variance ToleranceConfigurable ($5 default)BRD-v20 §1.12Configuration
NFR-SEC-006Session Timeout15 minutes inactivityImplicitConfiguration
NFR-SEC-007Password PolicyMin 12 chars, complexityImplicitConfiguration

SAQ-A Compliance - Data Storage Rules:

STORED (Allowed):
   - Payment tokens
   - Approval codes
   - Masked card number (****1234)
   - Card brand (Visa, MC, etc.)
   - Terminal ID

PROHIBITED (Never store):
   - Full card number (PAN)
   - CVV/CVC
   - Track data
   - PIN block
   - EMV cryptogram (raw)

K.8.7 Integration Requirements (BRD v18.0)

Requirement IDCategoryTargetSourceValidation Method
NFR-INTG-001Shopify Sync Latency< 5 seconds (webhook processing)BRD-v18 §6.3Integration testing
NFR-INTG-002Amazon Sync Latency< 2 minutes (polling interval)BRD-v18 §6.4Integration testing
NFR-INTG-003Google Batch Sync2x/day + real-time local inventoryBRD-v18 §6.5Integration testing
NFR-INTG-004Circuit Breaker Threshold5 failures / 60 seconds → OPENBRD-v18 §6.2.4Unit testing
NFR-INTG-005DLQ Retry Policy3 attempts, exponential backoffBRD-v18 §6.2.3Integration testing
NFR-INTG-006Safety Buffer Calculation< 100ms per product per channelBRD-v18 §6.7.2Performance testing
NFR-INTG-007Integration Health CheckEvery 60 seconds per providerBRD-v18 §6.11Monitoring
NFR-INTG-008Idempotency Window24-hour dedup with SHA-256 keyBRD-v18 §6.2.5Unit testing
NFR-INTG-009Credential RotationAutomated every 90 daysBRD-v18 §6.2.2Operations

Integration Performance Budget:

Shopify Webhook Processing: < 5s
├── Receive + Validate Signature:  100ms
├── Deserialize + Map to Domain:   200ms
├── Business Logic Processing:     2,000ms
├── Database Persistence:          500ms
└── Outbox Event Publication:      200ms
     (Buffer):                     2,000ms

Amazon SP-API Polling Cycle: < 2min
├── OAuth Token Refresh (if needed): 500ms
├── API Call (paginated):            5,000ms
├── Response Mapping:                1,000ms
├── Inventory Delta Calculation:     2,000ms
└── Database + Outbox:               1,500ms
     (Buffer):                       110,000ms

K.8.8 NFR Traceability Matrix

This matrix links NFRs to Architecture Characteristics:

CharacteristicRelated NFRs
AvailabilityNFR-AVAIL-001 through NFR-AVAIL-007
PerformanceNFR-PERF-001 through NFR-PERF-006
ScalabilityNFR-SCALE-001 through NFR-SCALE-006
SecurityNFR-SEC-001 through NFR-SEC-007
InteroperabilityNFR-INT-001 through NFR-INT-006
Data ConsistencyNFR-DATA-001 through NFR-DATA-005
ComplianceNFR-DATA-001 through NFR-DATA-005, NFR-INTG-001 through NFR-INTG-009
ConfigurabilityNFR-INTG-006 (Safety Buffer), platform-specific targets

NFR Validation Schedule

NFR CategoryValidation FrequencyResponsible Team
PerformanceEvery release + quarterly load testQA + DevOps
AvailabilityContinuous monitoringDevOps
ScalabilityQuarterly load testDevOps
SecurityAnnual PCI audit + continuous scansSecurity
IntegrationEvery release + monthly provider syncQA + Integration Team
ComplianceAnnual auditCompliance

Document Information

AttributeValue
Version7.0.0
Created2026-01-24
Updated2026-03-02
SourceArchitecture Characteristics Worksheet v2.0, BRD-v18.0, Chapters 02/03/05/06
AuthorClaude Code
ReviewerExpert Panel (Marcus Chen, Sarah Rodriguez, James O’Brien, Priya Patel)
StatusActive
PartII - Architecture
Chapter03 of 9
PreviousChapter 11 v1.1.0 (pre-restructure numbering; backup at Chapter-11-Architecture-Characteristics.md.backup-v18.0)

Change Log

VersionDateChanges
1.0.02026-01-24Initial document
1.1.02026-01-26Added Section K.8 (Non-Functional Requirements) with 37 NFRs from BRD-v20
2.0.02026-02-19Expert panel review (6.50/10): Expanded to Top 9 driving characteristics (added Compliance, elevated Configurability); rewrote Interoperability with 6 provider families, 3 auth models, 3 rate-limiting paradigms; rewrote Security with 5 concrete sub-domains and 6-gate Security Test Pyramid; added Idempotency, Testability, Observability as implicit; added K.8.7 Integration Requirements (9 NFRs from BRD v18.0 Module 6); updated multi-tenancy from Schema-Per-Tenant to Row-Level with RLS; updated event infrastructure from Kafka to PostgreSQL Events (v1.0)
3.0.02026-02-22Enriched with cross-chapter evidence from former Ch 05/06/08/09; all chapter references renumbered for v3.0.0 (39-chapter to 34-chapter consolidation)
5.2.02026-02-27Fixed 6 schema-per-tenant references → Row-Level Security (RLS) with tenant_id + current_setting('app.current_tenant_id'). Updated connection pooling diagram, query performance, tenant isolation, security evidence, and compliance sections
7.0.02026-03-02Unified web app pivot: Nexus Admin → Nexus POS in API gateway IP whitelisting diagram. All footers to 7.0.0

Next Chapter: Chapter 04: Architecture Styles Analysis


This chapter is part of the POS Blueprint Book. All content is self-contained.