Notebook · reference application
A working notebook built on TanStack Start
Written notes with a public reading page, a private authoring dashboard, cookie sessions, and a Postgres database. Every framework feature is used where it fits rather than listed on a demo page.
what runs where
- This page: prerendered at build time
- /notes: server rendered, CDN cached for 5 minutes
- /notes/:slug: server rendered with streaming comments
- /dashboard: client rendered behind a session check
- /api/notes: server route with keyset pagination
- /sitemap.xml: server route reading the database
What is worth reading here
Server functions are the data boundary
Every loader calls a typed server function instead of touching the database directly, because loaders also run in the browser. Authorization happens inside those functions, not in the route guard.
Three rendering modes, chosen per route
Public pages render on the server and carry cache headers. The dashboard sets ssr: false, analytics sets ssr: 'data-only', and two static pages are prerendered.