FullstackPhoenix
TUTORIALS

All tutorials.

Written guides and deep dives. For when you need to read, search, or copy code. Every tutorial ships with a runnable pattern.

RSS
Published 20 May - 2023 · Tutorial

Handling Amount Fields in a Phoenix Application with Ecto Custom Types

In this tutorial, we will discuss a common problem faced in Elixir applications related to handling and storing formatted amount fields in a…

Read tutorial
Published 06 May - 2022 · Tutorial

Teams Feature with Phx.Gen.Auth

A very common feature in web applications, especially SAAS applications are the concept of teams where a user can have and belong to multipl…

Read tutorial
Published 01 Jun - 2021 · Tutorial

How to use Phoenix forms for embedded schema and JSONB

In this tutorial, I want to show you how you can setup form that stores the data in partly the columns in a database but also some of the fi…

Read tutorial
Published 02 Sep - 2020 · Tutorial

Table sorting with Ecto and LiveView

A very common or even mandatory feature in e-commerce stores is the ability to sort a list of products by attributes. This is easy enough an…

Read tutorial
Published 31 Aug - 2020 · Tutorial

Fuzzy find with Ecto in Phoenix LiveView

Fuzzy find is both a simple and a complex thing. Even though though it's simple to implement, its hard to get right from a UX perspective. L…

Read tutorial
Published 15 Feb - 2020 · Tutorial

Create ghost loading cards in Phoenix LiveView

Unless you already didn't know, when a LieView component is mounted on a page, it runs the mount/2 function twice. One when the page is rend…

Read tutorial
Published 11 Feb - 2020 · Tutorial

Add Tags with Ecto has_many, through in Phoenix - Tagging part 1

I want to add tags to products. And as usual there are a situation where a product can have many tags and a tag can belong to many products.…

Read tutorial
Published 10 Feb - 2020 · Tutorial

Add and use a JSONB field in Phoenix and Ecto

PostgreSQL has native support for objects stored as JSON as actually binary JSON (or JSONB). With JSONB format, you can add index do the col…

Read tutorial
Published 03 Feb - 2020 · Tutorial

Setup a has_many / belongs_to in Phoenix

Something I do in EVERY project is to setup some sort of relation between resources. And even though Phoenix comes with generators for migra…

Read tutorial