• Authenticated Live View Tests

    I’ve been running through Pragmatic Studio’s Live View course, which I highly recommend, and wanted to make a specific note of how to authenticate users when writing Live View tests after adding phx_gen_auth to a Phoenix project. Happily, this is a very short post, because phx_gen_auth does all the work for you. When you’ve run […]

  • Phoenix (1.5) project Guide

    What follows is an extremely concise list of steps I’m keeping around for reference when setting up a new Elixir / Phoenix project with Tailwind, Alpine, and user auth. NOTE: Pretending the name of the app is “love_notes” Generate it mix phx.new love\_notes –live Use UUIDs in config/config.exs Setup Tailwind from https://pragmaticstudio.com/tutorials/adding-tailwind-css-to-phoenix Install Postcss In […]

  • Elixir and the Wall of Tests

    Here’s an experience I tend to have over and over: Generate a new Elixir / Phoenix project Use the super cool Phoenix generators to make a new model Change the model substantially Realize that the tests generated with the model are now super broken When I get into this situation running mix text produces a […]

  • UUIDs for User IDs

    Integers By Default 🔢 Phoenix’s generators save a ton of time writing boilerplate code. Pow is an Elixir package and Phoenix extension that offers a great way to get user authentication up and running in very little time. But by default Phoenix’s generators use auto-incrementing integers for user IDs. What’s Wrong with Integer IDs 🤔? […]

Have something to say?