Built an end-to-end booking and host-management platform with expiring room reservations, duplicate-safe payments, and cached regional search.
The real-world problem
What the system had to solve
When multiple guests attempt to book the final available hotel room simultaneously, naive booking backends allow race conditions that create double-bookings. Moreover, payment providers retry failed webhooks repeatedly, causing naive systems to charge guests multiple times for a single stay.
What I built
Architecture shaped by the constraints
I engineered an end-to-end hotel booking platform using React, Express, MongoDB, and Redis. The backend implements MongoDB transactional room reservations with expiring TTL locks to prevent race conditions during checkout, paired with Redis-backed idempotent Stripe webhook handlers that drop duplicate payment events.
Production proof
Delivered system
Built and verified across 40+ user-facing screens and full administrative portals, managing complete reservation lifecycles, user authentication, and verified zero-duplicate payment processing.
System flow
Architecture at a glance
01
Guest and host web apps
React booking, property, and administration experiences.
02
Express API
Reservation locks, billing workflows, and webhook handling.
03
MongoDB + Redis
Expiring room locks and webhook idempotency records.
Engineering decisions
Why the system works this way
Short-lived room reservations
Constraint
Two guests can request the final room at once, causing a race condition and a double booking.
What I engineered
Used MongoDB reservation records with TTL expiry to hold inventory during checkout and release abandoned holds automatically.
Production outcome
Serialized competing checkouts for the same room while allowing abandoned reservations to expire.
Idempotent Stripe event handling
Constraint
Payment providers retry webhooks, so processing the same event more than once can duplicate charges or host disbursements.
What I engineered
Stored event identifiers in Redis with a 24-hour expiry and skipped already-processed deliveries.
Production outcome
Made webhook retries safe and suppressed duplicate payment handling.
Indexed and cached regional search
Constraint
Map bounds, capacity, and amenity filters make property searches expensive as the catalog grows.
What I engineered
Added MongoDB 2dsphere queries and a five-minute Redis cache keyed by normalized search parameters; room availability remains live.
Production outcome
The source reports sub-200ms repeat regional searches while preserving real-time availability checks.
Filtered property query engine indexing availability with instant date and price range sorting.Open full screenshotHigh-conversion property profile rendering live room inventory and pricing calculation rules.Open full screenshotMongoDB transactional room lock with 15-minute TTL preventing double-booking during checkout.Open full screenshotHost administrative view tracking property occupancy rates, payout schedules, and calendar sync.Open full screenshotReal-time messaging service connecting guests directly with hosts for arrival coordination.Open full screenshot
Mahmoud Attia is a Full-Stack & Mobile Software Engineer based in Cairo, Egypt, working with clients across EU, US, and MENA time zones. His work spans offline-first mobile apps, transactional web platforms, and schema-constrained AI workflows. The portfolio archive contains 13 entries across projects, coursework, concepts, and specifications. HS VPN is a commercial app live on Google Play, supported by a self-hosted fleet of nine Linux server nodes.