Skip to content

ismagilov/revolut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Revolut Money Transfer

Implementation a RESTful API (including data model and the backing implementation) for money transfers between accounts.

Project is based on:

  • com.sparkjava:spark-core
  • com.google.code.gson:gson
  • org.jooq:jooq
  • org.hsqldb:hsqldb

Design assumptions and limitations:

  • No REST API versioning
  • No timezones for database timestamps
  • No results pagination
  • No "self" or "cross" references in REST API responses
  • Data type for money: DECIMAL(19,2)
  • Failed transfers are not restarted
  • Correctness of concurrent transfers is based on READ COMMITTED isolation level, which is default and keeps write locks on tables until commit, but releases the read locks after each operation, see HSQLDB locking

How to Build

mvn clean package

How to Run

java -jar ./target/money-transfers-with-deps-1.0.jar

End Points

Accounts

GET /accounts
GET /accounts/:id
GET /accounts/:id/transfers
POST /accounts

Transfers

GET /transfers
GET /trsnfers/:id
POST /transfers

Releases

No releases published

Packages

No packages published

Languages