Phoenix Live Generator

Learn how to generate code using Phoenix Live Generator.

The Phoenix Live generator is a utility that generates code supporting full CRUD functionality for a given resource. This includes the backend schema and context code, as well as the frontend code including routes, LiveView, and templates. Before we dive into using the generator, it’s worth discussing just what’s so great about this generated code in the first place.

Phoenix Live generator provides us with a quick and easy way to build CRUD features, taking over the often tedious and repetitive work of building out this common functionality. It does so in a way that is adherent to best practices for organizing Phoenix code in general, and LiveView code specifically. This makes it easy for developers to build on top of—and customize—the generated code. The Phoenix Live generator is just one of many reasons why Phoenix and LiveView developers can be so highly productive.

Now that you understand what the Phoenix Live generator is and what it does for us at a high level, we’re ready to use it.

Let’s get started.

How to run the Phoenix

...