Customizing the Phoenix Boilerplate for Better Page Titles and Queries

17
clicks
Customizing the Phoenix Boilerplate for Better Page Titles and Queries

Source: mediremi.com

Type: Post

The article discusses various custom implementations to improve the default boilerplate provided by Phoenix, particularly focusing on page title management and implementing soft deletes in Ecto. The author suggests defining a custom title function within HTML views to create meaningful page titles without fallback, thereby encouraging developers to enforce title definitions. Additionally, the piece explores a technique for soft-deletion using a deleted_at timestamp, emphasizing the importance of including filters in queries to avoid displaying deleted data. Further, it details a custom Queryable module that facilitates easier querying while managing deletions. The author also mentions converting UUIDs into more human-readable object IDs, which aids in debugging. Lastly, enhancements for rendering HTML email using HEEx components are discussed.

© HashMerge 2025