Claude-session-dashboard tanstack-start
TanStack Start, Router, Query, and Server Functions patterns and best practices for this project.
install
source · Clone the upstream repo
git clone https://github.com/dlupiak/claude-session-dashboard
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/dlupiak/claude-session-dashboard "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/tanstack-start" ~/.claude/skills/dlupiak-claude-session-dashboard-tanstack-start && rm -rf "$T"
manifest:
.claude/skills/tanstack-start/SKILL.mdsource content
TanStack Start Patterns
Server Functions
- Define with
fromcreateServerFn@tanstack/react-start - Use
for input validation (e.g. with zod).validator() - Use
for the implementation.handler() - Server functions run on the server only — safe for DB access and secrets
Router
- File-based routing in
src/routes/ - Use
for route definitionscreateFileRoute - Use
for server-side data fetching (runs on server)loader - Use
for auth guards and redirectsbeforeLoad - Route context flows from
to child routes__root.tsx
Query
- Use
to define reusable query configsqueryOptions - Use
in components for data fetchinguseSuspenseQuery - Invalidate queries after mutations with
queryClient.invalidateQueries() - TanStack Query handles caching, deduplication, and background refetching
Key Conventions
- Path alias:
→@/apps/web/src/ - Route files:
src/routes/<path>.tsx - Layouts:
(pathless layout routes)src/routes/_<layout>.tsx - API routes:
src/routes/api/<name>.ts