Architecture & Integrations
Technology stack
| Layer | Technology |
|---|---|
| Language | PHP 8.1+ |
| Framework | Laravel 10 (laravel/framework ^10.48) |
| Application server | Laravel Octane running on OpenSwoole |
| Authentication | Laravel Sanctum (token based) |
| Cache / queue / rate limiting | Redis |
| Database | SQL Server (shared schema, migrated by the Cadence / Velo Admin app) |
| File storage | Local disk (FILESYSTEM_DISK=local) |
| Containerization | Docker (Octane image built on php:8.x-cli-bookworm) |
| Hosting | Azure 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).
| Service | Purpose | Key env vars |
|---|---|---|
| Converge / Elavon | Credit card payment processing. Multiple merchant accounts are configured (one per region/program). | MERCHANT_ID_*, MERCHANT_PIN_*, MERCHANT_USER_ID_*, TEST_MERCHANT_* |
| Sezzle | Buy-now-pay-later / installment payments | SEZZLE_PUBLIC_KEY, SEZZLE_PRIVATE_KEY |
| HubSpot | CRM sync for customers and registrations | HUBSPOT_API_KEY, HUBSPOT_REGISTRATION_OBJECT_ID |
| FriendBuy | Referral program | FRIENDBUY_WEBHOOK_SECRET |
| Sentry | Error monitoring and performance tracing | SENTRY_LARAVEL_DSN, SENTRY_TRACES_SAMPLE_RATE |
| Cloudflare Turnstile | Bot protection on public forms | TURNSTILE_ENABLED, TURNSTILE_SITE_KEY, TURNSTILE_SECRET |
| Pusher | Real-time broadcasting | PUSHER_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.throttlemiddleware —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.