Code Monkey home page Code Monkey logo

bank-transactions-api's Introduction

Bank transactions Api

API execução de transações bancárias

Tecnologias utilizadas no projeto

Instalação

Após baixar o projeto, crie o arquivo .env com base no .env.example.

Obs: Se desejar alterar a porta padrão da API, certifique-se de usar a mesma porta nas collections do postman (se caso desejar utiliza-la).

cp .env.example .env

Suba a aplicação, executando o comando

make up

Rotas

No diretório docs, adicionei a collection para importação no API client Postman.

Reset

(POST) localhost:{API_PORT}/reset

curl --location --request POST 'localhost:{API_PORT}/reset' \
--data-raw ''

Balance

(GET) localhost:{API_PORT}/balance?account_id=18

curl --location --request GET 'localhost:{API_PORT}/balance?account_id=18' \
--data-raw ''

Event: Deposit

(POST) localhost:{API_PORT}/event

curl --location --request POST 'localhost:{API_PORT}/event' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "deposit",
    "destination": "18",
    "amount": 1
}'

Event: Withdraw

(POST) localhost:{API_PORT}/event

curl --location --request POST 'localhost:{API_PORT}/event' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "withdraw",
    "origin": "18",
    "amount": 800
}'

Event: Transfer

(POST) localhost:{API_PORT}/event

curl --location --request POST 'localhost:{API_PORT}/event' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "transfer",
    "origin": "17",
    "amount": 50,
    "destination": "18"
}'

Próximos passos

Considerando que o projeto evoluisse para notas etapas, observabilidade e documentação certamente seriam pontos primordiais para o bom funcionamento da aplicação. Sendo assim, seguem abaixo sugestões de ferramentas que em meu ponto de vista, atenderiam essa necessidade.

Referências

bank-transactions-api's People

Contributors

wenlopes 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.