Giter Club home page Giter Club logo

digital-wallet-challenge's Introduction

Running Project

  • To run the project in development mode, run the following commands:
  # Ensure that you have a docker network called "microservices_network" created
  # If not, run the following command:
  $ docker network create microservices_network --driver bridge

  # Run the following command to start the project
  $ docker compose up

Startup Info

After docker compose up command starts, the docker-compose.yml file will start the following containers:

  • krakend_ce
  • swagger_ui
  • statement_consult_api
  • statement_processor_api
  • withdraw_api
  • deposit_api
  • database
  • redis
  • rabbitmq

The automation of containers it will create a database for each microservice, install dependencies, run migrations and deal with de database connection.

The applications also are ready to deal with retry of connections with RabbitMQ

Running Tests

  # With the containers running, you can run the script for e2e tests
  $ ./scripts/run-e2e-tests.sh

  # You can also run the script for unit tests (The containers don't need to be running)
  $ ./scripts/run-unit-tests.sh

  # NOTE: If you suffer with permission problems, you can run the following command to the affected script:
  $ chmod +x ./scripts/run-e2e-tests.sh

  # or

  $ chmod +x ./scripts/run-unit-tests.sh

Architecture

The project is based on the microservices architecture, where each microservice has its own database and is responsible for a specific business rules, the communication between the microservices is made by the RabbitMQ message broker with a Event Driven Architecture. Some concepts used:

  • DDD
  • Responsibility segregation
  • SOLID
  • Dependency inversion
  • Dependency injection

Technologies

Documentation

The comunication with the app works only throught the api gateway. The application port is 8080. Swagger UI port is 8081. I also add a insomnia collection to help you test the api.

Disclaimer

1 - On my design i was considering implement more 3 services, Shop, Cancel and Value-Reversal but i didn't have time to implement them.

2 - I suffered with a bug with swagger ui that cannot mount the curl command to test the api, the problem occurs with properties that are number, for example the amount, i tried to fix it but i didn't found any solution for it.

Thanks

Hope you enjoy my project, i'm open to feedbacks and suggestions. Thank you!

digital-wallet-challenge's People

Contributors

carlosrodrigues94 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.