Skip to content

Telegram Bot for Rooms' Booking in Innopolis University

License

Notifications You must be signed in to change notification settings

dinaraparanid/InnoBookingBot

Repository files navigation

InnoBookingBot

Kotlin License: MIT

This bot allows to make bookings in Innopolis University, look through them, update and delete. Moreover, it provides an opportunity to overview all available rooms and timeslots.

Project status

Both bot and its API are offline. Project can be enhanced to your needs and launched again on your personal hosting. See Setup section for more details

You can try to use our bot here

Or you can use telegram tag: @InnoBooking_bot

How to use?

When you enter the bot, you need to log in (using your Innopolis (Outlook) email), then enter the code that was sent to your email. After that, you need to open WebApp and use navigation page to select option you're interested in. Then just follow instructions on corresponding pages and make the following:

  • Book Room - main page for making your books
  • All Bookings - page with all bookings at the calendar
  • My Bookings - list of your bookings
  • Rules - list of rules that you need to notice

You can delete your booking at both My Bookings and All Bookings pages

For your convenience, Russian localization was added

Features list:

  • Bot displays available rooms and allow to book them for any suitable period of time
  • Bot provides a handler registration mechanism
  • User can see booking rules
  • User can see his bookings and delete them
  • User can see all bookings
  • User is notified a few minutes before the end of his booking
  • Web-app inside the bot provides the same functionality

Project Demo

General view of WebApp:

general

Booking Page:

booking

Booking Confirmation

notification

The list of your bookings

my

Choosing rooms in All Bookings

current

Detailed bookings

current

Rules

rules

Setup

Bot

Bot can be deployed with docker:

docker build -t innobookingbot .
docker run -p <port>:<port> innobookingbot

Next environmental variables should be provided:

BOT_TOKEN='your bot token'
EMAIL_AUTH='email sender, e.g. i.ivanov@innopolis.university'
EMAIL_AUTH_PASSWORD='email password'
DATABASE_URL='firestore database url'
PROJECT_ID='firebase project ID'
CREDENTIALS_PATH='firebase project .json file'
PORT='desired port (maybe chosen by the host)'

If you want to build bot on your machine explicitly, you can use gradle:

./gradlew build
./gradlew run

WebApp

Link to the WebApp

In a WebApp directory you can find corresponding README file that will you launch our project on your machine.

Technologies and Tools:

Languages:

Kotlin (Bot itself) + TypeScript (WebApp)

Bot + API:

  1. Ktor (Client + Server)
  2. Exposed ORM + JDBC (SQLite)
  3. kotlin-telegram-bot
  4. firebase-admin
  5. JavaMail
  6. Kaml
  7. logback

WebApp:

  1. React
  2. Ant Design of React
  3. styled-components
  4. React Router
  5. react-telegram-web-app
  6. firebase

Testing:

  1. Mockito, JUnit 5, rest-assured
  2. React Testing Library