MensaHub is an application family that consists out of three parts:
MensaHub-Gateway is an REST-API that provides access to data of the canteens of the Studentenwerk Leipzig. It can be used to get information about the canteens and the meals.
MensaHub-DataDispatcher is a service that is responsible for fetching data from the Studentenwerk Leipzig and storing it in a database. It is the heart of the MensaHub application family and feeds the other services with data. Th DataDispatcher is also responsible for sending an email newsletter to the users that subscribed to it.
MensaHub-Junction is a web application that allows users to subscribe to a newsletter that is sent out by the DataDispatcher. It also allows to create an api user that can be used to send votes for meals to the Gateway.
<server>
<id>github</id>
<username>olech2412</username>
<password>$PACKAGE_READ_KEY</password>
</server>
mvn clean install
/$USER_HOME/mensaHub/mensaHub.settings
encryption.key=$YOUR_ENCRYPTION_KEY
S5o3qev2RKxYWNjhXSpuzkmwF3ZqvM!E
Setup the database
CREATE DATABASE mensaHub;
INSERT INTO mensaHub.cafeteria_dittrichring (id,api_url,name) VALUES (1,'https://www.studentenwerk-leipzig.de/mensen-cafeterien/speiseplan?location=153&date=$date&criteria=&meal_type=all','Cafeteria Dittrichring');
INSERT INTO mensaHub.mensa_academica (id,api_url,name) VALUES (1,'https://www.studentenwerk-leipzig.de/mensen-cafeterien/speiseplan?location=118&date=$date&criteria=&meal_type=all','Mensa Academica');
INSERT INTO mensaHub.mensa_am_elsterbecken (id,api_url,name) VALUES (1,'https://www.studentenwerk-leipzig.de/mensen-cafeterien/speiseplan?location=115&date=$date&criteria=&meal_type=all','Mensa am Elsterbecken');
INSERT INTO mensaHub.mensa_am_medizincampus (id,api_url,name) VALUES (1,'https://www.studentenwerk-leipzig.de/mensen-cafeterien/speiseplan?location=162&date=$date&criteria=&meal_type=all','Mensa am Medizincampus');
INSERT INTO mensaHub.mensa_am_park (id,api_url,name) VALUES (1,'https://www.studentenwerk-leipzig.de/mensen-cafeterien/speiseplan?location=106&date=$date&criteria=&meal_type=all','Mensa am Park');
INSERT INTO mensaHub.mensa_peterssteinweg (id,api_url,name) VALUES (1,'https://www.studentenwerk-leipzig.de/mensen-cafeterien/speiseplan?location=111&date=$date&criteria=&meal_type=all','Mensa Peterssteinweg');
INSERT INTO mensaHub.mensa_schoenauer_str (id,api_url,name) VALUES (1,'https://www.studentenwerk-leipzig.de/mensen-cafeterien/speiseplan?location=140&date=$date&criteria=&meal_type=all','Mensa Schรถnauer Straรe');
INSERT INTO mensaHub.mensa_tierklinik (id,api_url,name) VALUES (1,'https://www.studentenwerk-leipzig.de/mensen-cafeterien/speiseplan?location=170&date=$date&criteria=&meal_type=all','Mensa Tierklinik');
INSERT INTO mensaHub.menseria_am_botanischen_garten (id,api_url,name) VALUES (1,'https://www.studentenwerk-leipzig.de/mensen-cafeterien/speiseplan?location=127&date=$date&criteria=&meal_type=all','Menseria am Botanischen Garten');
INSERT INTO mensaHub.api_user (api_user_id,username,blocking_reason,creation_date,description,email,enabled_by_admin,last_login,password,role
,verified_email,activation_code_id,deactivation_code_id) VALUES
(1,'test123',NULL,'2024-01-12','Nur fรผr Test','test@test.de',1,'2024-01-12 09:22:38.215295','$2a$10$16jWSSzjRzEw2jvuQYxXX.VlqN1sejlEuah/PNKyC41FSkSEbg06C','ROLE_DEV',1,2,2);
INSERT INTO mensaHub.users (user_id,enabled,password,role
,username) VALUES
(1,1,'$2a$12$tow0YBAKqgG1.4CA9L9QGuuVpKMfdGgyl6azBc1e.3g1empQJmML.','ROLE_ADMIN','user');
The MensaHub-Models module contains all models that are used in the MensaHub application family. It is used as a dependency in all other modules.
Deployment of the jar is done for the Gateway and the DataDispatcher with:
mvn clean package
Deployment of the Junction is done with:
mvn clean package -Pproduction
All services can be deployed with docker-compose. The docker-compose file is located in the root directory of the project for all services including mariadb. If you want to deploy only one service, you can find the docker-compose file in the corresponding module.
If you want to contribute to the project you are welcome to do so. Please create an issue with the 'key request' label to get the key for the maven settings.xml file. And lets get started! ๐