Final project ideas; from a page to a full-stack app; ideas tested in pairs

Thursday, 11/19 · Week 12

Final Project Proposal Due Sunday, 11/22

Post-Class Notes

TL;DR#

Today was for seeing what it takes to turn a page into a full-stack app (where the data lives, who can read which rows, and what else a real app needs), so that your final project proposal can plan for it.

What to do next#
  1. The final project proposal is due Sunday 11/22 at 11:59 PM. We did not write the ideas in class, so do these steps on your own:
    1. Write three ideas for the final project, one sentence each, with who it is for
    2. Paste the prompt under Questioning your ideas into your agent and answer its questions
    3. Pick one, and write why you rejected each of the other two
    4. Create a new public repo named after what the project does, and commit PROPOSAL.md with the sections the spec lists under Plan first
    5. Submit the repo URL on the Proposal item
  2. Mini Project 4 is due Sunday 11/29 at 11:59 PM, and you will demo it on Tuesday 12/01.
  3. Checkpoint 6 is due Sunday 11/29. In logs/wk12.md it now asks only for your sentence under ## API mashup. Your three final project ideas go in PROPOSAL.md. The checklist also includes buzzword-meter/ with one direction built on it: the steps are in Your Turn: Buzzword Meter.
  4. The old OpenRouter class key stops working on Friday 11/27. If a project of yours uses it, replace OPENROUTER_API_KEY in Vercel's settings with the key on the OpenRouter Class Key page and deploy again.
  5. Before you build your final project, read Code Organization and AI Code Review + Refactoring on your own.

There will be no class on Tuesday 11/24 or Thursday 11/26. We will meet next on Tuesday 12/01. Thursday 12/03 is now open for lightning talks on the sign-up board.

The final project#

Every final project must have an AI feature: at least one feature calls a model with instructions you wrote for this application and the person it is for. A chat box that passes what a visitor types to a model with no instructions does not count.

The project goes in a new public repo. An idea grown out of Mini Project 1, 2 or 3 must be significantly different from it: every feature in PROPOSAL.md must be one that mini project does not have. Full reference: Final Project.

Questioning your ideas#

Paste this into your agent, with your ideas in place of the brackets:

Here are my three ideas for the final project: <your three ideas, one sentence each>. Ask me one question at a time about who will use each one, what they need, and where its data comes from. Do not pick one for me and do not suggest new ideas.

Keep going until you can answer every question about the idea you pick. Then, before you submit, try the part you are least sure of with your agent (call the model or the API, or create the table) and write what you found under What I do not know yet in PROPOSAL.md.

Why an app needs a database#

A customer pre-orders on a phone, then checks the order on a laptop, and both show the same thing. The order lives in a database, in a table where each row carries the customer's user id, and each device sends a query for that user's rows. Another customer opening the same page gets different rows.

That is also why the data in your Mini Project 2 could not stay private: a JSON file or a JavaScript variable on a static site can be read by anyone who opens it.

Who can read which rows#

Supabase gives you a Postgres database and sign-in in one place. Row Level Security (RLS) is the rule on each table that decides which rows a signed-in user may read or add. With RLS, the database itself checks that a customer sees only their own pre-orders, whatever the page asks for.

  • The publishable key goes in your page. It is public by design, and RLS is what protects the data.
  • A secret key goes only in Vercel's environment variables. It never goes in your repo, and never into a chat with your agent.

When you write a query in JavaScript with supabase-js, it runs in the browser and RLS does the checking. An ORM such as Prisma or Drizzle runs on a server with the database password, so your own server code has to add the filter. Full Stack: From a Page to an App shows both, sets up the database step by step, and ends with a Your Turn.

A correction from class: the owner of a Supabase project sees each account's email address, never its password, because Supabase stores only a hash of it. Use a made-up address for any demo, and a different password for every site.

Trying the bakery#

Open Crust Fund Bakery's Order Online page in two windows, one of them private. In each window, create an account with a test address, such as you-a@example.com and then you-b@example.com. No email is ever sent. Pre-order something in one window and compare what each window lists. The code is in the crust-fund-bakery repo.

Choosing a database#

Do not ask your agent for "the best database". Tell it the business case: how many users you expect now and in a year, and how many will use the app at the same time. SQLite is small and runs inside many phone apps; Postgres is what Supabase runs and suits a commercial app. Handling many users writing at once (concurrency) is what the expensive databases are built for, and a class project rarely needs it.

When your agent picks a technology you do not know, ask it why it chose that one for your project.

What else a real app needs#

Beyond the database, a full-stack app may need:

  • File storage for uploads larger than a profile picture
  • Scheduled jobs, such as a report generated every morning
  • Payments, through a service such as Stripe, never a system of your own
  • Email, through a service, never a server of your own

None of these is required for your final project. Name the ones your idea needs under Data in PROPOSAL.md.

Welcoming AI visitors#

A website now has two kinds of visitors: people, and the AI agents working for them. The course site's home page links an llms.txt, a plain-text summary of the site for agents (the convention), and a read-only MCP server an agent can connect to. Behind This Website lists what the site is built with, including Pagefind for its search.

AI price alerts#

The lightning discussion asked whether you would let AI book a flight for you, or only alert you when the price drops. ChatGPT can run a task on a schedule and notify you with the result: ask it to check a price every day and tell you when it falls below a number you set, or to watch the news for something that decides whether you buy a ticket. With Black Friday coming, try it on something you already plan to buy.