Skip to content

A REST-API implemented with TDD and Form-based Auth, to a company's restaurant system.

Notifications You must be signed in to change notification settings

jucron/PeopleMeals

Repository files navigation

People meals

by João Marcelo Renault

CircleCI

Setup via Docker

Requirement: Have Docker installed and make sure the file application.properties have only active the profile #2 dev.

> First you need to create an image of PeopleMeals application. From files directory, type:
$ docker build -t peoplemeals .

> Start all containers in detach mode by executing the following command:
$ docker-compose up -d

Note: There will be exposed the following in localhost:

  • MySQL container: 3306
  • PeopleMeals application: 8080

Usage

> With a browser, access: http://localhost:8088/
(or your local url)

Note: It will be shared a dump of the database on mysql folder, on that dump you can create a dump of the database if you want to, and it will be loaded when the DB is loaded.

Database schema plan

The Database schema plan, which explicits the Entities relationships, is the following:

img_1.png

Architecture

It was organized a service-oriented architecture as can be seen below

img.png

REST APIs

  • Credentials Entity

Credentials Controller documentation here

  • Login

Login Controller documentation here

  • Dish Entity

Dish Controller documentation here

  • Person Entity

Person Controller documentation here

  • Restaurant Entity

Restaurant Controller documentation here

  • Planning Entity

Planning Controller documentation here

Testing

  • There are Unit Tests for each method
  • Two Integration Test were implemented:

for processes that require Database use

for Security authorization context environment

  • Postman public WorksSpace for testing:

Postman - PeopleMeals endpoints Test

  • Code coverage report from JaCoCo plugin:

img_2.png

Note: Classes with no practical reason to be tested were annotated with @NoCoverageGenerated