Bayer Ubiquitous Rating Platform - example application
======================================================

This is the Bayer Ubiquitous Rating Platform (BURP), where users can share short
ratings of the different canteen dishes with co-workers.

The application is a simple twitter clone that illustrates the basic structure
of a RESTful backend in conjunction with a single page application based on
Spring Boot, AngularJS and Bootstrap.

Once started, the application is running at http://localhost:8081/ (configured
via /src/main/resources/application.properties)

The database initialization is done with /src/main/resources/data-h2.sql


Login
-----

User: Adam
Password: test


CRUD Operations
---------------

GET

    curl -i http://localhost:8081/
    curl -i http://localhost:8081/users
    
    curl -i http://localhost:8081/burps
    curl -i http://localhost:8081/burps/1
    curl -i http://localhost:8081/burps/1/tags

POST

    curl -i -X POST -H "Content-Type:application/json" -d '{"text":"I actually liked the dish on the #right","timestamp":"2015-11-18T16:48:11.21+0000","user":"http://localhost:8081/users/2","tags":["http://localhost:8080/tags/2"]}' http://localhost:8080/burps
    
    Please note, that you need to escape quotation marks when using curl on Windows:
    [Windows] curl -i -X POST -H "Content-Type:application/json" -d "{\"text\":\"I actually liked the dish on the #right\",\"timestamp\":\"2015-11-18T16:48:11.21+0000\",\"user\":\"http://localhost:8080/users/2\",\"tags\":[\"http://localhost:8080/tags/2\"]}" http://localhost:8080/burps
    

PUT/PATCH

    curl -i -X PUT -H "Content-Type:application/json" -d '{"text":"I actually liked the dish on the #left","timestamp":"2015-11-18T16:48:11.21+0000","user":"http://localhost:8081/users/2","tags":["http://localhost:8080/tags/1"]}' http://localhost:8080/burps/7
  
DELETE

    curl -i -X DELETE http://localhost:8081/burps/7
    curl -i http://localhost:8081/burps/7


Steps
-----

You can follow the steps of creating the application by comparing the commits 
against each other.

* BURP pt. 1 - REST API

* BURP pt. 2 - Security

* BURP pt. 3a - AngularJS basic code
  (only for comparison, the following commit is needed to run the project)

* BURP pt. 3b - AngularJS resources

* BURP pt. 4 - AngularJS POST and @RepositoryEventHandler

* BURP pt. 5a - Bootstrap code
  (only for comparison, the following commit is needed to run the project)

* BURP pt. 5b - Bootstrap resources
