🕌 Automating mosque seat bookings
This is one of those projects born out of genuine frustration. Our mosque uses an online seat allocation system for major events. Bookings go live at staggered times based on your registration tag, and seats fill up fast — especially the good ones. Missing the window by a few minutes can mean the difference between sitting together as a family or being scattered across the hall.
So naturally, I automated it.
Reverse-engineering the API
The booking system doesn’t have public API documentation, so I started by reverse-engineering it. I spent time inspecting network requests in the browser dev tools and documented the entire API: events, seat allocations, booking, cancellation, and swaps. The result is a knowledge base document that maps out every endpoint, request format, and response structure.
The system works on a tag-based staggered window model — different groups get access at different times, creating a natural queue. Understanding this was key to timing the automation correctly.
The automation
The script itself is relatively simple — a Python polling loop that checks every 15 seconds whether booking has gone live for a specific user tag. Once it detects that the window is open, it sends notifications via macOS alerts and Mailgun emails so I can jump in and book immediately.
It’s deliberately not a fully automatic booker (I still pick the seats myself) — it’s more of a “never miss the window” alarm system. The real value was in understanding the API well enough to know exactly when to act.
Why I like this project
It’s scrappy, it solves a real problem for my family, and the process of reverse-engineering an undocumented API is always satisfying. The knowledge document I wrote while figuring out the API — mapping out every endpoint and edge case — ended up being more interesting than the script itself.
Tech: Python, Mailgun API, macOS notifications.