This file provides guidance to agents when working with code in this repository.
npm install # Install dependencies
npm run dev # Start development server (http://localhost:3000)
npm run build # Build for production (static export)
npm run start # Run production server
npm run lint # ESLint via next lint
npm run format # Prettier write
npm run format:check # Prettier checkThere are no tests in this project.
This is a Next.js 15 portfolio site with static export (output: 'export' in next.config.js), deployed to GitHub Pages and Vercel. React 19 with App Router.
src/app/— Next.js App Router pages.layout.tsxwraps everything inAppProvider+AppLayout.page.tsxis the single-page home with all sections stacked vertically. Sub-routes underresume/andlearning/render expanded section detail pages.src/blocks/— Large feature sections (Hero, About, Skills, ResumeList, ProjectList, LearningList, Contact, Header, Footer, Background, AppLayout, PageLayout). Each block has its own directory with anindex.tsbarrel export.src/components/— Reusable UI components. The Cards system (CardGallery → CardGrid + CardModal, CardView, cardContext) handles the expandable card UX used by Projects, Resume, and Learning sections.components/ui/holds shadcn/ui primitives.src/data/— Static TypeScript data files:resumeData.ts,projectData.ts,learningData.ts. Adding new resume entries, projects, or learning content means editing these files and creating corresponding block components.src/providers/—AppProviderwraps TanStack Query +AppStyleProvider(next-themes dark/light mode).src/hooks/—useWebGLAvailabledetects WebGL support.src/lib/utils.ts—cn()helper (clsx + tailwind-merge).
@/path alias maps tosrc/(configured intsconfig.json).- Styling: Tailwind CSS with shadcn/ui (new-york style, neutral base color, CSS variables). Use the
cn()helper for conditional class names. - 3D Background:
Background.tsxuses React Three Fiber (@react-three/fiber) with a customPortalMaterialshader fromgle-r3f-components. It adapts colors to the current theme. - Cards pattern:
CardGalleryrenders aCardGridof smallCardViewcards; clicking one opens aCardModalwith an animated overlay (Framer Motion). Each item provides asmallViewandlargeViewviaCardContext. - Markdown rendering:
MarkdownDocumentfetches and renders GitHub README files for project cards usingreact-markdownwithgithub-markdown-css. - Theme:
next-themeswithattribute="class", defaulting to system preference. - Static export: Images must use
unoptimized: true. No server-side rendering — avoid any Node.js-only APIs. - Prettier: Configured with
prettier-plugin-tailwindcss(sorts Tailwind classes) andprettier-plugin-organize-imports(auto-sorts imports).
- New project: Add an entry to
src/data/projectData.ts. - New resume entry: Add to
src/data/resumeData.ts, create a block undersrc/blocks/Resume/ResumeSections/<Company>/, and add an app route atsrc/app/resume/<company>/page.tsx. - New learning section: Add to
src/data/learningData.ts, create a block undersrc/blocks/Learning/LearningSections/, and add an app route atsrc/app/learning/<path>/page.tsx.