htmx: Build Interactive Web Apps with HTML · Capstone
Capstone: A Team Task Board with htmx
Build a production-ready task board with your own backend: lists, search, inline editing, live updates, history, security and tests.
The brief
Build a team task board with htmx 2 and the backend language you know best (Flask, FastAPI, Django, Express, Laravel, Rails, Go or ASP.NET Core). Store tasks in a real database (SQLite is fine).
Requirements
- Board: three columns (To do, Doing, Done). Each task card shows title, assignee and due date.
- Add task: a form with browser and server validation; errors come back with 422 and show next to the fields.
Success appends the card and updates every column's count (out-of-band swaps or
HX-Trigger). - Edit in place: click a card to edit it; Save with PUT; Cancel restores the view.
- Move: buttons (or a drag-and-drop island) move a card between columns with PATCH.
- Delete: with
hx-confirm, a fade-out, and an empty 200 response. - Search and filters: active search by title, filter by assignee; the URL updates with
hx-replace-url, and reloading the URL shows the same filtered board. - Live updates: another user's changes appear within 5 seconds (polling) or instantly (SSE extension).
- History: each task has its own URL (
/tasks/42) that works as a full page and as an htmx fragment;Vary: HX-Requestis set. - Feedback: indicators on every request, disabled buttons while saving, a timeout, and a visible error message for server and network failures.
- Security: escaped output,
hx-disablearound any user HTML, CSRF tokens viahx-headers, authorisation on every endpoint. - Accessibility: keyboard-usable controls, labelled inputs,
aria-liveon regions that update. - Tests: server tests that request each endpoint with and without
HX-Requestand check status codes and HTML.
Deliverables
- The repository with a README: how to run it, and a short architecture note (which parts use htmx, which use JavaScript, and why).
- A 2-minute screen recording showing every requirement.
- A note on what you would change to move to htmx 4.
Tips
Start from the contacts app in this course; the board uses the same patterns. Build one column end to end (list, add, edit, delete) before adding the others, and keep each fragment in its own template partial from the start.
Further reading: htmx examples · Hypermedia Systems
Deliverables
Submit your task board
Model answer
A repository link, the recording, and your htmx 4 notes.
Rubric
Rubric (100 points):
- Board, add, edit, move and delete work, with correct HTTP methods and status codes (25)
- Server validation with 422 responses that keep input and show accessible errors (10)
- Several areas updated from one request (OOB swaps or HX-Trigger) (10)
- Search/filter with hx-replace-url, and every pushed or replaced URL works as a full page with Vary: HX-Request (15)
- Live updates by polling or SSE, with a stop or reconnect strategy (10)
- Loading states, double-submit protection, timeout and visible error messages (10)
- Security: escaping, hx-disable for user HTML, CSRF, authorisation (10)
- Tests for fragment and full-page responses; clear README and architecture note (10)
Open in the app to mark lessons complete, take notes and track your progress.