Project Design - WLSF/bank GitHub Wiki

This project was made using Elixir/Phoenix.

Structure

There are a MVC structure inside the folder (lib/bank_web/), where you will find:

  • models - contains all the schema and changeset validations
  • views - contains the transformation/serialization of your model (pretty much the output for our endpoints)
  • controllers - contains all the actions that our routes performs (accounts actions, indications actions, etc...)
  • repositories - contains all the database access of our code

Tests

Unfortunately I cant afford to set a 100% test coverage, but I made my best to achieve a considerable amount of tests to all the accounts features that we're going to use.

Models

The structure/design of our database goes like this:

[accounts table]
- id
- name
- email
- cpf (unique constraint)
- gender
- city
- state
- country
- birth_date
- referral_code
- timestamps (inserted_at, updated_at)


[indications table]
- id
- sender_id (index)
- receiver_id (index)
- timestamps (inserted_at, updated_at)