F6 · chapter overview
Phoenix framework
F5 left a supervised engine behind a clean facade — correct, tested, and
framework-free, but headless. F6 gives it a real product around it: a learning platform people
actually use. We put Phoenix on top of the F5 engine without reaching into it — the endpoint joins the same
supervision tree, the router sends requests to controllers and LiveViews, and every handler calls only the
Portal facade. Then we take it to the next level: server-rendered HEEx, interactive
LiveView with no hand-written JavaScript, real-time updates over PubSub,
authentication and sessions, and a release deployed to production — finishing with a live dashboard that
streams engine state to many clients at once. The engine never learns that Phoenix exists; that discipline is
what makes the platform fast to build and safe to change.
Nine modules, one platform. Each adds a Phoenix capability on top of the same F5 engine, so by the end you have a real, real-time learning product — not nine framework demos.
The platform we’re building
Before the modules, three design pages set the scene: the journey a developer walks in this chapter, the platform we are building on top of the F5 engine, and exactly how Phoenix and LiveView wire onto that engine. Read them first — every module below builds one piece of this picture.
The developer journey
From the F5 engine to a deployed, real-time learning platform — the path this chapter walks, milestone by milestone, and which module delivers each one.
What we’re building
The Portal as a real learning platform: the full stack with Phoenix added on top of the F5 facade, and the product features each layer delivers.
Wiring Phoenix onto the F5 engine
The seam in code: the endpoint joins F5’s supervision tree, a live route reaches a LiveView, and every handler calls only the Portal facade.
The chapter arc
Read it in order: each module adds one layer to the platform without disturbing the engine beneath it. The first pair stands Phoenix up and routes a request; the second gives it data and domain boundaries with Ecto and contexts; the third renders and makes the UI interactive with HEEx and LiveView; the last three make it real-time, secure, and deployed, ending in a live dashboard. F6.01 is built; the rest are planned, listed so the path is visible from here.
Nine modules · one platform on the F5 engine
Phoenix is not the product; the platform is. This chapter spends every module dressing the same engine, so the framework lands as a tool you aim at a domain, not a thing you build for its own sake.
Module navigation
Each of the nine modules links to its hub and its three deep dives. The arc is the build order — start at F6.01, the request lifecycle, and end at F6.09, the live dashboard.
Architecture & the request lifecycle
endpoint → router → controller → view — how a request travels, and where the Portal facade is called.
- F6.01.1The request lifecycle
- F6.01.2The endpoint, supervised
- F6.01.3Controllers, views & the facade seam
Routing, controllers & plugs
The plug pipeline: scopes, routes, and the middleware that runs before a handler reaches the engine.
- F6.02.1Routes & verbs
- F6.02.2Pipelines & scopes
- F6.02.3Writing a plug
Ecto: schemas, changesets & queries
Data, validation, and the repo — how Ecto becomes one more adapter behind the engine’s port.
- F6.03.1Schemas & migrations
- F6.03.2Changesets & validation
- F6.03.3Queries & the repo
Contexts & domain design
Boundaries that scale — how Phoenix contexts relate to the F5 facade rather than duplicate it.
- F6.04.1Context boundaries
- F6.04.2Contexts vs the F5 facade
- F6.04.3Composing contexts
Templates, components & HEEx
Server-rendered markup: function components, slots, and HEEx that renders from engine state.
- F6.05.1Templates & assigns
- F6.05.2Function components & slots
- F6.05.3Forms & inputs
Phoenix LiveView fundamentals
Interactive UIs without hand-written JavaScript — mount, handle_event, and render over the facade.
- F6.06.1mount & assigns
- F6.06.2handle_event & state
- F6.06.3render & diffs
PubSub, channels & real-time
Live updates over WebSockets: broadcast engine events and push them to every connected client.
- F6.07.1Broadcasting engine events
- F6.07.2Subscribing a LiveView
- F6.07.3Channels & presence
Auth, deployment & going live
Sessions and authentication, releases, and a production deployment that keeps the engine supervised.
- F6.08.1Sessions & authentication
- F6.08.2Releases & config
- F6.08.3Deploying to production
The live dashboard
The lab: real-time LiveView state over a socket, broadcast to many clients via PubSub — the platform, live.
- F6.09.1Build the dashboard
- F6.09.2Broadcast engine events
- F6.09.3Many clients, live
The chapter opens with F6.01 — Architecture & the request lifecycle (built) and closes with the F6.09 live dashboard. It builds on F5 — Pragmatic Programming — the supervised engine and its facade are what Phoenix mounts — and turns that headless engine into a real, real-time learning platform.