# Agent Guidelines — portfolio ## Project Personal engineering portfolio — multi-page SPA built with React + TypeScript + Vite. Data-driven content from JSON structure documents (`src/data/*.json`) and per-language dictionaries (`src/i18n/locales/`), styled with CSS variables supporting dark/light themes. Motion animations via `motion/react`. Bilingual resume generation (EN/VI). ## Tech Stack | Layer | Tool | |-------|------| | Framework | React 19 | | Language | TypeScript 6 (bundler mode, `verbatimModuleSyntax`, `noEmit`) | | Bundler | Vite 8 | | Router | React Router v8 (`react-router` package, pinned `8.4.0`) | | Animation | motion ^14.0.0 (`motion/react` ESM entrypoint) | | Linter | Oxlint 1 (`plugins: react, typescript, oxc`) | | Resume generation | playwright ^1.64.0, tsx ^4.23.15 | | Package manager | pnpm | ## Commands | Command | Description | |---------|-------------| | `pnpm dev` | Start dev server with HMR | | `pnpm build` | Type-check (`tsc -b`), build for production (the site-identity plugin fills `%SITE_URL%` / `%SITE_NAME%` in `index.html`), then generate `dist/sitemap.xml` + `dist/robots.txt` | | `pnpm build:resume` | Generate resume PDF (default EN) via Playwright | | `pnpm build:resume-all` | Generate bilingual resume PDFs (EN + VI) | | `pnpm lint` | Run Oxlint | | `pnpm validate:content` | Validate the content dictionaries against the structure documents and the page manifests (also run by the loader at module load) | | `pnpm generate:ids` | Regenerate `src/types/content-ids.ts` from the structure documents (also run by `predev` / `prebuild` / `prepare`) | | `pnpm sitemap` | Regenerate `dist/sitemap.xml` + `dist/robots.txt` on its own (also run by `pnpm build`) | | `pnpm preview` | Preview production build locally | ## Routing - `App.tsx` wraps `` → `` → `` (NOT nested `` — causes `children` not to pass) - Layout: `` (top) → `
` → `