Delivered remotely for a business based in Dubai, United Arab Emirates. Names withheld by agreement.
Project Overview
Paid dining membership programs succeed on trust from both sides of the table: subscribers expect effortless discovery and predictable savings, while restaurant partners require strict guardrails so discounts apply only within agreed hours, tiers, and monthly caps. For a hospitality loyalty operator in Dubai, we delivered a native Swift iOS app backed by a Laravel and MySQL platform, complete with OAuth security via Laravel Passport and a Bootstrap and jQuery management portal for venues and program curators. The system turns complex multi-restaurant discount contracts into crisp mobile offers that verify tableside in seconds.
Business Bottleneck
Manual voucher books and static coupon codes failed to scale across fast-moving hospitality groups. Restaurants complained about screenshots shared in group chats, off-hours redemptions on public holidays, and zero visibility into whether repeat guests or one-off bargain hunters were redeeming deals. Meanwhile, operations staff struggled to update seasonal brunch exclusions or onboarding packages without engineering intervention, and subscribers abandoned discovery flows when map listings loaded sluggishly across dense dining neighborhoods.
Architectural Strategy
We built a unified Laravel domain core that enforces subscription entitlements and offer rules uniformly across consumer and merchant surfaces. Authentication relies on Laravel Passport OAuth2 flows with distinct token scopes and single-active-device enforcement for paid subscribers. Spatial queries in MySQL index venue coordinates so the Swift app renders nearby restaurants and active filters rapidly, while the Bootstrap and jQuery web portal empowers partner managers and internal staff to adjust offer calendars, verify merchant PINs, and export redemption ledgers without code deploys.
Core Capabilities
- Geolocation Venue Discovery: The Swift client groups participating restaurants by proximity, cuisine, dining format, and live availability based on the user's subscription tier.
- Rule-Aware Deal Eligibility: Each dining privilege evaluates tier permissions, day-of-week schedules, holiday blackout calendars, and per-user cooldown windows prior to unlock.
- Tableside PIN & Receipt Verification: Cashiers validate redemptions using rotating venue PINs, generating an immutable confirmation badge and reference number on both screens.
- Subscription Lifecycle Management: Automated renewal tracking, trial-to-paid transitions, and grace-period handling govern active membership passes cleanly.
- Partner & Operations Console: Built with Bootstrap and jQuery, the web portal lets staff curate venue profiles, upload photography, configure blackout dates, and audit redemptions.
- Savings & Usage Ledger: Subscribers track cumulative redemptions and personal dining history while partners inspect peak redemption days and deal uptake.
Technical Architecture
Flow: Swift iOS Client (CoreLocation) -> Laravel Passport OAuth2 -> Laravel Eligibility & Redemption API -> MySQL Spatial & Ledger Tables -> Bootstrap/jQuery Partner Portal
When the Swift application opens, CoreLocation coordinates pass to a spatial search endpoint backed by MySQL POINT columns and spatial indexes, returning nearby venues filtered by current server-local time in Dubai. Tapping a dining privilege invokes a pre-flight eligibility check that verifies active subscription status, device binding, and historical redemption counts in voucher_redemptions.
During tableside checkout, the subscriber selects the eligible deal and presents the verification prompt to restaurant staff. Submitting the merchant PIN executes a pessimistic lock on the user's entitlement record inside a MySQL transaction, validates the PIN against the venue's salted hash, writes the redemption row with an idempotency token, and returns a high-contrast timestamped confirmation view in Swift. On the web side, Laravel renders Bootstrap views augmented with jQuery DataTables and AJAX controls so curators edit multi-branch schedules, manage seasonal brunch exclusions, and export CSV reconciliation reports without full-page reloads. Each partner group receives scoped OAuth credentials isolating their branch records from competing hospitality operators.
Technology Stack
| Category | Technology detail |
|---|---|
| iOS Application | Native Swift with CoreLocation venue discovery and interactive redemption wallet |
| Backend Framework | Laravel (PHP 8) serving REST APIs and server-rendered management portals |
| Admin & Partner UI | Bootstrap responsive layout with jQuery dynamic offer and audit tables |
| Database Engine | MySQL with spatial distance indexing and transactional redemption logs |
| API Authorization | Laravel Passport implementing OAuth2 authorization and token scoping |
| Identity & Access | OAuth2 role separation between subscriber apps and partner portals |
| Eligibility Engine | Custom Laravel rule evaluator for blackout dates, tiers, and cooldowns |
| Reporting Layer | SQL-backed savings and venue redemption analytics for partner reviews |
Engineering Trade-offs & Solutions
| Challenge | Architectural Solution |
|---|---|
| Screenshot sharing and static coupon abuse | Live animated confirmation screens tied to real-time server timestamps and unique reference codes per tableside transaction |
| Account sharing across multiple family phones | Single-active-device enforcement inside Laravel Passport OAuth token issuance, automatically invalidating older device sessions |
| Rigid POS integration blocking venue onboarding | Lightweight merchant PIN verification inside the subscriber's Swift flow, requiring zero cash-register hardware modifications |
| Multi-branch schedule edits by non-technical staff | Server-rendered Bootstrap and jQuery admin workflows with reusable calendar templates and instant validation |
| Double voucher consumption on weak restaurant signal | Client-supplied idempotency keys persisted in MySQL unique constraints so retried confirmations resolve to the original receipt |
Security & Reliability
All API endpoints communicate over TLS and enforce Laravel Passport OAuth2 bearer validation with granular scopes separating subscriber read/redeem permissions from back-office administration. Restaurant merchant PINs are stored exclusively as salted cryptographic hashes and support instant rotation by venue managers whenever staff turn over. Failed PIN attempts trigger progressive throttling per user and venue to block brute-force guessing at the table. MySQL transactional isolation prevents concurrent redemption taps from bypassing monthly usage limits, while automated database backups protect subscriber histories and partner audit logs.
Performance & Scale
Dining traffic concentrates sharply around lunch hours and Thursday-to-Saturday dinner windows. To keep Swift browse screens crisp under concurrent load, venue catalogs and curated neighborhood collections cache in indexed memory structures with targeted invalidation whenever an operator updates a restaurant profile in the Bootstrap portal. MySQL spatial indexes prune distance calculations before rule evaluation runs, keeping neighborhood discovery queries fast regardless of catalog expansion. Static assets and venue photography serve through cache-friendly headers so returning subscribers experience near-instantaneous card rendering.
Operational Outcomes
Replacing static vouchers with PIN-verified, rule-driven digital redemptions gave participating restaurants verifiable proof of guest traffic and enforced contractual blackout windows automatically. Internal operations teams gained direct control over partner onboarding, tier configuration, and dispute resolution through the Bootstrap and jQuery portal without waiting on mobile app releases. For paying subscribers, Swift geolocation search and smooth tableside verification turned dining discovery into a dependable everyday habit.