/AcmeAccountManager

Primary LanguageJavaBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Acme Account Manager

Coding assessment for MOX Bank interview.

Requirements Summary:

  • Programming language = Java or Kotlin
  • Build tool = Maven or Gradle
  • Spring Boot
  • H2 database with data persisted to disk
  • 2 REST APIs for a) get account balance of specific customer and b) transfer fund from one account to another
  • Provided 2 customer account balances: 12345678 with HKD 1,000,000 and 88888888 with HKD 1,000,000
  • Latest account balances can be retrieved between runs (no data reset or re-initialization)

Compatible with Java 17.
Spring Boot v3 as base with embedded Tomcat server.
OpenAPI v3 for Swagger.
H2 database for data layer.
REST APIs for the service (business logic) layer.
No JSON web token (JWT) for API authentication & authorization.

Design choices can be accessed here.

Database located under "data" folder.
Datasource URL = jdbc:h2:file:./data/acctmgrdb

Available endpoints:
Swagger UI => / or /api
Account balance of specific customer REST API => GET /api/v1/balances/{cid}
Transfer fund REST API => POST /api/v1/transfer
H2 Console => /h2-console
Actuator => /actuator

To run the project:
java -jar AcmeAccountManager-1.0.jar

http://localhost:8080 or http://localhost:8080/api => Swagger UI
GET http://localhost:8080/api/v1/balances/{cid} => Account balance of specific customer REST API
POST http://localhost:8080/api/v1/transfer => Transfer fund REST API
http://localhost:8080/h2-console => H2 Console
http://localhost:8080/actuator => Actuator