Assessment project for developers at onstructive
Thank you for applying for a developer position at onstructive. This repository contains a simple Micronaut project that contains a directory of Swiss postal codes. We would like you to continue the development and add support a street and house number directory.
The main goal of this assignment is to understand how you are solving problems.
Make sure you have installed the following tools:
Please fork this repository and make your fork repo private. By doing it that way your application and personal data remains private and only onstructive HR has knowlegde of it.
Walk through the existing code and try to run and understand it. We would like you to explain how the application works. Feel free to ask questions on parts you don’t understand.
For IntelliJ users: The repository contains a file called postalCodes.http
that can be used to run HTTP calls against locally running Micronaut application. This might help you to discover the application.
Within this project you find the following modules.
The domain module represents the persistence layer and holds JPA entities, and their repositories (see https://micronaut-projects.github.io/micronaut-data/latest/guide/).
A service api module for interacting with backend services.
This is the business service layer that implements specific business logic. It is responsible for defining the transactional boundaries.
The rest api consumes the business service layer and transforms the data to the REST model.
This module represents the applications itself. It will result in an executable fat jar.
Currently ch.onstructive.candidates.PostalCodeController#update
is not yet implemented. Give it a try an make it possible to update the postal code or the city name of an postal code instance.
@Put
public HttpStatus update(@Valid PostalCodePutModel model) {
return HttpStatus.OK;
}
The application holds a list of postal codes and city names. Your task is to add streets and house numbers to it such as Untermoosstrasse 36, 8047 Zurich contains information such as
Make sure a street & house number always is assigned to a postal code. Expose a list of streets with their postal code on the REST API at /api/v1/streets
.
In the 2nd interview you present your solution and explain your design decisions. Be prepared for a brief Q&A.
Please find and extend the test at server/src/test/groovy
. The tests are written in Groovy using Spock.
The code style is being enforced by the Gradle build. If you run into code style issues simply run ./gradlew spotlessApply
and your code style will be compliant.
When you are done with your work please give saw303
access to your private fork repository and send me the link to the repository at silvio@onstructive.ch. Thank you.
If you have any questions please do not hesitate to contact me at silvio@onstructive.ch