Skip to content

famoser/Mensa

Repository files navigation

Mensa

API version MIT licensed

ETHZ & UZH mensas in zurich.

The app is published in the play store and in the f-droid store.

Overview Mensa View
Screenshot Main Screenshot Mensa
Screenshot Main Screenshot Mensa
Tablet view
Screenshot Tablet
Screenshot Tablet

Update mensa details

Has a new Mensa opened, or are the opening times no longer accurate? Feel free to directly submit a PR!

For UZH, look in uzh/locations_food2025.json.The infoUrlSlug must match the homepage slug (e.g. raemi59 for https://www.mensa.uzh.ch/en/standorte/raemi59.html). The locationId and slug must return something useful in the GraphQL endpoint of Food 2050 (do a query on location and kitchen using these values). Note that there a multiple APIs (e.g. mensaoffice); if you find one that needs fewer requests for all mensas, happy to hear about it!

For ETH, look in eth/locations.json. The infoUrlSlug must match the hompage slug (e.g. zentrum/clausiusbar for https://ethz.ch/de/campus/erleben/gastronomie-und-einkaufen/gastronomie/restaurants-und-cafeterias/zentrum/clausiusbar.html). The idSlug must be the id of the menu plan (e.g. for Clasiusbar, the menu plan linked here has the URL https://ethz.ch/de/campus/erleben/gastronomie-und-einkaufen/gastronomie/menueplaene/offerDay.html?language=de&date=2022-08-22&id=4).

For implementation details how the links are constructed (to try it out yourself), check out ETHMensaProvider2.kt and UZHMensaProvider2.kt.

Release Checklist

Release checklist:

  • increase the versionCode and adapt the versionName in app/build.gradle.
  • upload the signed abb to the play store (use assets/keystore.jks with strong PW)
  • generate a signed apk
  • write a changelog in fastlane metadata
  • commit
  • create a new release on github with the versionName and attach the signed apk

The key store can be found in assets/keystore.jks, the name of the key is upload.
The password is the personal strong passord of the author.

Development Status

This project is now less relevant for me (@famoser), as I neither use Android nor live in Zürich anymore. However, there are around 3k aktive users, so this project will be maintained indefinitely until there are technical reasons that would require a complete rebuilt of the application; or the user count falls substaintially. If someone wants to take over, feel free to reach out.

Technical improvements:

  • Update the technical foundations (dependencies, XML -> jetpack compose, resolve deprecation notices)
  • Remove remains of various API migrations (which happen every 2 years or so)
  • Refactor caches to minimize accesses which will further improve startup time

Functional improvements:

  • View menu for the whole week (usecase: plan ahead whether to prepare lunch for the next day)
  • Highlight vegetarian and vegan options