The goal of this project is to create notification system for planned power outages in Belgrade. The system will scrape the data from the website of the power distribution company and send the notifications to the users.
- User has to interact with the Bot via telegram(https://telegram.org/)
- User has to signup for the telegram bot created by developer
0. Backend scrapes data from the web site (next day power outage) (https://elektrodistribucija.rs/planirana-iskljucenja-beograd/Dan_1_Iskljucenja.htm)
- Telegram bot can notify users, that provided their addresses to the telegram bot, if there is a planned power outage in their area within 24 hours
- Users can provide their address to the bot via interactions with the bot
- Backend is scraping the data from the website of the power distribution company, stores data in the database and sends notifications to the users
- Once per 24 hours the bot scrapes the data from the power distribution company website and sends notifications to the users if there are any planned power outages in their address.
- Via interaction with the bot, users can ask the bot for the list of addresses that they currently monitor
- Users can remove the address from the list of addresses that they monitor via interaction with the bot
- Add address verifictaion for user's input (e.g. user enters "Zimun" -> System asks: "Did you mean 'Zemun' etc.")
- Notify users about planned power outages in their area 0/24/48/72/96 hours before the power outage
- Provide users with statistics that shows how many times the power outage happened in their area/address/overall (need to modify db to store history)
- Multiple notification systems for the users (other messengers, may be sms.., pigeons =P, viber )
- Add web interface for users that will allow users to choose the way of communication.
After cloning the repository, create .env file in the telegram_app folder of the project and fill it with the necessary data. The .env file should look like this:
TOKEN=""
BOT_USERNAME=""
HEADERS='{"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"}'
URL='https://elektrodistribucija.rs/planirana-iskljucenja-beograd/Dan_1_Iskljucenja.htm'
POSTGRES_USER=""
POSTGRES_PASSWORD=""
POSTGRES_DB=""
POSTGRES_HOST=""
POSTGRES_PORT=""
GEOAPIFY_API_KEY=""
REDIS_HOST=""
REDIS_PORT=""
set -a; source telegram_app/.env; set +a
docker compose up --build -d