Finally a prayer times app that works with your Mosque!
Have you ever used a prayer times reminder application which calculates your prayer times using your location and some complex maths? The problem is, these prayer times might end up not matching your nearest Mosque...
Masjid Times uses actual prayer times from your mosque and alerts you when it's time for prayer!
Right now, the project consists of three main areas:
- The web service found in
server/index.php
- this is the core of the prayer times web application (and other applications which I'm planning to do :P). - The MasjidTimes client library found in
client/js/masjidtimes.js
- This is an event-driven javascript library that runs in the browser. It is used to drive the web app. Documentation for this is coming soon :) - The MasjidTimes web app found in
client/
- This is the HTML, CSS and JavaScript that uses the MasjidTimes library and web service to show prayer times. You can see it live here.
I have plans of taking this further and creating native mobile apps that work in the same way as the web app. The idea is that since the web service is isolated from all application logic, we can use the prayer times API to create an application in any language and environment.
An API is provided to get prayer times using a simple HTTP RESTful interface. Check the wiki for details.
This project is different from dozens of similar projects in that the prayer time table is stored in the database for each mosque rather than calculated using a prayer times calculation method that calculates the prayer times using your location. This is better because it means you pray at the same time as your local mosque. However, the idea is that if there is no nearby mosque, we give the user their prayer times using the traditional calculation method approach.
Thus, prayer times calculation is one of 8 methods:
- University of Islamic Sciences, Karachi,
- Islamic Society of North America (ISNA),
- Muslim World League,
- Umm al-Qura, Makkah,
- Egyptian General Authority of Survey,
- Institute of Geophysics, Tehran,
- Ithna Ashari
- Your local mosque.
Unfortunately, there is no way of automating how we get the prayer times from your local mosque, so these must be added manually to my database.
Prayer times are calculated on the server. They are returned to the client as a JSON response. See the web service API for details.
- Copy
config.sample.php
toconfig.php
and change it to match your db details. - Import the database structure in
db_structure.sql
and if you want to, the dummy datadummy.sql
. - Set up your HTTP server to use
server
directory for serving files (this can be done by sym-linking the folder into your htdocs folder.) - Test the service using a POST client like Postman.