Hotel Booking App — Mobile API
Search, Availability, Booking & Payments for a Hotel Booking Mobile App

A versioned REST API powering a hotel booking app on iOS and Android. Guests search hotels by location and dates, see live room availability, book and pay in the app, manage their reservations and leave reviews after their stay. Hotel staff use the same backend to manage rooms, rates and bookings.
Architecture & System Design
Laravel API with token authentication via Sanctum. Availability is calculated from a room-night inventory table rather than by scanning bookings, so search stays fast as data grows. Payments run through Stripe PaymentIntents, and booking state changes are pushed to the guest's device with Firebase Cloud Messaging through queued jobs.
- Room-night inventory model makes date-range availability queries simple and indexable
- Short-lived booking holds stop two guests paying for the same room at the same time
- Stripe webhooks are the single source of truth for marking a booking as paid
- API resources and versioned routes (/api/v1) keep mobile releases backward compatible
Engineering Challenges
Preventing Double Bookings
Two guests could select the last available room at the same moment, and both reach the payment step.
Wrapped availability check and hold creation in a database transaction with row-level locks on the affected room-nights, and gave each hold an expiry so abandoned checkouts release the room automatically.
Only one guest can hold a given room-night, and unpaid holds free themselves without manual clean-up.
Reliable Payment Confirmation
Mobile networks drop mid-checkout, so the app can't always tell the server whether a payment succeeded.
Moved confirmation to Stripe webhooks with idempotent handlers; the app simply polls the booking status after returning from the payment sheet.
Bookings are confirmed even when the app loses connection right after paying.
Core Features
Search & Filters
Search by city or area and dates, filter by price, rating and amenities, with paginated results tuned for mobile scrolling.
Clean Code
1public function hold(Room $room, CarbonPeriod $nights, User $guest): Booking2{3 return DB::transaction(function () use ($room, $nights, $guest) {4 $taken = RoomNight::where('room_id', $room->id)5 ->whereBetween('date', [$nights->start, $nights->end])6 ->whereNotNull('booking_id')7 ->lockForUpdate()8 ->exists();910 if ($taken) {11 throw new RoomUnavailableException();12 }1314 $booking = $guest->bookings()->create([15 'room_id' => $room->id,16 'status' => 'held',17 'expires_at' => now()->addMinutes(15),18 ]);1920 RoomNight::where('room_id', $room->id)21 ->whereBetween('date', [$nights->start, $nights->end])22 ->update(['booking_id' => $booking->id]);2324 return $booking;25 });26}Want something like this for your business?
I design and build full stack products end to end. Tell me about your idea and I'll get back to you with a plan.