Tuesday, November 17
- On their own is due now
- Data and state: what your app remembers, and where
- Work time: Make it real, due next Tuesday at 2:30
- Thursday: quiz (15 minutes, in the Quiz Space), then work time

| Word | Means | In a daily word puzzle |
|---|---|---|
| State | What your app stores right now | The letters you've typed, guesses left |
| Data | What your app persists | Your streak, yesterday's score |
- The client is the browser on your user's phone. It runs your page.
- A server is a computer that answers requests. It can keep data for everyone.
- Many good apps only have a client.
| Where | Who sees it | How long it lasts | For example |
|---|---|---|---|
| The page (memory) | This tab | Until a reload | The timer on a practice session |
This browser (localStorage) | This person, here | Until they clear it | A guitar player's practice log |
| Your server (a database) | Whoever you allow | Until you delete it | A roommate chore board |
| Someone else's server (an API, the AI) | Whoever they allow | Their choice | Tonight's pickup soccer standings |
- A request and a response: the page asks (
fetch), a server answers. One trip. - JSON is the shape the answer takes: names and values, like a filled-in form
- A cookie rides along with each request, so your server knows who's asking
- Staying connected (a WebSocket) only when people need to see each other right now
A roommate chore board:
| Noun | What it keeps |
|---|---|
| Household | name, invite code |
| Person | name, which household |
| Chore | what, how often |
| Done | which chore, who, when |
| Store | Compute |
|---|---|
| Each day you played | Your streak |
| Each book you finished | Pages read this month |
| Each chore someone did | Whose turn it is next |
- This browser gives it for free: every phone has its own
localStorage - On a server, every row says whose it is, or which group it belongs to
- Shared on purpose is different: the chore board should show everyone's chores
- Open your app on your phone and in a private window on your laptop (e.g. command + shift + N)
- Use it as two different people
- Reload both. Is everything still there?
- Does either one see, or change, the other's work? Should it?
| Ask | If yes |
|---|---|
| Does someone else need to see it? | A server |
| Does it follow them to another device? | Accounts |
| Would it matter if someone faked it? | The server decides, not the page |
| None of these? | localStorage, and you're done |
- API keys: the course adds them for you
- Anything a cheater would change: scores, prices, who won
- Someone else's private data: the page shows only what this person may see
| What it remembers | Where it lives | Who sees it | How long it lasts |
|---|---|---|---|
| Practice sessions | This browser | The player | Until cleared |
| Tonight's standings | A sports API | Everyone | Updated each game |
Then: where your data comes from (people, an API, the course AI), and why that's enough for your users.
Read my app's code and docs/project.md. List everything my app remembers, and for each one tell me where it lives (the page, this browser, a server, or an API), who can see it, and how long it lasts. Then ask me whether that's what my users need. Don't write my Data section for me: add the heading and the table's columns, and I'll fill them in.
"Make it real", due next Tuesday at 2:30
- Write your Data section in
docs/project.md - Decide if anything has to move: to the browser, a server, or accounts
- Build the smallest version that works, if it needs one
- Check two people and a reload: nothing lost, nothing crossed
- 2:30: Quiz, 15 minutes, in the Quiz Space
- Then work time on Make it real