Delivered remotely for a business based in Geneva, Switzerland. Names withheld by agreement.
Project Overview
Purchasing a vehicle online breaks down whenever inventory selection and consumer financing live in disconnected systems. Buyers configure a car on a showroom site, then get redirected to static PDF forms or generic bank portals where vehicle pricing, residual values, and trade-in equity have to be re-entered manually. That handoff creates friction, stale quotes, and operational rework for dealership finance desks.
This engineering effort delivered an integrated web and API platform in PHP and Laravel that keeps vehicle configuration, financing calculation, document collection, and dealership handoff inside one cohesive state machine. Prospective buyers move from vehicle selection through monthly installment modeling and credit submission without leaving the core application, while finance specialists and compliance reviewers operate from dedicated internal consoles backed by the same transactional data model.
Business Bottleneck
Dealership groups and captive finance teams faced three compounding operational obstacles before consolidation:
- Quote drift between showroom and lender: Monthly payment estimates calculated on marketing pages frequently diverged from regulated lender rate cards once fees, mileage caps, or down-payment adjustments were applied.
- Opaque application drop-offs: Fragmented forms across third-party iframes prevented engineers from tracking where applicants abandoned identity checks or income verification.
- Brittle deployment cycles: Manual server file transfers made hotfixes risky during peak promotional campaigns, leaving finance parameter updates queued behind manual maintenance windows.
Architectural Strategy
Rather than splitting the buyer experience across a decoupled frontend SPA and multiple microservices early on, the architecture adopts a modular Laravel monolith backed by MySQL and Redis. Domain boundaries separate catalog management, finance calculation, applicant underwriting, and fulfillment into distinct internal modules with explicit service contracts.
Blade templates render the customer-facing checkout stages directly from the server. This keeps lender rate tables, margin rules, and eligibility thresholds strictly on the backend, eliminating any possibility of client-side tampering while delivering fast initial page loads across desktop and mobile browsers. Where external dealership CRMs or document verification partners require programmatic access, Laravel Sanctum exposes tightly scoped API endpoints with token ability checks.
Core Capabilities
- Dynamic Finance Structuring: Real-time recalculation of lease, balloon, and installment schedules based on vehicle trim, term length, mileage allowance, and deposit ratios.
- Stateful Application Funnel: Resumable multi-stage onboarding covering personal details, residency history, employment income, and trade-in appraisal attachments.
- Encrypted KYC Document Vault: Browser uploads stream directly to private storage with MIME verification, antivirus scanning hooks, and time-bounded signed URLs for underwriter inspection.
- Underwriter Review Workbench: Role-gated internal queue enabling credit analysts to request supplementary proof, adjust approved terms, and issue conditional or final approvals.
- Dealership Fulfillment Sync: Outbound event notifications and Sanctum-authenticated endpoints allowing showroom advisors to reserve VINs and schedule handover appointments once financing clears.
Technical Architecture
The application pairs synchronous Blade HTTP request handling for buyer interactions with asynchronous Redis queue workers for slow third-party integrations.
Flow: Browser Request -> Nginx/PHP-FPM -> Laravel Router & Sanctum Auth -> Domain Service (Quote / Underwriting) -> MySQL Transaction + Redis Queue -> External Credit Bureau / KYC Adapter -> Signed Webhook & Status Update.
Every finance quote is persisted as an immutable snapshot tied to a specific vehicle stock identifier and rate-card version. If an applicant returns days later to resume an incomplete submission, the system validates whether the underlying vehicle remains unreserved and whether the quoted rate card is still active before allowing progression.
Technology Stack
| Category | Technology Detail |
|---|---|
| Backend Framework | Laravel (PHP) handling domain workflows, validation, and policy enforcement |
| Server Rendering | Blade templates for deterministic, low-latency checkout and form steps |
| API Authentication | Laravel Sanctum managing SPA cookies and scoped partner API tokens |
| Relational Storage | MySQL storing vehicle inventory, loan quotes, and immutable audit trails |
| Queue & Cache Layer | Redis backing asynchronous bureau lookups, document jobs, and session state |
| Local Environments | Docker Compose providing isolated PHP, web, database, and cache parity |
| Release Automation | Capistrano executing atomic symlink switches and zero-downtime rollbacks |
| Document Handling | Encrypted object storage with signed short-lived access URLs for KYC uploads |
Engineering Trade-offs & Solutions
| Architectural Dilemma | Chosen Solution & Rationale |
|---|---|
| Decoupled React/Vue SPA vs. Laravel Blade SSR | Selected Blade with targeted progressive enhancement to keep pricing logic server-only, avoid state synchronization bugs, and shorten time-to-interactive on form-heavy steps. |
| Synchronous bureau calls vs. queued underwriting jobs | Moved credit checks and PDF contract generation onto Redis-backed Laravel queues with idempotency keys so third-party latency never exhausts PHP-FPM workers. |
| Mutating active loan records vs. versioned snapshots | Stored each term adjustment as a new immutable quote revision linked to the application, guaranteeing clean regulatory audit trails if terms are contested later. |
| Full Kubernetes orchestration vs. Docker + Capistrano | Standardized developer machines with Docker Compose while automating production releases via Capistrano atomic symlinks, avoiding cluster operational overhead for a focused deployment footprint. |
Security & Reliability
Consumer finance applications process personally identifiable information, tax identifiers, and banking details that demand strict boundary enforcement. Laravel Sanctum handles both cookie-based session authentication for web applicants and bearer tokens for partner systems, ensuring CSRF protection on browser routes and fine-grained token abilities on API endpoints.
Sensitive applicant fields are encrypted at rest using application-managed keys, and database queries enforce strict ownership policies so applicants can never enumerate neighboring submissions. Input validation leverages dedicated Laravel Form Request classes with server-side state guards—preventing buyers from skipping directly to contract signing before identity and affordability stages pass verification.
Automated Capistrano scripts orchestrate zero-downtime releases by preparing each build in a timestamped directory, running database migrations safely, warming configuration and route caches, and flipping the current symlink atomically only after pre-flight checks succeed. If a regression appears post-release, rolling back to the previous release directory takes seconds.
Performance & Scale
Vehicle catalog browsing and installment previews generate read-heavy traffic whenever marketing campaigns launch, whereas credit submissions create concentrated transactional writes. To keep database contention low, vehicle pricing matrices and approved lender rate tables are cached in Redis with deterministic cache tags invalidated whenever inventory feeds update.
Database indexing targets composite keys on vehicle availability status, branch location, and application workflow stage so underwriter dashboards remain responsive even as historical applications accumulate. Queue workers are partitioned by priority: interactive OTP dispatches and document thumbnailing run on fast queues, isolated from slower batch inventory imports and lender reconciliation exports.
Operational Outcomes
Consolidating vehicle configuration and credit application handling into one Laravel codebase eliminated manual re-keying between showroom sales staff and finance underwriters. Dealership teams gained full visibility into where buyers paused in the financing journey, allowing advisors to step in with targeted support rather than losing leads to external bank portals. Meanwhile, Docker-backed local parity and Capistrano release automation turned deployments into predictable, reversible operations that engineering teams can execute during business hours without interrupting active buyers.