Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.93 KB

File metadata and controls

33 lines (21 loc) · 1.93 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Commands

pnpm dev          # Start dev server on port 3000
pnpm build        # Production build
pnpm start        # Run the built server (.output/server/index.mjs)
pnpm test         # Run tests (vitest)
pnpm lint         # ESLint
pnpm format       # Prettier (TS/TSX/JS/JSX)
pnpm typecheck    # tsc --noEmit

Run a single test file: pnpm vitest run src/path/to/file.test.ts

Architecture

This is a TanStack Start SSR app (React 19, Vite, Nitro server). Key architectural points:

Routing — TanStack Router with file-based routing. Routes live in src/routes/. The route tree is auto-generated to src/routeTree.gen.ts — do not edit this file manually. The root route (src/routes/__root.tsx) defines the HTML shell via shellComponent.

Router instantiationsrc/router.tsx exports getRouter() which creates the router from the generated route tree. The Register interface augmentation there enables full type safety across the app.

UI Components — shadcn/ui components (base-nova style) live in src/components/ui/. They are built on @base-ui/react primitives (not Radix), styled with CVA + Tailwind. Use pnpm dlx shadcn add <component> to add new components. Icons use @phosphor-icons/react.

Styling — Tailwind CSS v4 (config-less, driven by src/styles.css). Design tokens are CSS custom properties defined in :root/.dark using oklch colors. The cn() utility in src/lib/utils.ts merges class names via clsx + tailwind-merge. Dark mode is toggled via .dark class on an ancestor element.

Path alias@/ maps to src/ (configured in both tsconfig.json and vite-tsconfig-paths).

CI/CD — GitHub Actions workflow (.github/workflows/build-push.yaml) builds a Docker image and pushes to GHCR on every push to main. Requires a Dockerfile at the repo root.