The task is to create a service that represents a simplified version of the MuchBetter e-wallet app!
We expect the assignment to take around a week to complete. Feel free to use any addiotional depedencies/libraries you like. The assignment should include unit and integration tests, not a full test suite but at least a few good examples. Dockerising the service is optional but encouraged.
- Language Java
- Framework Spring Boot
- In-Memory datastore Redis
The service needs four REST endpoints.
Accepts no input and returns a token
. The token
will need to be supplied in the Authorization
header in subsequent requests. Every call returns a new token and creates a new user, the user should be created with a preset balance in a preset currency.
POST /login
Accepts an Authorization
header and a JSON body representing a single transaction.
POST /spend
{
"date": "2022-01-01",
"description": "Coffee",
"amount": 10,
"currency": "EUR"
}
Accepts an Authorization
and returns the current balance along with the currency code.
GET /balance
{
"amount": 100,
"currency": "EUR"
}
Accepts an Authorization
header and returns a list of transactions.
GET /transactions
[
{
"date": "2022-01-01",
"description": "Coffee",
"amount": 10,
"currency": "EUR"
}
]
Please include a file called Questions.txt in your submissions with answers to the following
- What would you add to your solution if you spent more time on the coding test?
- How would you improve the APIs that you just used?
- What is your favourite framework / library / package that you love but couldn't use in the task? What do you like about it so much?
Please upload your finished assignment to either GitHub or GitLab and share the repository link with us via email. Don't squash your commits, it's nice to see how the project develops. Have fun!