- Clone this project
- Install php 7.1. Make sure php related packages exists in your system (php7.1-bcmath, php7.1-cli, php7.1-common, php7.1-json, php7.1-mbstring, php7.1-opcache, php7.1-readline, php7.1-sqlite3, php7.1-xml)
- Install composer, Install project dependencies (
composer install
insede project root) - Execute database migrations
- Run php build in web server
- Visit http://localhost:8000/app_dev.php/api/v1/doc. You should see online api documentation with sandbox option. Figure out what going on there, read documentation if required
- There are 2 types of users in the system (regular one and administrator). Authentication based on API token. Use
YECRSbpLDCXrJXCrVKOU
for authentication as regular user andtR6TI49mh4fbKAuSjm9L
for administration access. See right upper corner in api doc page. - There are few endpoints groups in the system: Currency (currency management in REST style), Exchange (with only one endpoint: POST/api/v1/exchange/)
- Only user with administration access should have access to POST/api/v1/currencies/ and DELETE/api/v1/currencies/{id}
- The calculation in POST/api/v1/exchange/ uses formula: request.amount * currencyFrom.value / currencyTo.value
- Write tests using the BDD approach with JS (choose a library at its discretion)(remember that it is a Tester position)
- Write any comments, assumptions as deemed necessary
- Optionally, you can include a brief explanation of your solution.