ariel17 / ontop_challenge

My own implementation for OnTop's home challenge.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Status badge Coverage

OnTop Home Challenge

Hi there! This is my implementation for the proposed home challenge. Read the requirements here.

How to run it

# Locally
$ ./gradlew bootRun

# With Docker Compose
$ docker-compose up  # use -d to detach

⚠ Warning: when using compose, MySQL has a lot of things to do before being ready to accept connections. If the application fails to start, be patient, do ^C and run the up command again.

Once up and running you can use the postman_collection.json to import use case examples.

Required environment variables

# Change as required
ONTOP_ROUTING=028444018
ONTOP_ACCOUNT=0245253419
ONTOP_NAME=ONTOP INC

TRANSACTIONS_FEE_PERCENT=0.1

PAYMENT_PROVIDER_HOST=http://mockoon.tools.getontop.com:3000

WALLET_HOST=http://mockoon.tools.getontop.com:3000

SERVER_PORT=8090

REDIS_HOST=redis
REDIS_PORT=6379

DATABASE_HOST=db
DATABASE_PORT=3306
DATABASE_NAME=ontop
DATABASE_USERNAME=ontop
DATABASE_PASSWORD=ariel17

Diagrams

Archicture

Architecture diagram

Sequence

Sequence diagram

Models

Models diagram

Examples

Successful transfer

Postman success example

Reverted transfer by Payment Provider error

Postman provider error example

Failed by Wallet API error

Postman wallet error example

About

My own implementation for OnTop's home challenge.

License:MIT License


Languages

Language:Java 99.6%Language:Dockerfile 0.4%