Skip to content

zees-dev/prayer-alarm-rust

Repository files navigation

A simple prayer alarm in Rust

A small side project - a simple prayer alarm in Rust.

I want adhan to be played at the time of prayer at home, I want it automated, I want to have control of the adhan; and I have a RPI lieing around connected to a speaker.

Problem solved.

How it works

  • retrieves prayer times from Prayer Times API
    • credits to http://api.aladhan.com/ for the API
  • runs an axum web server on port 3000 - with API endpoints to control the adhan
  • a UI is rendered at http://127.0.0.1/ to show prayer timings and control the adhan timings
    • offers control on mobile devices (somewhat responsive)

Quickstart (RPI)

docker run --rm -it 
  --name prayer-alarm \
  --device /dev/snd \
  --security-opt seccomp=unconfined \
  -p 3000:3000 \
  zeeshans/slim:prayer-alarm-rust

Build and push image for RPI

docker build -t zeeshans/slim:prayer-alarm-rust -f rpi.Dockerfile .
docker push zeeshans/slim:prayer-alarm-rust 

Use image on RPI:

docker pull zeeshans/slim:prayer-alarm-rust
docker-compose up -d