What’s New in PrayerTimesSG
changelog
Alhamdulliah. I've been working on some pretty big updates to PrayerTimesSG, and I'm excited to share what's changed:
🔧 Complete Rebuild. I basically rewrote the whole thing. Previously, everything was jammed into one Sinatra app that handled both the frontend and backend. It worked, but it felt messy. Now it's split into two clean pieces:
- Frontend → Plain HTML, CSS, and vanilla JavaScript
- Backend→ A new API at
api.prayertimes.sgthat just serves the data
It's much simpler now. The frontend asks for prayer times, and the API delivers. That's it.
🎨 Design Refresh. I redesigned everything with one goal: make the prayer times easy to read at a glance.
- Bigger text for the times (because that's what matters most)
- Cleaner layout
- Less distraction
The whole app should feel faster and easier to use, especially on mobile.
⏰ Auto-Refresh at Midnight. This was a fun challenge. The app now automatically updates to the next day's prayer times at midnight. No more manual refreshing in the morning. It took a while to get this working properly across all browsers (looking at you, Firefox).
⚡ Smart Caching for Better Performance. The app now uses intelligent caching to load instantly throughout the day while staying fresh at midnight. Prayer times for the current day are cached in your browser, so repeat visits are nearly instant. But the app still automatically fetches new data when the date changes.
☁️ New Hosting Setup. Frontend is hosted on Netlify (fast and simple deploys), while the API runs on a DigitalOcean droplet with Ubuntu (more control, better performance). This setup is more reliable than before, and the API is now structured so it can be reused for other projects as well.
☕ Support This Project. If you find PrayerTimesSG helpful, I added a "Buy Me a Coffee" link. Running servers costs a few dollars a month, and honestly, coffee isn't cheap these days (I'm talking about cold brew and iced whites 😅). Support is appreciated, but totally optional.
Thanks for using PrayerTimesSG!