- Personal portfolio site built with Next.js 14 App Router, React 18, TypeScript, and Tailwind CSS.
- The site is configured for static export via
output: "export"innext.config.js. - Deployment targets GitHub Pages. Static output is generated into
out/, and the repo includes a deploy script for pushing that output togh-pages. - The deploy script publishes from
out/into a dedicated.gh-pages-tmp/worktree. Do not reuseout/itself as a git worktree. - Follow
WORKFLOWS.mdfor the standard feature intake, scratch-branch implementation, validation, and deployment process.
app: App Router entrypoints, page composition, global layout, global CSS.components: Presentational React components for each homepage section plus analytics.public: Static assets such as headshot, resume PDF,CNAME, and.nojekyll.scripts: Deployment automation. Currently onlydeploy-gh-pages.sh.out: Generated static export. Treat as build output..next: Next.js build cache/output. Treat as generated..gh-pages-tmp: Dedicatedgh-pagesgit worktree used only during deploys. Treat as generated deployment state.
- Install dependencies:
npm install - Start local dev server:
npm run dev - Production build and static export:
npm run build - Run lint:
npm run lint - Run the GitHub Pages deploy flow:
bash scripts/deploy-gh-pages.sh - Deploy with a custom commit message:
bash scripts/deploy-gh-pages.sh "your message"
- Required before finishing:
npm run lint - Required before finishing:
npm run build - Direct standalone typecheck command: verify.
next buildcurrently performs type validation during build.
- Use TypeScript and function components.
- Prefer the
@/path alias for repo-root imports. - Keep the homepage assembled in
app/page.tsxfrom section components incomponents. - Styling is Tailwind-first, with a small amount of shared CSS in
app/globals.css. - Reuse the existing visual tokens defined in
tailwind.config.js:charcoal,pale-gray,accent,font-heading,font-body,shadow-soft. - Fonts are loaded in
app/layout.tsxwithnext/font/google. - Keep components mostly presentational and colocate simple content arrays with the section component unless there is a clear reason to extract shared data.
- Client components should be used only where browser APIs or event handlers are needed. Current example:
components/Navbar.tsx. - For normal source commits, prefer concise summary-style commit messages that describe the change directly, for example
Update hosted resume PDF. Let the user override the message if they want a different wording. - For GitHub Pages deploy commits, prefer
Deploy: <summary> (<UTC timestamp>)by default. The deploy script supports overriding this by passing a custom message argument.
- Preserve static-export compatibility. Do not introduce server-only features, runtime image optimization, or behavior that requires a Node server at runtime unless explicitly requested.
- Keep
next.config.jscompatible with GitHub Pages export.output: "export"andimages.unoptimizedare intentional. - Keep
out/as plain build output. Do not convert it into a git worktree or sync a worktree over it. - The deploy path depends on
.gh-pages-tmp/.gitsurviving the export sync. If you change the deploy script, preserve that file explicitly. - Preserve static assets needed for Pages hosting, especially
public/CNAMEandpublic/.nojekyll. - Analytics is injected globally through
components/GoogleAnalytics.tsxandNEXT_PUBLIC_GA_ID; avoid breaking the env override path. - Favor simple static content and client-light interactions. This repo is a single-page portfolio, not a full app shell.
.nextoutnode_modules.gh-pages-tmp- Deployment/domain files in
publicsuch asCNAMEand.nojekyll, unless the task is explicitly about hosting or domain setup scripts/deploy-gh-pages.sh, unless the task is explicitly about deployment
- Content/layout update: edit the relevant file under
componentsand keep section anchors in sync withapp/page.tsxandcomponents/Navbar.tsx. - Visual/theme update: prefer Tailwind token changes in
tailwind.config.jsand shared CSS changes inapp/globals.css. - Asset update: place files in
publicand reference them with root-relative paths. - Release/deploy: run
npm run build, thenbash scripts/deploy-gh-pages.sh.
- If a deploy ever appears to commit on
maininstead ofgh-pages, stop immediately and inspect whether.gh-pages-tmp/.gitstill exists. - If
npm run lintornpm run buildfails withnext: command not found, dependencies are not installed in the current checkout. Runnpm installbefore continuing. - A clean successful deploy should create a commit on
gh-pages, not onmain.
- Changes preserve static export behavior.
npm run lintpasses.npm run buildpasses.- New UI work remains consistent with the site’s existing typography, palette, spacing, and section-based homepage structure.
- Generated artifacts are not manually edited unless the task explicitly requires deployment output changes.