|
| 1 | +# Copilot Instructions for Gitfolio |
| 2 | + |
| 3 | +## Project Overview |
| 4 | +Gitfolio is a **single-page portfolio template** for developers. All user-customizable content lives in `app/page.tsx`. This is a beginner-friendly template—keep changes simple and well-commented. |
| 5 | + |
| 6 | +## Architecture |
| 7 | + |
| 8 | +### Single-File Content Model |
| 9 | +- **`app/page.tsx`** - Contains ALL portfolio content and components (nav, hero, projects, about, contact, footer) |
| 10 | +- Components are defined at bottom of file: `ProjectCard`, `SocialLink`, `ArrowRightIcon`, `ArrowUpRightIcon` |
| 11 | +- No separate component files—intentionally flat for beginner accessibility |
| 12 | + |
| 13 | +### GitHub Pages Deployment Pattern |
| 14 | +This project uses a **dual-environment basePath** pattern for local dev + GitHub Pages: |
| 15 | + |
| 16 | +```tsx |
| 17 | +// In page.tsx - for images |
| 18 | +const basePath = process.env.NODE_ENV === "production" ? "/gfbs3-portfolio-demo" : ""; |
| 19 | +src={`${basePath}/me.png`} |
| 20 | + |
| 21 | +// In next.config.ts - for routing |
| 22 | +basePath: isProd ? "/gfbs3-portfolio-demo" : "", |
| 23 | +``` |
| 24 | + |
| 25 | +**Critical**: When users fork this repo, they must update the repo name in BOTH files. |
| 26 | + |
| 27 | +## Design System |
| 28 | + |
| 29 | +### Color Palette (Tailwind classes) |
| 30 | +| Color | Primary Use | Tailwind Classes | |
| 31 | +|-------|-------------|------------------| |
| 32 | +| Cyan | Links, accents, tech | `cyan-400`, `cyan-500`, `cyan-700` | |
| 33 | +| Fuchsia | Highlights, emphasis | `fuchsia-400`, `fuchsia-500`, `fuchsia-600` | |
| 34 | +| Yellow | CTAs, warnings | `yellow-400`, `yellow-500` | |
| 35 | +| Purple | Gradients | `purple-400`, `purple-500` | |
| 36 | + |
| 37 | +### Glow Effects Pattern |
| 38 | +```tsx |
| 39 | +// Text glow |
| 40 | +className="drop-shadow-[0_0_8px_rgba(34,211,238,0.6)]" |
| 41 | + |
| 42 | +// Box glow on hover |
| 43 | +className="hover:shadow-[0_0_20px_rgba(34,211,238,0.4)]" |
| 44 | +``` |
| 45 | + |
| 46 | +### ProjectCard Component |
| 47 | +```tsx |
| 48 | +<ProjectCard |
| 49 | + title="PROJECT_NAME" // UPPERCASE_SNAKE_CASE convention |
| 50 | + description="..." |
| 51 | + tags={["REACT", "API"]} // Uppercase tags |
| 52 | + color="cyan" // cyan | fuchsia | purple | yellow |
| 53 | + href="https://..." |
| 54 | +/> |
| 55 | +``` |
| 56 | + |
| 57 | +## Key Files |
| 58 | + |
| 59 | +| File | Purpose | |
| 60 | +|------|---------| |
| 61 | +| `app/page.tsx` | All content + components | |
| 62 | +| `app/layout.tsx` | Metadata, fonts (Geist) | |
| 63 | +| `app/globals.css` | Tailwind imports only | |
| 64 | +| `next.config.ts` | Static export + basePath | |
| 65 | +| `.github/workflows/deploy.yml` | GitHub Pages CI/CD | |
| 66 | +| `public/me.png` | Profile image location | |
| 67 | + |
| 68 | +## Commands |
| 69 | +```bash |
| 70 | +npm run dev # Local development at localhost:3000 |
| 71 | +npm run build # Production build (static export to /out) |
| 72 | +npm run lint # ESLint check |
| 73 | +``` |
| 74 | + |
| 75 | +## When Helping Users |
| 76 | + |
| 77 | +1. **Content changes** → Edit `app/page.tsx` only |
| 78 | +2. **Adding images** → Place in `/public`, use `${basePath}/filename` pattern |
| 79 | +3. **Deployment issues** → Check basePath matches repo name in both config files |
| 80 | +4. **Styling** → Use existing Tailwind classes; maintain cyberpunk aesthetic |
| 81 | +5. **New sections** → Follow existing section pattern with `id` for nav linking |
0 commit comments