AI-Assisted Coding · Module 03

Frontend, Testing & Debugging with AI

Make the API visible, then prove it still behaves: in the browser, in DevTools and in pytest.

Seven lessons that turn the Module 2 Task Tracker API into a Kanban board you can use in the browser. You set up and verify an assistant in VS Code, build the board in layers, add a create/edit modal that respects backend validation, refactor behind a behavior contract, prove generated tests by breaking the source, and debug from evidence rather than hope.

  • Assistant setup
  • Kanban board
  • Create/edit modal
  • Behavior contract
  • Deliberate breakage
  • Evidence-based debugging

Module introduction

From an API to a product someone can use

Module 2 left you with a backend: task fields, CRUD routes, status-transition rules and tests. Module 3 keeps that same repository and puts a browser product on top of it: a Kanban board with To Do, In Progress and Done columns, cards sorted by priority, drag-and-drop that saves through the API, and a modal for creating and editing tasks. The shift is not only visual. A frontend adds new ways to be wrong: a card in the wrong column, a failed save that the screen pretends succeeded, a form that closes after a server error, a tidy refactor that quietly breaks drag-and-drop. So the module also trains a working rhythm inside VS Code: ask for a small change, inspect the suggestion or diff, run the browser or the tests, and refine from what you see. You finish with a working frontend, a behavior contract, a safe refactor, stronger backend tests and a short debugging log.

The loop every part of the module repeats · Lecture notes p. 3
  1. AskOne small, anchored change
  2. InspectRead the suggestion or diff
  3. RunBrowser and DevTools
  4. Testpytest and the contract
  5. RefineFrom evidence, not guesses

The notes name this loop in Part 1 and return to it in every hands-on part.

Your learning path

Seven lessons, one board

Open source guide
01Backend to product UIModule 3 makes the API visible. Correctness now includes what the browser shows, what DevTools records and what the frontend holds in state, while the backend rules from Module 2 stay in charge.11 min02Set up the assistantPart 3.1 sets up VS Code with GitHub Copilot. The hands-on check is small on purpose: ask for a route summary of app/main.py and compare every claim with the real decorators and functions.11 min03Kanban boardPart 3.2 builds frontend/index.html in layers: static layout, styling, fetch and render, UI states, and only then drag-and-drop that PATCHes the backend and reverts when the server says no.16 min04Create/edit modalPart 3.3 adds a New Task button and Edit buttons that open one modal in two modes. It trims titles before sending anything, uses POST or PATCH, keeps the modal open on a 422, and clears itself on every way out.13 min05Safe refactorPart 3.4 treats a refactor as a change that must prove nothing changed. Write an eight-item behavior contract, commit, refactor one selected section, inspect the diff for red flags, and re-check after every accepted change.13 min06Test and debugPart 3.5 returns to the backend. Brainstorm PATCH edge cases, write one pytest test at a time, prove each by breaking the source on purpose, and debug from the full failure output with fixes to the source, never to the test.15 min07Pitfalls and deliverablesMost Module 3 mistakes come from trusting output before checking context, browser evidence or the contract. This lesson collects the six pitfalls with their recovery moves, and the eight things you should have at the end.10 minWhat you keep from Module 3A working Kanban frontend on the Module 2 API, and the evidence that you built it responsibly: a verified setup, a behavior contract that held through a refactor, tests proven by breakage, and a debugging log of decisions.SummaryPrompt library22 prompts, each as a weak and an improved version: Practical prompts for frontend, testing, refactoring, and debuggingPromptsFurther reading6 core readings, 4 practical references and 2 optional deeper dives, each with the part to read and the lesson it supports.Reading