Review request

Flashcard app for my class, 200 students start Monday, will it hold?

Open · 123 viewsasked by rosa_m

Repo or live app

git.example.com/rosa-martin/flashdeck ↗

Unsure about: PerformanceCosts

Right now 12 students use it and everything is instant. On Monday two full year groups get the link, so roughly 200 people in the same 50 minutes. Cursor built it on Supabase with a cards table and a reviews table that gets a row per answer. I have no idea whether that is a normal load or a lot.

Comment
200 students in 50 minutes is small for Postgres. What I'd check is an index on reviews(user_id), and whether each card view fetches the whole deck. hannah_reyes
Each card view fetches the whole deck, 400 cards. Is that bad? rosa_m
Not at 400 cards, but fetch it once per session, not per card. That's 200x fewer requests on Monday. hannah_reyes

1 answer

zainab_a

Hannah covered the load, and it's fine. What I'd check before Monday is the write side. One row per answer in reviews is no problem for 200 students, but make sure the insert policy ties the row to the student. If it's with check (true), one curious student with devtools can write reviews for the whole class, and with teenagers someone will try.

create policy "own reviews" on reviews for insert
  with check (user_id = auth.uid());

And do a dry run on Friday: open the app in five browser profiles and click through at the same time. It won't test load, but it finds the login and session bugs that only show up with more than one account, which is what usually breaks on day one.

Comment
It was with check (true). Changed it. Doing the five-profile test on Friday. rosa_m
Monday update: 187 students, zero problems, the Supabase dashboard barely moved. rosa_m