Skip to content

ratheemohan/revolut-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Revolut Kotlin Test

1. Requirements

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

Explicit requirements:

  1. You can use Java or Kotlin.

  2. Keep it simple and to the point (e.g. no need to implement any authentication).

  3. Assume the API is invoked by multiple systems and services on behalf of end users.

  4. You can use frameworks/libraries if you like (except Spring), but don’t forget about requirement #2 and keep it simple and avoid heavy frameworks.

  5. The datastore should run in-memory for the sake of this test.

  6. The final result should be executable as a standalone program (should not require a pre-installed container/server).

  7. Demonstrate with tests that the API works as expected.

Implicit requirements:

  1. The code produced by you is expected to be of high quality.

  2. There are no detailed requirements, use common sense.

2. Implementation Notes

  • Used UK bank accounts (sort code, account number)

  • Ignored validations of bank account number and sort code

  • Ignored the currency conversions

  • Kept it simple and just return 500 when payment fails. But the correct way is to return appropriate http status code based on the error

3. Usage

The app can be run on java 11 and below versions. Also, please note that there are warnings when the app starts up due to minor issue with version of jackson module being used. I choose to ignore the warnings for this test.

Build and run the project by using the below commands.

cd /<project_directory>
mvn clean package
cd target/
java -jar transfer-service-1.0-SNAPSHOT.jar

4. Tech stack

  • Kotlin

  • Dropwizard

  • JDBI

  • H2 (Inmemory database)

  • Maven

  • Liquibase

  • Junit 5

5. Why DropWizard?

  • Out-of-the-box support for configuration, application metrics, logging and much more

  • Develops high-performance RESTful web services

  • Supports JSR 303: Bean Validation using Hibernate validator

  • Quick and easy to learn

6. Other Considerations

Considered SparkJava framework, it’s quiet simple, but the general feedback noticed it is not production ready.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages