EDAF75, project report

This is the report for

  • Ennio Mara, en0067ma-s
  • Christian Bilevits, ch8466bi-s

We solved this project on our own, except for:

  • The Peer-review meeting

ER-design

The model is in the file er-model.png:

Relations

  • recipes(id, name)
  • pallets(id, productionDate, isBlocked, location, deliveryTime, recipeId, orderId)
  • orders(orderId, latestDeliveryTime, customerId)
  • customers(id, name, address)
  • orderRecipeAmount(amount, orderId, recipeId)
  • recipeIngredients(recipeId, rawMaterialId, amount)
  • rawMaterials(id, name, amount, unit, lastDeliveryAmount, lastDeliveryTime)

Scripts to set up database

The scripts used to set up and populate the database are in:

So, to create and initialize the database, we run:

sqlite3 server/KK-SwedenDB.db < database/create-schema.sql
sqlite3 server/KK-SwedenDB.db < database/initial-data.sql

How to compile and run the program

The program is split into two parts, the server that contains the API and the client that consumes the API.

First of all install the client's required npm packages by running. This only needs to run once.

npm install --prefix ./client 

Then start the server and client by running them in different terminal windows:

./server/gradlew bootRun -p server
npm start --prefix ./client