The Adhan Slack App serves as a convenient Islamic prayer times reminder for Slack users. With its easy configuration and high precision, this app ensures you're reminded of prayer times with friendly notifications.
- High precision Islamic prayer time.
- Support for various calculation methods:
- Muslim World League, Egyptian General Authority of Survey, University of Islamic Sciences, Karachi, and more...
- Support for Arabic and English for prayer time names and reminder messages.
- Option to disable/enable reminders for specific prayer times.
Handles Slack events and sends responses back, catering to interactive buttons and authentication.
- Triggered by API Gateway for routes:
POST: /slack/events
,GET: /slack/install
, andGET: /slack/oauth
.
Schedules prayer times for each user daily.
- Runs every 30 minutes, looking up users starting a new day based on their timezone.
- For a deeper understanding of this approach, refer to this article.
Triggered by EventBridge with the necessary payload to send messages to users.
- Only sends the message if the user's presence is ACTIVE.
- Create a Slack app and use the template in manifest.yml. Links will be replaced after running the code locally.
- Install the Slack application in your workspace.
- Clone the repo:
git clone git@github.com:NurdinDev/adhan-app-for-slack.git
and navigate to the directory:cd Adhan-Slack-App
.
- Create a
.env
file:mv env.example .env
. - Fill in the necessary environment variables.
- Optionally, run MongoDB using Docker:
docker compose up -d mongodb
. - Install dependencies:
yarn install
.
- Start the project using one of the following commands:
yarn start:dev
- This will start an Express app on port 3000.yarn dev
- This will start an serverless offline app on port 3000.
- Use
ngrok
to expose your local server to an HTTPS endpoint:ngrok http 3000
. - Update your Slack application's URLs with the provided HTTPS link from
ngrok
.
The app is deployed using the serverless framework to AWS Lambda. It configures the API Gateway and CloudWatch scheduler for background functions.
This project began as a learning journey into the Slack API. Recognizing its potential benefits for many, it was made open source. Contributions, feature additions, and bug fixes are welcomed.
Special thanks to the Adhan-js package for their well-documented library.