Carriershub is a project written in elixir with the main objective learn about elixir, the application is based on a plugin architecture, to make easy the implementation of any new carriers. It's incredibly simple because code never needs to know anything about the shipping company, everything you need to do is create a new file in plugins dir with all functions you need from the shipping company and set up the integrations keys in the client account.
First, you need elixir in your machine, if you don't know how to install, you can learn here. You also need a Postgres database running.
With elixir installed, follow these steps:
- Open the file config/configs.ex and set up your database env.
- In the project folder run
mix deps.get
. - Now you can run
mix ecto.setup
to setup the database. - If you want to run the tests just run
mix test
or run the app withiex -S mix phx.server
.
Now you have the project running in port 4000, you can edit this in config files if need. To use the first thing you need to do is create a client, after this, you can create integrations with carriers for the client and perform actions.
You can grab all route documentation in this link or inside the project in the collections folder, just import it in postman. Everything you need to CRUD a client, integrations or perform actions is there.