Skip to content

A financial REST API made with Elixir + Phoenix framework

Notifications You must be signed in to change notification settings

8bitbeard/elixir_rocketpay_api

Repository files navigation

Rocketpay API

codecov

In this project, a digital account API was created with Elixir + Phoenix. This project was presented on the Next Level Week #4 from RocketSeat, as was improoved for study purpose.

Among the improovements, you will find:

  • Changing the Authentication method from Basic Auth to a JWT based (Using the lib Guardian)
  • Implementing a new Route to return the data of the logged in user
  • Implementing the API documentation with Swagger (Using the lib Phoenix_swagger)
  • Implementing more tests to reach 100% test coverage with Excoveralls
  • Implementing a Factory to improove test readability (Using the lib ExMachina)
  • Implementing a data randomization lib to improove tests (Using the lib Faker)
  • Improoving the error handler

Techs used

Installing dependencies and starting Phoenix server

  • Install dependencies with:
    $ mix deps.get
  • Create a PostgreSQL database on the default port 5432 (You can change the port on the config/config.exs file if needed)
    • You can use Docker (which i recommend) to create the database. Just run the following command:
      $ docker run --name rocketpay -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres
  • Setup and migrate your database with:
    mix ecto.setup
  • Start Phoenix endpoint with:
    $ mix phx.server
    
    #or inside IEx with
    $ iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

To check the Swagger Documentation, you can visit the route /api/swagger.

Database diagram

Database table diagram

Learn more about Phoenix Framework

About

A financial REST API made with Elixir + Phoenix framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages