src/ contains the application code for the TanStack Start site: routes live in src/routes, shared UI in src/components, reusable logic in src/hooks and src/lib, and global styles in src/styles. public/ holds static assets served as-is. default/ is the blog content source configured in blog.config.json; keep Markdown content and Obsidian folders there. docs/ is for project notes, and dist/ is generated build output. Do not hand-edit src/routeTree.gen.ts; treat it as generated code.
Use pnpm with the lockfile checked in.
pnpm devstarts the local Vite dev server on port3000.pnpm buildcreates the production bundle indist/.pnpm previewserves the built app on port4000.pnpm checkruns Biome formatting and lint checks.pnpm lintruns Biome lint rules only.pnpm formatapplies Biome formatting.pnpm type-checkrunstsc --noEmit.pnpm testruns Vitest.
Biome is the source of truth. This repo uses tabs for indentation and double quotes in TS/TSX. Keep route files in src/routes aligned with URL structure, prefer lowercase file names for utilities, and use PascalCase for React component exports. Avoid editing excluded vendor-style folders such as src/components/ui unless the change is intentional and reviewed.
Vitest and Testing Library are installed. Co-locate tests next to the code they cover using *.test.ts or *.test.tsx. Focus on route behavior, component rendering, and hook edge cases. Run pnpm test before opening a PR, and always pair it with pnpm check and pnpm type-check. If a change touches default/ content parsing or routing, add a regression test.
History is still minimal (init), so keep commit subjects short, imperative, and specific, for example: add blog search input. PRs should summarize the user-visible change, list validation performed, and include screenshots for UI or route updates. Link related issues when available, and call out any changes to default/, .env, or build configuration.
Client environment variables must use the VITE_ prefix and belong in .env. Pre-commit hooks run pnpm check and pnpm type-check via Lefthook, so keep both green before pushing.