Project
Roulette

Threaded Comments

Nested replies that stay readable eight levels down.

IntermediateWeb appSocial10–20hAI-buildable 4/5needs backendworth shipping

A comment system with arbitrary nesting, collapsing, sorting and optimistic posting. The hard part is presentation: naive indentation makes deep threads unusable on a phone, so at some depth the design has to change strategy rather than keep indenting.

UI
Logic
Useful

Hosting · Free tier, sleeps when idle

Deploys free on Vercel Hobby + Supabase free or Cloudflare Pages + Turso free.

Free database tiers pause or expire when a project sits idle, so this one needs occasional attention to stay up.

Deploy it and share a link.

Core features · 7

  • Comments nest to arbitrary depth
  • Any subtree collapses and expands with a reply count shown
  • Replying posts optimistically and reconciles with the server
  • Sort by newest, oldest or most replies
  • Deep threads stop indenting and switch to a continuation style
  • Editing and deleting your own comments, with deleted ones tombstoned
  • The whole thread stays usable on a narrow screen

The interesting part

  • Flattening a tree for rendering without losing structure
  • Indentation strategy that degrades gracefully at depth
  • Optimistic inserts that reconcile when the server assigns real ids

Once it works

  • Add permalinks that focus a single subtree
  • Add markdown in comment bodies
  • Add a collapse-all control with recall

Suggested stack

reacttypescripttailwindsupabase

Track it