/NavigaTUM

Navigating around TUM with excellence – An API and website to search for rooms, buildings and other places

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

NavigaTUM

Deployment Status Website Uptime over 30 days API Uptime over 30 days CDN Uptime over 30 days

NavigaTUM is a the official tool developed by students for students, that aims to help you get around at TUM. Feel free to contribute, we are open to new people 😄.

Features:

  • Interactive or RoomFinder-like maps to look up the position of rooms or buildings
  • Fast and typo-tolerant search
  • Support for different room code formats as well as generic names

All functionality is also available via an API.

Note: Not all buildings in NavigaTUM are owned by TUM, but are instead being used by TUM departments.

Screenshots

Screenshot of the main-index of the websiteScreenshot of the main-index of the websiteScreenshot of a building including an internal mapScreenshot of a building including an internal mapScreenshot of the search-pageScreenshot of the search-page

API Documentation and native clients

You can consume our API Documentation in two ways:

  • Head over to our Website and look at the interactive documentation
  • We also describe our API in an OpenAPI 3.0 compliant file.
    You can find it here.
    Using this Specification you can generate your own client to access the API in the language of your choice. To do this head over to the Swagger Editor or other similar OpenAPI tools.

Note: The API is still under development, and we are open to Issues, Feature Requests or Pull Requests.

Getting started

Overview

NavigaTUM consists of three main parts + deployment resources.

Depending on what you want to work on, you do not need to set up all of them. For an overview of how the components work, have a look at the deployment documentation.

  • data/ contains the code to obtain and process the data
  • server/ contains the API server written in Rust, including MeiliSearch as a search backend
  • webclient/ contains a JS based web-frontend for the API
  • deployment/ contains deployment related configuration
  • map/ contains information about our own map, how to style it and how to run it

The following steps assume you have just cloned the repository and are in the root directory of it.

Data Processing

In case you do not want to work on the data processing, you can instead download the latest compiled files:

wget -P data/output https://nav.tum.de/cdn/api_data.json
wget -P data/output https://nav.tum.de/cdn/search_data.json
wget -P data/output https://nav.tum.de/cdn/search_synonyms.json

Else you can follow the steps in the data documentation.

Server

If you want to work on the webclient only (and not server or data), you don't need to set up the server. You can instead either use the public API (see the webclient documentation) or use our ready-made docker images to run the server locally:

docker network create navigatum-net
docker run -it --rm -p 7700:7700 --name search --network navigatum-net ghcr.io/tum-dev/navigatum-mieli-search:main
docker run -it --rm -p 8080:8080 --network navigatum-net -e MIELI_SEARCH_ADDR=search ghcr.io/tum-dev/navigatum-server:main

Else you can follow the steps in the server documentation.

Webclient

Follow the steps in the webclient documentation. If you want to only run the webclient locally, you can skip the "Data" and "Server" steps above and use docker (as seen above) or you can edit the webclient configuration to point to production.

Formatting

We have multiple programming languages in this repository, and we use different tools to format them.

since we use pre-commit to format our code, you can install it in an virtual environment with:

python3 -m venv venv
source venv/bin/activate
pip install -r data/requirements.txt -r server/test/requirements.txt -r requirements_dev.txt # for mypy the server and data requirements are needed

To format all files, run the following command:

pre-commit run --all-files

You can also automatically format files on every commit by running the following command:

pre-commit install

License

All code is licensed under the GNU GPL v3:

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.