Git Product home page Git Product logo

bankex's Introduction

BankEx

Installation

To install our application, you can run docker-compose to it:

# Start all applications
$ docker-compose up --build

Business Logic

To create a new user, you can send the parameters:

$ curl \
  X POST "http://localhost:4000/users" \
  -H "accept: application/json" \
  -H "content-type: application/json" \
  -d "{ \"birth_date\": \"1996-05-07\", \"city\": \"São Paulo\", \"country\": \"Brazil\", \"cpf\": \"08716310080\", \"email\": \"[email protected]\", \"password\": \"123456\", \"gender\": \"M\", \"name\": \"Alexandre de Souza\", \"state\": \"São Paulo\"}"

And it will generate the response:

{
  "message": "User created successfully",
  "referral_code": "44090390"
}

With this, you can create an user with indication like:

$ curl \
  X POST "http://localhost:4000/users" \
  -H "accept: application/json" \
  -H "content-type: application/json" \
  -d "{ \"birth_date\": \"1996-05-07\", \"city\": \"São Paulo\", \"country\": \"Brazil\", \"cpf\": \"08716310080\", \"email\": \"[email protected]\", \"password\": \"123456\", \"gender\": \"M\", \"name\": \"Alexandre de Souza\", \"state\": \"São Paulo\", \"referral_code\": \"44090390\"}"

Documentation

You can access Swagger using the route http://localhost:4000/docs, and before that you need to generate Swagger file.

Just run mix swagger.

Development

You need to define the environment variable DATABASE_URL with yout database connection string for PostgreSQL:

$ export DATABASE_URL="postgres://bankex:bankex@database:5432/bankex"
$ iex -S mix phx.server

Tests

You can run all tests locally using the command:

$ mix setup                   # Create database
$ mix test --trace            # Run all tests
$ mix test.watcher --trace    # Run all tests with watcher

Contributing

To contribute you need to:

  1. Fork this repo
  2. Create a new branch, i.e.: feature/awesome-commit
  3. Push your code to your fork
  4. Create a pull-request to this repo
  5. Await to code review ✨

bankex's People

Contributors

aledsz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

leandro

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.