RESOURCES / STARTING AN ELIXIR PROJECT
Starting an Elixir project

A quick overview of the layers of the framework could be summarised as:
connection |> endpoint() |> router() |> pipelines() |> controller()

where the controller could be described as:
connection |> controller() |> common_services() |> action()

elixir -v
psql --version
sudo apt-get install erlang
erl
mix local.hex
mix phx.new --version
# if adding to existing repo, first:
# git clone https://gitlab.com/username/repo_name.git
# then allow the overwrites (this prevents the double-nesting of the project with extra layer of directory, i.e. repo_name/repo_name/..)
mix phx.new api_name --no-html --no-assets
mix ecto.create
mix phx.server

# set up the Postgresql database
mix ecto.create
mix ecto.migrate

mix ecto.setup

# Create a context
mix phx.gen.context ContextName SchemaModuleName database_table_name_plural fields:definitions
mix ecto.migrate
# Alternatively, create REST resource (with context and schema)
mix phx.gen.json ContextName SchemaModuleName database_table_name_plural fields:definitions
# Add => resources "/resource_plural", SchemaModuleNameControler, except: [:edit] //amend the rules to suit
MIX_ENV=test mix ecto.reset
mix test

Other resources:

https://curiosum.com/blog/elixir-phoenix-context-maintainability-guildelines
https://blog.logrocket.com/build-rest-api-elixir-phoenix/
https://www.dairon.org/2020/07/06/simple-rest-api-with-elixir-phoenix.html
https://leanpub.com/hello-web-development-with-phoenix-vue/read#leanpub-auto-setting-up-phoenix-with-postgresql
https://hexdocs.pm/phoenix/Mix.Tasks.Phx.Gen.Json.html