Giter Site home page Giter Site logo

mosqueos / mosque-prayer-display-screen Goto Github PK

View Code? Open in Web Editor NEW
16.0 4.0 8.0 978 KB

Mosque Prayer Times Display Screen App

Home Page: https://mosque-prayer-display-screen.vercel.app

CSS 0.20% TypeScript 96.13% JavaScript 3.67%
mosque mosques muslim muslim-api muslim-app muslim-prayer-times muslims-prayer nextjs open-source opensource

mosque-prayer-display-screen's Introduction

Mosque Prayer Display Screen App

'بِسْمِ ٱللَّٰهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ

In the Name of Allah the Merciful, the Compassionate.

This project has been open-sourced as a form of sadaqah jariyah - may Allah reward every single contribution, technical, non-technical and those who share with others.

Introduction

This application allows mosques to run a prayer display screen for the worshipers and also an offline progressive web app that runs on any modern web browser.

This version of the application supersedes the original version which was created in association with East London Mosque.

The commentary on why we built this version, can be found in the following blog: https://medium.com/mosque/design-concept-direction-for-mosque-screens-51c4f9bb82.

The original contributors of this project can be found here.

A special thanks should be given to the UK Government Digital Service who provided voluntary days which allowed the original project to come to life.

Features

To keep track of features implemented and in the pipeline, please have a look at our project board: https://github.com/orgs/MosqueOS/projects/1/views/1

If you want to request a new feature, please raise an issue on this repo with a description of what you want.

Demo

You can see a working demo here: https://mosque-prayer-display-screen.vercel.app/

All of the code sits here: https://github.com/MosqueOS/Mosque-Prayer-Display-Screen

Screenshots

Mosque views

Mobile app

How to get set up as a Mosque

Prerequisites

  • Google Account

Step 1: Make a copy of the prayer times spreadsheet

Go to the following link and make a copy of the spreadsheet: https://docs.google.com/spreadsheets/d/1o9dngtGJbfkFGZK_M7xdlo2PtRuQknGEQU3FxpiPVbg/copy.

Step 2: Share "viewer" access to the spreadsheet with our Google Account

Click on the share button and add [email protected] as a viewer. We don't need any write access, so please do not give us this.

This allows our API to access your spreadsheet and read your data.

Step 3: Generate API Endpoint

To generate the API endpoint, you need to extract the spreadsheet ID from your spreadsheet link.

For example, if your spreadsheet URL is:

https://docs.google.com/spreadsheets/d/1o9dngtGJbfkFGZK_M7xdlo2PtRuQknGEQU3FxpiPVbg/edit

Your ID would be:

1o9dngtGJbfkFGZK_M7xdlo2PtRuQknGEQU3FxpiPVbg

You then add this ID to the following URL, like this:

https://api.mosque.tech/mosque-data/1o9dngtGJbfkFGZK_M7xdlo2PtRuQknGEQU3FxpiPVbg

You can use the following tool to automatically generate an API endpoint: https://codepen.io/DilwoarH/full/mdvOexr

Note: You don't need to use our API endpoint, you can generate your own endpoint but please make sure it has all the required properties.

Step 4: Deploy your app

We currently use Vercel (we found others not to work as well).

Click on the following button:

Deploy with Vercel

Step 5: Test your display

Once your app has deployed, visit the URL and test your screen. Make sure it works on the TV you want to use for the mosque. Our app is designed for 1080p Full HD TV screens.

Optional things you might want to do

Custom domain

You can set up custom domains like: prayertime.mymosque.com

If you want to update your domain, you can do so by following the Vercel documentation: https://vercel.com/docs/projects/domains/add-a-domain

Environment variables

KEY VALUE DEFAULT DESCRIPTION
MOSQUE_API_ENDPOINT https://api.mosque.tech/mosque-data/1o9dngtGJbfkFGZK_M7xdlo2PtRuQknGEQU3FxpiPVbg REQUIRED - NO DEFAULT Data from Mosque API
BLACKOUT_PERIOD 13 13 minutes How long your mosque screen dims / blacks out during congregation prayer
UPCOMING_PRAYER_DAY 3 3 upcoming days shown in slider How many upcoming days it shows in the sliding section
SLIDE_TRANSITION_TIME 7 7 seconds How long each slide shows for in the sliding section

Dev set up

cp .env.local.example .env.local
npm install
npm run dev

Raspberry Pi Setup

Raspberry Pi (RPI) is an easy way to get the screen running, the screen doesn't need too much power - a lightweight computer like an RPI is enough.

You can buy one from the official suppliers: https://www.raspberrypi.com/products/

We recommend you buy a case with a fan or some heat-cooling solution - the screen will run all day so it's good to have a good cooling solution.

RPI set up steps

  1. Install Raspberry Pi OS on the SD Card
  2. Install chromium-browser - Do this step only if you do not have Chromium
  3. Open Terminal
  4. cd .config
  5. sudo mkdir -p lxsession/LXDE-pi
  6. sudo nano lxsession/LXDE-pi/autostart
  7. Add the following line at the end of the file:
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
point-rpi
@chromium-browser --noerrdialogs --noerrors --disable-session-crashed-bubble --disable-features=InfiniteSessionRestore --disable-infobars --start-fullscreen --start-maximized --app=https://mosque-prayer-display-screen.vercel.app

(make sure to replace the --app=https://mosque-prayer-display-screen.vercel.app with your URL)

  1. sudo reboot
  2. Once it reboots, it should start with start-up to your screen automatically.

Still need help?

We don't provide any free support, you can join our discord channel to get help from the community using the following invite link: https://discord.gg/CG7frj2.

If you would like paid support, you can contact us here for pricing: [email protected].

mosque-prayer-display-screen's People

Contributors

dilwoarh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mosque-prayer-display-screen's Issues

Offline support

Make the app work offline so if there is a mosque without internet, it still works

Push Notifications

Push notifications so that we can update users on when next prayer is about to start

Website Widget

Add a website widget to allow mosques to embed prayer times in their own website.

Full Screen Notices

Add the ability to have full-screen notices for:

  • Event posters
  • Potentially use for local ads that may generate income for Mosque

Branding

Mosques want to be able to set their own branding. Currently only a logo and name can be set, we want to extend this to be able to set colours etc.

Custom notices

Add the ability to add custom notices to display:

  • Hadith
  • Event information
  • Fundraising information
  • Donation links

displays prayer time of yesterday in New Zealand

This is great application, please keep it running.

I deployed the app in Vercel and the client is in New Zealand, the prayer time was showing the ones of yesterday as per NZ time.

I change the code to use mement.tz and set "Pacicfic/auckland" and it works fine after that. I am not familiar with Typescript to make a push request. You may be able to figure out where to fix this.

Another issue is that it requires refresh to fetch the new changes in the spreadsheet, it will be great if it can make this calls automatically say every 5minutes or so.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.