Skip to content

Latest commit

 

History

History
44 lines (37 loc) · 1.93 KB

README.md

File metadata and controls

44 lines (37 loc) · 1.93 KB

pet-shelter-bot😼

Pet Shelter Telegram bot
Telegram API workout project
Telegram bot is a pet shelter aggreagtor. It provides automated interaction between pet shelter and pet adopters, or potential pet adopters and also provides interaction between adopters and volunteers who are able to answer to adopter's questions within telegram dialogs.

How to build and launch

This is a spring-boot based maven project described with pom.xml
As database engine there is postgresQL data base server used. Server is described in resources/application.properties Name of the database is pet_shelter_bot Database objects are described with liquibase-log available in resources/db

Command to launch:

mvn package

java -jar target/pet-shelter-bot-0.0.1-SNAPSHOT.jar --spring.profiles.active=prod --spring.datasource.username=<DB_USERNAME> --spring.datasource.password=<DB_PASSWORD> --telegram.bot.token=<YOUR_BOT_TELEGRAM_TOKEN>

where

  • DB_USERNAME, DB_PASSWORD - username/password to your Postgres DB Server
  • YOUR_TELEGRAM_BOT_TOKEN - a token you've got with Telegram @BotFather bot

    After a successfull launch you can interact with the bot in Telegram.
    There are two different roles/scenarios for users. Users can have role either of a Vounteers or an Adopter
    If the user is listed in the database as a shelter's volunteer then they have within the bot a notification desk about requests for dialogs and can participate dialogs answering questions asked by adopters.
    Both adopters and volunteers are able to terminate their dialog session.

    Also there is API provided for shelter's employees who can manage list of volunteeers, asign adopters for pets, review reports from adopters about their pets etc.
    To interact with API there is swagger-UI provided available on:

    http://localhost:8080/shelter/swagger-ui/index.html#/