Skip to content

D-I-S-H/DISH-API

Repository files navigation

D.I.S.H API

Dining Information Served Here

This project provides a REST API with menus for the dining halls at MTU.
Data is retrieved from the dineoncampus API and automatically curated in order to provide faster access.

This project is built alongside the DISH Frontend, which provides a web interface for the data.


Table of Contents


Docker Quickstart

Building with Docker Compose

To build and run the Docker image using Docker Compose, use:

docker-compose up --build

Building with Docker

docker run -d --name dish-api -p 8080:8080 ghcr.io/d-i-s-h/dish-api:latest

Prerequisites

  • Java 17
  • Python 3

Building

  1. Clone the Repository:

    git clone git@github.com:D-I-S-H/DISH-API.git
    cd DISH-API
  2. Build the Project using Gradle:

    ./gradlew build

Running

  1. Run the Application:

    ./gradlew bootRun

    Note: Ensure you re-run the Java application to regenerate the database before executing chartwells_query.py.

  2. Access the API:

    • The API will be available at http://localhost:8080

Retrieving Data

In order to populate the database with the latest data, run the following command:

python chartwells_query.py

Testing

  1. Run the Tests:

    ./gradlew test
  2. View Test Reports:

    • Test reports are generated at build/reports/tests/test/index.html