Skip to main content

Architecture

This page is the consolidated architecture and operating guide for Scottsdale Hub.

Platform Scope

  • Laravel 13 application runtime
  • Filament 5 admin and operations UI
  • Queue-first orchestration
  • Canonical data normalization layer for partner integrations
  • ECS Fargate runtime with Aurora MySQL, RDS Proxy, Redis, and SQS

Core Design Principles

  • Connector isolation by domain
  • Asynchronous and replayable operations
  • Auditable inbound and outbound payloads
  • Correlation-aware and idempotent transaction handling

Runtime Topology

flowchart LR
User[Client or operator] --> CF[CloudFront]
CF --> WAF[WAF]
WAF --> ALB[ALB HTTPS listener]
ALB --> API[ECS API service]

API --> Proxy[RDS Proxy]
Proxy --> DB[Aurora MySQL]
API --> Redis[ElastiCache Redis]
API --> EB[EventBridge]
EB --> SQS[SQS queues]
SQS --> Horizon[ECS Horizon workers]
Horizon --> DB
API --> Scheduler[ECS scheduler]

Request Flow Summary

  1. Requests enter CloudFront.
  2. WAF evaluates and forwards to ALB.
  3. ALB routes to API ECS tasks.
  4. API serves Laravel endpoints and Filament UI.
  5. API uses RDS Proxy and Redis.
  6. Async work is emitted to SQS/EventBridge and consumed by Horizon.

For full console tracing steps, use Request Flow and Console Runbook.

Runtime Services

API Service

  • Handles HTTP ingress and admin UI
  • Runs behind ALB target group
  • Uses /health endpoint for checks

Horizon Service

  • Runs php artisan horizon
  • Processes async jobs independently from API traffic
  • Scales separately from API service

Scheduler Service

  • Runs php artisan schedule:work
  • Executes recurring application commands out of web runtime

Ops Service

  • Operator shell for maintenance and diagnostics
  • Not in public request ingress path

Queue Taxonomy

Critical:

  • critical-orders
  • business-central
  • inventory-sync
  • pricing-sync

Standard:

  • woocommerce
  • shopify
  • products
  • inventory
  • pricing
  • shipstation
  • fishbowl
  • marketplaces
  • walmart
  • ebay

Recovery:

  • dead-letter
  • replay

Replay and Retention

Replay flow:

  1. Operator selects failed jobs in the admin replay page.
  2. Replay audit record is created.
  3. Replay job is dispatched to replay queue.
  4. Worker executes retry and updates audit state.

Retention commands:

  • php artisan retention:cleanup-replay-audits --days=30 --dry-run
  • php artisan retention:cleanup-failed-jobs --days=14 --dry-run

Security and Observability

  • KMS encryption for data and messaging services
  • Secrets Manager for runtime credentials
  • IAM least-privilege task and execution roles
  • CloudWatch logs, alarms, and dashboards for health and backlog visibility

Deploy Model Boundary

  • Bitbucket Pipelines deploy application images and ECS service rollouts
  • Amazon CDK deploys infrastructure stacks and topology
  • Infrastructure and app deploys are intentionally separate

See: