Este arquivo também está disponível em português aqui.
In Zé we thrive to find our best partner to deliver beverages to our customers, providing the best and fastest service. To achieve this our compute fleet deals with GIS objects all the time.
When programming we try to follow a myriad of coding best practices and patterns (those you can read on books like Clean Code, Clean Architecture, The Pragmatic Programmer, Domain-Driven Design, Microservice Patterns, etc...). Since writing good code is a must on our daily basis we expect people that want to join our team to think alike. This code challenge is something we designed to find this awesome programmer.
We expect you to develop a service that provides an API using REST or GraphQL that implements the three following features and respects the following technical requirements:
Save in a database a partner defined by all the fields represented by the JSON and rules below:
{
"id": 1,
"tradingName": "Adega da Cerveja - Pinheiros",
"ownerName": "Zé da Silva",
"document": "1432132123891/0001",
"coverageArea": {
"type": "MultiPolygon",
"coordinates": [
[[[30, 20], [45, 40], [10, 40], [30, 20]]],
[[[15, 5], [40, 10], [10, 20], [5, 10], [15, 5]]]
]
},
"address": {
"type": "Point",
"coordinates": [-46.57421, -21.785741]
}
}
- The
address
field follows theGeoJSON Point
format (https://en.wikipedia.org/wiki/GeoJSON); - The
coverageArea
field follows theGeoJSON MultiPolygon
format (https://en.wikipedia.org/wiki/GeoJSON); - The
document
must be a unique field; - The
id
must be a unique field, but not necessarily an integer;
You can use this json file composed of hundreds of partner information to test your application — we do not expect these partners to be pre loaded in the database. Below, you can have a look at how these partners might be represented in a map:
Return a specific partner by its id
with all the fields presented above.
Given a specific location (coordinates long
and lat
), search the nearest partner which the coverage area includes the location.
- The programming language and the database engine are entirely up to you;
- Your project must be cross-platform;
- Provide a documentation (README.md) file explaining how to execute your service locally and how to deploy it (focus on simplicity, and don't forget that we should test your service on our own, without further assistance).
We will evaluate your code challenge based on some system quality attributes. Some we consider a must-have, like correctness, and will be evaluated on a binary (works/follows or not) approach. The others, since they are not objective, will not be able to fail your challenge alone. These are all the quality attributes that we expect you address:
- Correctness: Your code must follow all the requirements presented on item 1.;
- Performance: The more partners you can handle and the fastest you can query the best;
- Testability: How well tested your code is and how easy it is to add new tests to your code;
- Maintainability: How easy to add extra features to your code;
- Separation of concerns: (https://en.wikipedia.org/wiki/Separation_of_concerns)
- Push your code to a Github private repository and add @ze-engineering-code-challenge as a collaborator for it. This Github account (@ze-engineering-code-challenge) is solely used by Zé's engineers to download your code and review it.
- Once you have finished the challenge, please follow these instructions to submit it to our team.
Good luck!