Architecture & Integrations

Technology stack

LayerTechnology
LanguagePHP 8.1+
FrameworkLaravel 10 (laravel/framework ^10.48)
Application serverLaravel Octane running on OpenSwoole
AuthenticationLaravel Sanctum (token based)
Cache / queue / rate limitingRedis
DatabaseSQL Server (shared schema, migrated by the Cadence / Velo Admin app)
File storageLocal disk (FILESYSTEM_DISK=local)
ContainerizationDocker (Octane image built on php:8.x-cli-bookworm)
HostingAzure Container Apps (production behind Cloudflare)

:::note Octane In production the app runs under Supervisor as php artisan octane:start --server=swoole --host=0.0.0.0 --port=9000. Because Octane keeps the framework booted in memory between requests, you must restart the Octane/queue workers after code changes so new code is picked up. :::

Third-party integrations

The API connects to a number of external services. Credentials for all of these live in the environment file (stored in Keeper — see Local Development).

ServicePurposeKey env vars
Converge / ElavonCredit card payment processing. Multiple merchant accounts are configured (one per region/program).MERCHANT_ID_*, MERCHANT_PIN_*, MERCHANT_USER_ID_*, TEST_MERCHANT_*
SezzleBuy-now-pay-later / installment paymentsSEZZLE_PUBLIC_KEY, SEZZLE_PRIVATE_KEY
HubSpotCRM sync for customers and registrationsHUBSPOT_API_KEY, HUBSPOT_REGISTRATION_OBJECT_ID
FriendBuyReferral programFRIENDBUY_WEBHOOK_SECRET
SentryError monitoring and performance tracingSENTRY_LARAVEL_DSN, SENTRY_TRACES_SAMPLE_RATE
Cloudflare TurnstileBot protection on public formsTURNSTILE_ENABLED, TURNSTILE_SITE_KEY, TURNSTILE_SECRET
PusherReal-time broadcastingPUSHER_APP_*

:::note Cloudflare Production traffic is fronted by Cloudflare (in addition to Cloudflare Turnstile for bot protection). Because requests arrive through Cloudflare’s proxy, the app relies on trusted-proxy / client-IP resolution so that IP-based rate limiting sees the real client IP rather than Cloudflare’s. :::

:::tip Converge / Elavon There is a dedicated converge-docs skill in .github/skills/ that documents the Converge/Elavon XML API, STP test host responses, and decline handling. Use it when debugging payment gateway responses. :::

Security & abuse protection

The API includes several built-in abuse-protection features configured via environment variables:

  • IP rate limiting on login, registration, and token endpoints (ip.throttle middleware — IP_RATE_LIMITING_ENABLED, IP_LIMIT_*).
  • Card-testing / fraud protection with soft and hard limits on card attempts and stricter rules for new accounts (CARD_STRICT_*, CARD_TESTING_AUTO_BAN_ENABLED).
  • Disposable / blocked email domain filtering (DISPOSABLE_EMAIL_BLOCKING_ENABLED, BLOCKED_EMAIL_DOMAINS, APPROVED_EMAIL_DOMAINS).
  • Email verification flow for new accounts.