#Food Hygiene Rating
##Architecture: ###Application has divided into 3 layers
- Application Services (implemented in java (package - com.infinityworks.foodHygieneRaings.services))
- Rest Layer (implemented using jersey, intentions to keep it isomorphic and include HAL links so users can follow links to browse)
- Client UI (implemented using angular, and agular follows HAL links to show re report)
##Assumptions:
- For Scotland minimum set of ratings expected "Pass" & ""
- For other regions minimum set of ratings needs to be displayed "5-star", "4-star", "3-star", "2-star", "1-star", "Exempt"
- Any other ratings returned by Food Hygiene Api is included in calculation and will be displayed
##Notes: Food Hygiene API has data issues (Ratings API doesnt return complete set of Rating Value which is being returned by Establishment Api
##This application is built on
###Language reference
- Java 8
- Javascript (ES6 - babel)
###Tech Stack:
- Spring boot (Bootable container)
- Angular JS (Client Code)
- Jersey (Rest Endpoint)
###Package management
- Gradle (for java code and also calls npm internally to build client code)
- npm and webapck (to build client code)
###Testing framework:
- Spock
##Useful commands
- Start the app: 'gradle bootRun'
- Clean build 'gradle clean build'
- build client code first time to download dependencies 'npm install', then 'webpack' to build
###Note:
- if gradle is not installed on your machine, use ./gradlew (in linux or mac), gradlew.bat on windows
##Pending Tasks:
- Acceptance test (plan to use Geb and WireMock)
- Client code test (jasmine and karma)