api
# Food Delivery App Backend
High-performance RESTful API backend for a food delivery mobile app with real-time order tracking, Firebase push notifications, and Redis caching.
Overview
The complete API backend for a Dhaka-based food delivery startup serving both iOS and Android apps. Built with Laravel Sanctum for token-based auth.
Endpoints cover: restaurant and menu management, food customization options, cart and checkout, order lifecycle (placed → accepted → prepared → picked up → delivered), real-time GPS tracking of delivery agents, driver earnings calculation, rating and review system, and admin analytics dashboard.
Endpoints cover: restaurant and menu management, food customization options, cart and checkout, order lifecycle (placed → accepted → prepared → picked up → delivered), real-time GPS tracking of delivery agents, driver earnings calculation, rating and review system, and admin analytics dashboard.
Problem & Solution
Problem
The startup had a mobile app built by a third-party team, but the backend could not handle peak-hour load (500+ concurrent orders). The previous monolithic API had no caching and queried the database on every request.
Solution
Rebuilt the API with a service-layer architecture. Used Redis for caching restaurant menus and user sessions. Order status changes trigger Firebase Cloud Messaging for instant push notifications. Laravel Horizon monitors queue workers for delivery tracking jobs.
Outcomes
API handles 1,000+ req/sec under load
Average response time: 85ms
Zero downtime deployment via Docker
30,000+ orders processed in first month