P3: A full-stack app, end to end

: the board shows a program that takes commands and keeps records safe. This lesson puts a real database under a login, then ships the whole thing and watches it.
Asha Rao (a made-up learner, so her numbers are teaching values) has the API from P2: An API with tests and a pipeline. A recruiter looks at it and asks: “Whose tasks are these? Anyone can read anyone’s list. And what happens to the data when you deploy a new version?” Her API has no users. Her data sits in one file on her laptop. When the program restarts on a server, nobody checks who is calling and nobody can say what shape the database has.
A full-stack app is a page the user sees, an API behind it, and a database under it, all running on a server. By the end of this lesson you will be able to add login to your API, keep each user’s rows apart, change the database safely with numbered scripts, deploy from a pipeline, and see from outside whether the app is healthy.
The history (optional)
In June 2012 a file of about 6.5 million password hashes from LinkedIn was posted on a Russian forum. The hashes were SHA-1 and had no salt, so many were cracked quickly. In May 2016 a much larger set, about 117 million emails and passwords from the same 2012 theft, was posted again. The lesson below shows why the missing salt mattered. Nothing later depends on this history.
Before you start. P2: An API with tests and a pipeline gave you a task API with CRUD, status codes, tests and a pipeline that runs them on every push. Authentication showed that a server must never store a password itself. Shipping without fear: rolling, blue-green, canary and flags showed how to release a new version to a few users first. The Watchtower (Observability) showed that you find out about a fault by measuring, not by waiting for a complaint. You need to know what a SQL table is.