#964-Implement-Meue-Service #1076

Merged
a22erigr merged 44 commits from #964-Implement-Meue-Service into team_2_week_7 2026-05-22 18:36:08 +00:00
Collaborator

Developed on

This has been developed using JetBrains Rider and dotnet 10, on Arch Linux.

What's been done?

This is an implementation of the menu service.
Its goal is to read data from the restaurant "Götasalen"'s public ICS calendar.
The data then gets saved in memory and in the database to ping the restaurants endpoint and then the database as little as possible.

APi endpoints added:

  • "/": health check
  • "/today": get today's menu.
  • "/today/{category}": gets a specific category of today's food.
  • "/week": get the current week's menu.
  • "/week/{category}": gets a specific category of weekly food.
  • "/categories": Get all categories found.

What files have been created (A super quick overview)

  • DockerCompose/compose.yaml

    • I added the correct time zone to the database and menuService to allow correct time conversions.
    • Added menu service container.
  • DockerCompose/init_sql/04-menu.sql

    • I added a new database, two tables (menu_entries and menu_categories)
  • entryPoint/nginx.conf

    • Added menu service to the entrypoint under "api/menu/."
  • All scripts/*:

    • Added menu service to be built and used.
  • service/menuService/menuService/DatabaseLogic/CacheLogic.cs

    • This script contains the main logic for cashing in the in-memory and database storage used.
  • service/menuService/menuService/DatabaseLogic/DatabaseQueries.cs:

    • This script handles the database interactions (save and read menus and categories)
  • service/menuService/menuService/Endpoints/MenuEndpoints.cs

    • Handles the endpoints for the users. Note that no saving should be here since the internal system handles it.
  • service/menuService/menuService/Modals/Request/MenuEntry.cs

    • Is meant to be the main response and data received from the database.
  • service/menuService/menuService/Services/MenuService.cs

    • This is the service (glue) of this application. However, it works more like a patchboard here since it just connects other classes' methods mostly
  • service/menuService/menuService/Util/Ics/IcsFetcher.cs

    • Handles the fetching of the ICS schedule file from the restaurant.
  • service/menuService/menuService/Util/Ics/IcsParser.cs

    • Is the parser for the ics file to ParseResult objects that the rest of the program can use.
  • service/menuService/menuService/Util/Ics/ParseResult.cs

    • A record that the ICS data gets parsed to.
  • service/menuService/menuService/Util/Menu/MenuFilters.cs

    • General help functions that help the program get the current week and or the categories.
  • service/menuService/menuService.Tests/*":

    • Added tests for some of the more important logic parts of the main application.

Issues

Main issue: #964
Testing: #1016 (Very lightly done)

## Developed on This has been developed using JetBrains Rider and dotnet 10, on Arch Linux. ## What's been done? This is an implementation of the menu service. Its goal is to read data from the restaurant "Götasalen"'s public ICS calendar. The data then gets saved in memory and in the database to ping the restaurants endpoint and then the database as little as possible. APi endpoints added: * "**/**": health check * "**/today**": get today's menu. * "**/today/{category}**": gets a specific category of today's food. * "**/week**": get the current week's menu. * "**/week/{category}**": gets a specific category of weekly food. * "**/categories**": Get all categories found. ## What files have been created (A super quick overview) * **DockerCompose/compose.yaml** * I added the correct time zone to the database and menuService to allow correct time conversions. * Added menu service container. * **DockerCompose/init_sql/04-menu.sql** * I added a new database, two tables (menu_entries and menu_categories) * **entryPoint/nginx.conf** * Added menu service to the entrypoint under "**api/menu/**." * All scripts/*: * Added menu service to be built and used. * **service/menuService/menuService/DatabaseLogic/CacheLogic.cs** * This script contains the main logic for cashing in the in-memory and database storage used. * **service/menuService/menuService/DatabaseLogic/DatabaseQueries.cs**: * This script handles the database interactions (save and read menus and categories) * **service/menuService/menuService/Endpoints/MenuEndpoints.cs** * Handles the endpoints for the users. Note that no saving should be here since the internal system handles it. * **service/menuService/menuService/Modals/Request/MenuEntry.cs** * Is meant to be the main response and data received from the database. * **service/menuService/menuService/Services/MenuService.cs** * This is the service (glue) of this application. However, it works more like a patchboard here since it just connects other classes' methods mostly * **service/menuService/menuService/Util/Ics/IcsFetcher.cs** * Handles the fetching of the ICS schedule file from the restaurant. * **service/menuService/menuService/Util/Ics/IcsParser.cs** * Is the parser for the ics file to ParseResult objects that the rest of the program can use. * **service/menuService/menuService/Util/Ics/ParseResult.cs** * A record that the ICS data gets parsed to. * **service/menuService/menuService/Util/Menu/MenuFilters.cs** * General help functions that help the program get the current week and or the categories. * **service/menuService/menuService.Tests/***": * Added tests for some of the more important logic parts of the main application. ## Issues Main issue: #964 Testing: #1016 (Very lightly done)
b24idalu requested changes 2026-05-22 10:43:52 +00:00
Dismissed
b24idalu left a comment
Collaborator

Review on #1076

Whats done

Implemented menu service

Tested on Windows using Chrome

  • App starts
    • MenuService is starting and running
    • Tested with bruno, all endpoints work when adding link immediately to env otherwise returns empty brackets

Inspected following files

  • scripts/UnixInstallation.sh
    • This does not follow how the other echos look
  • scripts/UnixRebuildDebug.sh
    • Missing comment
  • scripts/WindowsInstallation.bat
    • The % becomes a variable in the link, should be %% (I think)
  • service/menuService/menuService.Tests/menuService.Tests.csproj
    • This has an invis unicode, unsure if anything can be done about it
  • service/menuService/menuService/DatabaseLogic/CacheLogic.cs
    • Line 29 is private field, should be camelCase
  • service/menuService/menuService/README.md
    • This file is empty

What needs to be done

Look at comments above

Conclusion

  • Not ready for merge yet
# Review on #1076 ## Whats done Implemented menu service ### Tested on Windows using Chrome + App starts + MenuService is starting and running + Tested with bruno, all endpoints work when adding link immediately to env otherwise returns empty brackets ### Inspected following files - scripts/UnixInstallation.sh - This does not follow how the other echos look - scripts/UnixRebuildDebug.sh - Missing comment - scripts/WindowsInstallation.bat - The % becomes a variable in the link, should be %% (I think) - service/menuService/menuService.Tests/menuService.Tests.csproj - This has an invis unicode, unsure if anything can be done about it - service/menuService/menuService/DatabaseLogic/CacheLogic.cs - Line 29 is private field, should be camelCase - service/menuService/menuService/README.md - This file is empty ## What needs to be done Look at comments above ## Conclusion + Not ready for merge yet
Author
Collaborator

Fixes done

  • scripts/UnixInstallation.sh
    • I added quotation marks around the URL. Besides that, I do not know what is different.
  • scripts/UnixRebuildDebug.sh
    • Added the comment
  • scripts/WindowsInstallation.bat
    • Implemented the suggested fix. Can't test it since I am on Linux.
  • service/menuService/menuService.Tests/menuService.Tests.csproj
    • I have no idea what I can do; it persists, and git doesn't update when I try to remove it.
  • service/menuService/menuService/DatabaseLogic/CacheLogic.cs
    • I have spoken with the issue coordinator, and readonly should be thought about as if they were constant. This means it should remain PascalCase.
  • service/menuService/menuService/README.md
    • I have added some basic information.
## Fixes done * **scripts/UnixInstallation.sh** * I added quotation marks around the URL. Besides that, I do not know what is different. * **scripts/UnixRebuildDebug.sh** * Added the comment * **scripts/WindowsInstallation.bat** * Implemented the suggested fix. Can't test it since I am on Linux. * **service/menuService/menuService.Tests/menuService.Tests.csproj** * I have no idea what I can do; it persists, and git doesn't update when I try to remove it. * **service/menuService/menuService/DatabaseLogic/CacheLogic.cs** * I have spoken with the issue coordinator, and readonly should be thought about as if they were constant. This means it should remain PascalCase. * **service/menuService/menuService/README.md** * I have added some basic information.
Collaborator

Fixes has been appended and everything works. Ready to merge!

Fixes has been appended and everything works. Ready to merge!
b24idalu approved these changes 2026-05-22 15:15:07 +00:00
a22erigr merged commit 6c97de3d3c into team_2_week_7 2026-05-22 18:36:08 +00:00
a22erigr deleted branch #964-Implement-Meue-Service 2026-05-22 18:36:09 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!1076
No description provided.