Mir Limited Candidate Technical Interview
Thank you for taking the time to do this technical test. There are two parts to it:
Please submit your results as a zip file containing both the coding test in a folder and the markdown file with your answers to the questions. Share a private link to this zip file in your Dropbox / Google Drive / OneDrive / wherever.
Please use a local git repo to source control your code and do not flatten commits.
Please include the entire git repo in the source zip file, we would like to see how the code evolved.
The task is to create a backend application that provides a set of APIs to be called from a frontend UI.
The API will have 4 endpoints and will communicate over http using JSON with at least the following functionality for each end point:
/login
- a POST request that will accept no input and return a token
(which need to be used in subsequent calls to the API, in the Authorization
header). Every call to /login
will return a new token and every invocation to this endpoint creates a new user, gives them a preset balance in a preset currency. /balance
- a GET request that will accept an Authorization
header (with the token value output from /login
) and will return the current balance along with the currency code./transactions
- a GET request that will accept an Authorization
header (with the token value output from /login
) and will return a list of transactions done by the user with atleast the date
, description
, amount
, currency
for each transaction./spend
- a POST request that will accept an Authorization
header (with the token value output from /login
), JSON content representing one spend transaction with the transaction date
, description
, amount
, currency
.There is a Postman collection at Interviewer.postman_collection.json that you can use to test your API implementation.
Please answer the following questions in a markdown file called answers to questions.md
.