9 Mobile Application Backend APIs
Production-Grade REST APIs for iOS & Android
Architected and deployed production-grade RESTful APIs for 9 mobile applications (iOS & Android) spanning hotel booking, attendance tracking, ride-hailing, logistics, e-commerce, and HR systems. Each API features Sanctum JWT authentication, FCM push notifications, WebSocket integration, and highly optimized database queries.
Architecture & System Design
Each mobile backend follows a modular Laravel API architecture with Sanctum token authentication, versioned API endpoints, and FCM integration for push notifications. The systems share common patterns but are independently deployable with app-specific business logic.
- Shared authentication pattern across all 9 apps using Sanctum with device-specific token management
- FCM push notification service with per-app topic subscriptions and targeted user notifications
- Database query optimization reduced N+1 queries by 90% using eager loading and query scoping
- API versioning strategy (v1/v2) for backward compatibility during mobile app updates
Engineering Challenges
Cross-Platform Token Management
Managing authentication tokens across 9 different mobile apps with varying session requirements and device types (iOS, Android, tablets).
Built a unified token management system using Sanctum with device fingerprinting, per-device token limits, and automatic token rotation for security.
Single auth system serving 9 apps. Token-related support tickets dropped by 95%.
Push Notification at Scale
Sending targeted push notifications across 9 apps with different FCM configurations, user segments, and delivery priorities.
Created a centralized notification service with per-app FCM configuration, topic-based subscriptions, queued delivery with retry logic, and delivery confirmation tracking.
1M+ notifications delivered with 99.2% delivery rate and < 2s average delivery time.
API Response Optimization
Mobile apps on 3G/4G networks needed minimal payload sizes and fast response times to maintain good user experience.
Implemented API Resource transformers for lean payloads, conditional field inclusion, pagination with cursor-based navigation, and Redis caching for frequently accessed data.
Average API response time: 45ms. Payload sizes reduced by 60% with selective field loading.
Core Features
Hotel Booking System
Real-time room availability, date-range searching, payment processing, and booking confirmation with automated email/SMS.
Clean Code
1<?php23namespace App\Services;45use App\Models\User;6use Illuminate\Support\Facades\Http;78class FCMNotificationService9{10 public function sendToUser(11 User $user,12 string $title,13 string $body,14 array $data = []15 ): void {16 $tokens = $user->deviceTokens()17 ->where('is_active', true)18 ->pluck('fcm_token');1920 $tokens->chunk(500)->each(21 fn ($chunk) => SendPushNotification::dispatch(22 $chunk->toArray(),23 compact('title', 'body', 'data')24 )25 );26 }27}