Skip to content

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

  1. This page: prerendered at build time
  2. /notes: server rendered, CDN cached for 5 minutes
  3. /notes/:slug: server rendered with streaming comments
  4. /dashboard: client rendered behind a session check
  5. /api/notes: server route with keyset pagination
  6. /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.