Implement a web application with the following features:
- A web form for input of data from the JSON file (see test.json);
- Saving of the data to a storage by pressing a button on the form;
- Display the saved data, the 1st step should be available again.
Requirements: an embedded microcontainer (Jetty, Tomcat), Postgres, Maven, Spring
- Run postgres:
docker run --name arrival-postgres -e POSTGRES_DB=arrival -e POSTGRES_USER=arrival -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres
- Run queries:
docker run -it --rm --link arrival-postgres:postgres postgres psql -h postgres -U arrival
- Run queries:
- Generate initial files on https://start.spring.io/ (Dependencies: Reactive Web, Lombok)
- Create DB schema script and apply it to DB (schema.sql)
- Configure ReactiveCrudRepository for Postgres
- Configure WebFlux
- Add React frontend
- Configure connection between WebFlux and React:
- https://piotrminkowski.wordpress.com/2018/10/18/introduction-to-reactive-apis-with-postgres-r2dbc-spring-data-jdbc-and-spring-webflux/
- https://medium.freecodecamp.org/how-to-build-a-real-time-editable-datagrid-in-react-c13a37b646ec
- https://blog.monkey.codes/how-to-build-a-chat-app-using-webflux-websockets-react/
- https://developer.okta.com/blog/2018/09/25/spring-webflux-websockets-react
- Make reactive Postgres connection
- Make React UI
- Add React UI to the Spring project
- Configure connection between WebFlux and React
- Proper validation of the form for cars
- Edit & delete entities
- Unit tests
- Load drop-downs options from backend
- Make getting of data from DB reactive. Right now changes in DB are not reflected in UI automatically.
- Reactivity was not the goal of the task but we discussed reactive programming on the interview that's why I did it so.
- I used Java 11 instead of Java 8.
- I didn't use Jetty or Tomcat because I decided to make a reactive application.
- Frontend technologies were not specified in the requirements that's why I used React.