u/GiraffeFireAlchemistin r/elixir • Recommends
Phoenix App from Scratch: Budget Model & LiveView Forms (Episode 1)
6.6K subscribers • 20 videos on Hallway
Beginner. No background in the topic needed.
10K views1 year ago1 recommendation
Web developmentProgramming languagesElixir and ErlangVue, Svelte, Angular and others
This tutorial demonstrates how to create a budget schema, manage contexts, and build interactive LiveView forms in Phoenix.
[series] Build a complete budget tracking app in Phoenix LiveView! In this episode, we'll: - Create our first domain model with the Budget schema - Set up a tracking context to manage budgets - Build a LiveView-powered budget list - Create an interactive modal form - Add user-specific data scoping - Write a few tests This episode introduces LiveView, Phoenix's real-time UI framework, showing how it enables rich interactivity without writing JavaScript. We'll see how Phoenix contexts help organize domain logic, and how to properly scope data to ensure user data doesn't leak to other users. Perfect for developers who want to see how the pieces of a Phoenix application fit together in practice. You'll learn essential patterns like: - Using changesets for validation - Working with database constraints - Preloading associations - Testing LiveView components All code available on GitHub. Links Screen recording software I use (affiliate): screen.studio/@Yy75o Project repo: github.com/ChristianAlexander/tutorial-budget-app Changes from this video: github.com/ChristianAlexander/tutorial-budget-app/pull/3 Additional work and tests: github.com/ChristianAlexander/tutorial-budget-app/pull/4 Timestamps What are we doing? - Create schema - Context module - Test the context - Handling database constraint violations - List and get functions - Budget list UI - Make it a table - Preloading associated data - Testing fixtures - Testing the LiveView - open_browser in Tests - Create budget form - Registering and rendering the form - Add the callback handlers - Test the create form - HTML encoding in tests - Back to the test - Scoping resources to the user - Summary -What people say. Recommended as a step-by-step guide to mastering Phoenix LiveView forms and data scoping.
u/GiraffeFireAlchemistin r/elixir • Recommends