Coder Social home page Coder Social logo

bank's Introduction

BankApp leads integration platform

This application is responsible for simulate a bank app (like mini transactions).

  1. The main feature is create new bank account.
  2. The second main feature is transfer the amount with the existing users.

CQRS

This app is inspired by the article written by Martin Fowler

Application structure

  • API: used by all users. Create user through this api and we create in bank cqrs.

Example

(localhost:6000/api/users/signup) - POST

  • curl -X POST http://localhost:6000/api/users/signup -H "Content-Type: application/json" -d '{"user": {"name": "user1", "password": "password", "email": "[email protected]"}}'

(localhost:6000/api/users/signin) - POST, will return the token

  • curl -X POST http://localhost:6000/api/users/signin -H "Content-Type: application/json" -d '{"name": "user1", "password": "password"}'

(localhost:6000/api/transfers/:id) - GET

  • curl -X GET http://localhost:6000/api/transfers/2 -H "Authorization: Bearer ${token}"

(localhost:6000/api/transfers) - POST

  • curl -X POST http://localhost:6000/api/transfers -H "Authorization: Bearer ${token}" -H "Content-Type: application/json" -d '{"transfer": {"source_account_id": "1", "destination_account_id": "2", "amount": 1}}'

(localhost:6000/api/cashout) - POST

  • curl -X POST http://localhost:6000/api/cashout -H "Authorization: Bearer ${token}" -H "Content-Type: application/json" -d '{"cashout": 10}'

(localhost:6000/api/report) - GET Permitted: [DD, MM, YYYY, total]

  • curl -X GET "http://localhost:6000/api/report?report=DD" -H "Authorization: Bearer ${token}" -H "Content-Type: application/json"

  • Private database: initially used by bank system only. Is our storage with read and event store.

Running the application

Use the $ iex -S mix phx.server to run the application.

Create database.

Use the $ mix setup_db to create the database.

Testing

Test all suite:

$ mix tests

Docker

Contributing

To contribute, please follow some patterns:

  • Commit messages, documentation and all code related things in english;
  • Before open pull requests, make sure that credo was executed;

bank's People

Contributors

pedromcorreia avatar

Watchers

 avatar  avatar

Forkers

thulio

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.