This is a simple application to create accounts and manage money transfer between them.
It was created using Kotlin language and Micronaut framework in a reactive model. Spek2 and Mockk were used to write the tests.
- Download this project or git clone it using
git clone git@github.com:felipiberdun/money-transfer.git
; - Open project's root folder and run
gradlew clean build
to compile and generate the artifact; - Start the application using
java -jar build/libs/money-transfer-0.1-all.jar
; - The message
Startup completed in Xms. Server Running: http://localhost:8080
signals that the application is up and running;
POST - http://localhost:8080/accounts
{
"owner":"Account owner name"
}
201 Created - Location header will provide the new resource
GET - http://localhost:8080/accounts/{accountId}
200 OK
{
"id": "33accfc6-9e94-4c22-ad1d-24151cfc8de7",
"owner": "Account owner name",
"creationDate": "2019-12-01T20:09:35.163"
}
GET - http://localhost:8080/accounts/{accountId}/balance
23.0
GET - http://localhost:8080/accounts/{accountId}/transactions
200 OK
[
{
"id": "92a2d0f3-d77a-49c1-a967-3cc47cdf40eb",
"destination": "33accfc6-9e94-4c22-ad1d-24151cfc8de7",
"amount": 23.0,
"date": "2019-12-01T20:10:10.275",
"type": "DEPOSIT"
}
]
POST - http://localhost:8080/accounts/{accountId}/deposits
{
"amount": 23
}
201 Created - Location header will provide the new resource
POST - http://localhost:8080/accounts/{accountId}/withdraws
{
"amount": 1
}
201 Created - Location header will provide the new resource
POST - http://localhost:8080/accounts/{accountId}/transfers
{
"amount": 40,
"destination": "6c6872a4-9994-44a7-b709-652c296449d5"
}
201 Created - Location header will provide the new resource
- To use GraalVM to compile the application down to native code;
- Improve Swagger/OpenAPI documentation;
- Set up and compare data sources;
- Load testings;