API for InnoBookingBot.
Requests are available as .yaml file that can be parsed with Swagger
- GET /rooms - Get All Bookable Rooms
- POST /rooms/free - Get Free Rooms
- POST /rooms/{room_id}/book
- POST /bookings/query - Bookings filter (by dates, rooms, and users)
- DELETE /bookings/{booking_id} - delete a booking
API can be deployed with docker:
docker build -t innobookingapi .
docker run -p <port>:<port> innobookingapi
Next environmental variables should be provided:
BOT_TOKEN='your bot token'
EMAIL_AUTH='email sender, e.g. [email protected]'
EMAIL_AUTH_PASSWORD='email password'
DATABASE_URL='firestore database url'
PROJECT_ID='firebase project ID'
CREDENTIALS_PATH='firebase project .json file'
If you want to build api on your machine explicitly, you can use gradle:
./gradlew build
./gradlew run
- Kotlin 1.9
- Coroutines + StateFlow
- Ktor (Core, Netty, Cors, Compression, Content Negotiation + JSON)
- Exposed ORM (DAO + Java Time extensions)
- JDBC
- KotlinX.Serialization
- KotlinX.DateTime
- Java Firebase Admin (Firestore integration)
- Kotlin Dotenv
- Logback
GNU Public License V 3.0