To start run:
docker-compose up -d
Go to http://localhost:3000
Then you can call all the backend methods from localhost:
For example: http://localhost:3000/internal/courier-u/initialize
To stop run:
docker-compose stop
Create the first form which emulates behaviour shown below:
To fetch countries & validation rules use this method :
http://localhost:3000/internal/courier-u/initialize
(Fields: countries
and zipValidationRules
)
Create the second form with operators list. (The layout design below is optional. For this task is important to implement logic)
To fetch operators http://localhost:3000/internal/courier-u/operators?receiverCountry=PL&senderCountry=PL&weight=1&sizeL=10&sizeD=10&sizeW=10
To fetch prices you should make a separate queries http://localhost:3000/internal/courier-u/prices/operators?operatorId=1&receiverCountry=PL&senderCountry=PL&weight=2&sizeL=2&sizeD=3&sizeW=4&receiverZip=51-180&packageType=1
Where operatorId
is id of operator taken from previous step.
Create a simple sign in/sign up modal. You can find a layout here.
This form shouldn’t fire any requests, just a markup.
- Country input should support autocomplete
- Validation for zip codes for each country is required
- Operators items should be sortable by name / price / expected delivery time on the client side
- SPA should contain minified js/css bundle and can easily be included in any html page
- All requests should be as transparent as possible for users, loaders shouldn’t be irritating
- Webpack
- JS linter
- i18n
- unit tests
The result is accepted as a pull request in the fork of this repository.
Good luck! If you have any questions, feel free to ping us!