| 
 | 1 | + | 
 | 2 | +## About the app and the exercise  | 
 | 3 | + | 
 | 4 | +This is a web application, which implements a "blog". You are able to create an account, log in and then write blog posts.  | 
 | 5 | +You can also browse and read the blog posts. Take a look through the app, get it running and ideally understand its components.  | 
 | 6 | +If you have notes on the implementation, feel free to bring them to our next interview.   | 
 | 7 | + | 
 | 8 | +This app will also serve as a basis for a code review during the next interview, so make sure you understand the code and   | 
 | 9 | +click through the app.   | 
 | 10 | + | 
 | 11 | +## Running the app  | 
 | 12 | + | 
 | 13 | +1. You can run the app directly with maven  | 
 | 14 | + | 
 | 15 | +```  | 
 | 16 | +./mvnw spring-boot:run  | 
 | 17 | +```  | 
 | 18 | + | 
 | 19 | +2. You can also run the app with Docker  | 
 | 20 | + | 
 | 21 | +```  | 
 | 22 | +docker build -t blog-app .  | 
 | 23 | +docker run -it -p "8088:8088" -p "8082:8082" blog-app  | 
 | 24 | +```  | 
 | 25 | + | 
 | 26 | +## Navigating the blog  | 
 | 27 | + | 
 | 28 | +Once the app is started it will be available at [localhost:8088](http://localhost:8088).   | 
 | 29 | + | 
 | 30 | +Some initial users and blog posts are already created using Liquibase.   | 
 | 31 | + | 
 | 32 | +You can log in the app using the following credentials:  | 
 | 33 | +- Username: john  | 
 | 34 | +- Password: test  | 
 | 35 | + | 
 | 36 | +Alternatively you can create a new user at [localhost:8088/signup](http://localhost:8088/signup).  | 
 | 37 | + | 
 | 38 | +Once logged in, you can create blog posts from here [localhost:8088/blog/create](http://localhost:8088/blog/create).  | 
 | 39 | + | 
 | 40 | +The index page [localhost:8088](http://localhost:8088) will list all blog posts. Then by clicking on one of the blog posts, you  | 
 | 41 | +will be redirected to a page, where you can read the blog post. One example can be found [here](http://localhost:8088/blog/1).  | 
 | 42 | + | 
 | 43 | +## Application design  | 
 | 44 | + | 
 | 45 | +This is a simple Spring Boot application, running on Java 11 with an H2 Database. The frontend is built using Thymeleaf.  | 
 | 46 | +It also utilizes Liquibase for schema evolution. The app has a built-in authentication using Spring Security.   | 
 | 47 | + | 
 | 48 | +The app has the following entities and their respective attributes:  | 
 | 49 | + | 
 | 50 | +User  | 
 | 51 | +- id  | 
 | 52 | +- username  | 
 | 53 | +- password  | 
 | 54 | + | 
 | 55 | +BlogPost  | 
 | 56 | +- id  | 
 | 57 | +- title  | 
 | 58 | +- content  | 
 | 59 | +- author_id -> id of the user, that wrote the blog post  | 
 | 60 | +- edited_at -> the last time, that the blog post was edited  | 
 | 61 | +- views - the number of times, that the blog post has been read  | 
 | 62 | + | 
 | 63 | + | 
 | 64 | +## Important  | 
 | 65 | + | 
 | 66 | +If you have any questions or problems running the app please let us know as soon as possible.  | 
0 commit comments