How I set up an Elixir project#

A short checklist for every new Elixir project: the libraries I use and the rules I apply.

Libraries#

  • Ecto: database (PostgreSQL).
  • Phoenix: web layer and APIs.
  • LiveView: the UI, when possible.
  • daisyUI: UI components on top of Tailwind, when I build the frontend.
  • Req + Finch: HTTP requests. Easy to test: Req.Test mocks the responses.
  • Swoosh: emails, with HTML templates rendered by Phoenix. Easy to test with its test adapter.
  • Guardian: authentication.
  • OpenApiSpex: OpenAPI spec of the APIs, request validation, Swagger UI.
  • Oban: background jobs.
  • PromEx: Prometheus metrics.

Rules#