anishfn
Command Palette
Search for a command to run...
Guestbook
Authenticated guestbook with optimistic UI

about
A guestbook built into the portfolio: part feature, part proof that I can ship a small product end to end without cutting corners.
Visitors sign in with GitHub or Google through Better Auth, leave a note, and watch it appear instantly. Posts use an optimistic update that rolls back cleanly if the write fails, so the UI always feels fast but never lies about what actually saved.
It runs on the Next.js App Router with Drizzle and Postgres, server actions for writes, and revalidation on submit. The feed is tuned for fast first paint with zero layout shift.
The unglamorous parts are handled too: IP-based rate limiting, input validation, and graceful error states keep the open form from being abused.
the hard part
The lesson was in the unglamorous parts: optimistic UI that rolls back honestly, rate limiting, and input validation are what separate a demo from something you can actually leave open to the public.
highlights
- GitHub and Google OAuth via Better Auth
- Optimistic posting with automatic rollback
- Server actions and revalidation on submit
- IP-based rate limiting
- Fully accessible form controls
- Zero layout shift on the message feed