Stianlyng / Smartmat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

backend

Name

SmartMat API

Description

The API backend of smartmat.app. Smartmat helps you avoid waste and gives full control of you recipes, and items in your fridge.

"SmartMat, your smart food companion"

Links

Getting started

  1. Clone SmartMat using:

For SSH:

`git clone git@gitlab.stud.idi.ntnu.no:idatt2106-v23-03/backend.git`

For HTTPS:

`git clone https://gitlab.stud.idi.ntnu.no/idatt2106-v23-03/backend.git`
  1. Change directory:

    cd backend

  2. Install dependencies and create JAR

    mvn clean install

  3. Or, run the application directly

    mvn spring-boot:run

Dockerfile

This Dockerfile is used to build and run the SmartMat backend in a Docker container. It is based on the Eclipse Temurin JDK and JRE Alpine images to keep the image size small and ensure consistency in the Java environment.

  1. Install Docker from :

Docker's official website.

  1. Build the Docker image:

docker build -t your-image-name .

  1. Check the built image:

docker images

  1. Run the Docker container:

docker run -d --name your-container-name -p 8080:8080 your-image-name

  1. Access the application:

http://localhost:8080

  1. Stop the container:

docker stop your-container-name

Tests

  1. Run Unit tests:

mvn test

  1. Get jacoco coverage reports:

mvn jacoco:prepare-agent jacoco:report -Dmaven.javadoc.failOnError=false

The reports are located in target -> site -> jacoco -> index.html

Authors and acknowledgment

Show your appreciation to those who have contributed to the project.

  • Magnus Lutro Allison
  • Anders Montsko Austlid
  • John Fredrik Bendvold
  • Pedro Pablo Cardona Arroyave
  • Vebjørn Andreas Lind‐Solstad Myklebust
  • Birk Øvstetun Narvhus
  • Stian Lyng Stræte

Thanks

  • The developers of kassal.app for use of their products API.
  • The faculty of NTNU for providing helpful advice and guidance trough the process. Especially:
    • Surya Kathayat
    • Grethe Sandstrak
    • Muhammad Ali Norozi

About


Languages

Language:Java 99.8%Language:Dockerfile 0.2%