/exchange

A scalable web app features LiveView authentication, user roles and permission system, and secure S3/Wasabi uploads. It calculates file hashes with Erlang crypto library and uses Oban for all most API requests for automated retries.Has CI/CD setup and is deployed on Fly.io.

Primary LanguageElixir

Exchange

Features

Built With

Getting Started

Prerequisites

  1. Install erlang, Elixir, NodeJS, Postgres

    1. With homebrew the commands are:
     brew update
     brew install erlang elixir nodejs postgres

Installation

  1. Clone this Repo and enter the directory.
  2. Set up the project with the command mix setup
  3. Start Phoenix server with iex -S mix phx.server
    1. Now you can visit localhost:4000 or localhost:4001 from your browser.
  4. Once you register a user, you make it admin by running this in the same window you ran iex -S mix phx.server in (yes we run commands in a running server)
    1. Exchange.Accounts.get_user!(1) |> Exchange.Accounts.add_role_to_user("Admin")

You can run unit tests with the command mix test

API Routes

Bruno Collection

Bruno is a Postman,Insomnia/Insomnia alternative.

Setup

  1. Install, on mac brew install bruno; others see their website
  2. Import the collection from here
  3. Set ENV vars
  4. Enjoy.

I also provide a Postman friendly import file as well

Documentation can be found at here and requires an API key that can be found under user settings in the exchange app.