- Foteinos Konstantinos (it2023086@hua.gr)
- Charalampopoulos Ilias (it2023088@hua.gr)
- Manoli Triantafyllia (it2021056@hua.gr)
To run the project on Linux, please type the follow command in any terminal:
./mvnw spring-boot:run
The index page is the homepage. You can use it after starting the application. The application may or may not initialize, depending on whether there is data in the postgre database. If there is no initialization data, please proceed with the necessary registrations first.
You can find the documentation of the provided REST API in the link OpenAPI rendered with Swagger.
The JWT authentication code is based on the lab material.
A python script, external to the application, has been also developed (file rest_consumer.py) to enable access to the REST API via command line.
Please read the corresponding menu options.
An example written in Python for obtaining a token (you should have been registered first using the GUI) and retrieving all the registered reservations is shown below:
>>> import requests
>>> token_response = requests.request(method="POST",json={"clientId":"dokimi","clientSecret":"dokimi"},url="http://localhost:8080/api/v1/public/client-tokens").json()
>>> token_response
{
'accessToken': 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjbGllbnQ6ZG9raW1pIiwicm9sZXMiOlsiUk9MRV9DTElFTlQiXSwiaWF0IjoxNzY2OTQ4Njk0LCJleHAiOjE3NjY5NTIyOTR9.Vor8dFwwUIT6YYACV2RdPQrocfwLrhelbgyvjkBfWLY',
'tokenType': 'Bearer',
'expiresIn': 3600
}
>>> response = requests.request(method="GET",url="http://localhost:8080/api/v1/private/reservations",headers={"Authorization": f"{token_response['tokenType']} {token_response['accessToken']}"}).json()
>>> response
{
'success': True,
'debugMessage': None,
'result': [
{'date': '2026-04-29', 'timeSlot': '08.00-11.00', 'email': 'dokimi@hua.gr', 'code': 'room1', 'cancelled': False, 'reason': 'Check the notifier', 'noShow': True},
{'date': '2026-01-29', 'timeSlot': '08.00-11.00', 'email': 'dokimi@hua.gr', 'code': 'room1', 'cancelled': False, 'reason': 'Check the notifier', 'noShow': True},
...
]
}Ports have been developed for the following external services, but not all of them work:
| API name | Auth | Status | Purpose | Contract |
|---|---|---|---|---|
| OpenHolidays | No | ✅ Working | Holiday date queries | https://openholidaysapi.org/swagger/index.html |
| Nager Date (Public Holidays) | No | ❌ Retracted | Holiday date queries | https://date.nager.at/scalar/#api-version-3/tag/publicholiday |
| IPinfo Lite API | Yes | ✅ Working | IP-based localization | https://ipinfo.io/developers/lite-api |
| sms77io | Yes | ❌ Retracted | SMS notification | https://rapidapi.com/sms77io-sms77io-default/api/sms77io |
| Twilio | Yes | ✅ Working | WhatsApp notification | https://www.twilio.com/docs/whatsapp/quickstart |
The implementations of the ports for "retarcted" services have not been deleted, but they are not used either because the services are inadequate or fail frequently.
