This is a modern, high-performance personal portfolio website built with Next.js 15 and TypeScript, deployed on Vercel. It features a dual-theme glassmorphism design, interactive animations, GitHub integration, and a clean, maintainable codebase with robust developer tooling.
-
Install dependencies
npm install
-
Start development server
npm run dev
-
Build for production
npm run build
-
Preview production build locally
npm run start
npm run devβ Start dev server (Turbopack)npm run buildβ Build for production (includes sitemap)npm run build:analyzeβ Analyze bundle sizenpm run startβ Start production servernpm run lintβ Run Next.js linternpm run formatβ Format code with Prettiernpm run type-checkβ TypeScript type-check (no emit)
- Framework: Next.js 15 (App Router) + TypeScript
- Styling: Styled-components with custom theme system
- Deployment: Vercel with full Next.js support
- Bundling: Turbopack (dev), custom webpack optimizations (prod)
- Dual Theme: Light/Dark, auto-detects system preference, persists user choice
- Glassmorphism: Modern, soft UI effects, theme-aware colors
- Interactive Animations: Particle background, page transitions
- GitHub Integration: Activity heatmap via GitHub API
- SEO: Structured data, canonical URLs, meta/OG tags
- Accessibility: ARIA labels, skip navigation, semantic HTML
- Performance: Lazy loading, chunk splitting, static image assets
/pages/ # Next.js pages (index, _app, _document, 404, etc.)
/src/
components/ # Reusable React components
features/ # Feature modules (layout, portfolio, navigation, etc.)
contexts/ # React contexts (ThemeContext, etc.)
styles/ # Themes, global styles, style helpers
services/ # API clients (GitHub, etc.)
utils/ # Helpers (structured data, FontAwesome setup, etc.)
/public/static/ # Static images and assets
This project uses barrel files and path aliases for cleaner imports and easier refactoring.
@componentsβ All components@featuresβ Feature modules (layout, portfolio, etc.)@servicesβ API clients@stylesβ Themes and styles@utilsβ Utilities@contextsβ React contexts
Example:
import { Layout, Portfolio } from '@features'
import { ThemeToggle } from '@components'
import { useTheme } from '@contexts'Avoid: Relative imports like
../../components/ThemeToggle
Each directory contains an index.ts that re-exports everything inside. Always add new exports there!
Adding a new component:
- Create your component in
/src/components/ - Export it via
/src/components/index.ts - Import it using
@components/MyComponent
- Vercel deployment: Configured in
vercel.json - Bundle splitting: Optimized for vendor/common chunks
- Bundle analyzer: Enabled with
ANALYZE=true - Styled-components: Compiler enabled
- Image optimization: Enabled via Vercel
- Aliases:
- TypeScript: See
tsconfig.json - Turbopack: See
next.config.js(turbopack.resolveAlias) - Do not configure aliases in webpack (for dev)
- TypeScript: See
Troubleshooting:
- "Webpack configured while Turbopack is not": Move aliases to
turbopack.resolveAlias - "Import not found": Ensure exported from the correct barrel file
- TypeScript errors: Check
tsconfig.jsonpaths and directory structure
- ParticleBackground: Canvas animation, mouse/scroll effects
- GitHubHeatmap: GitHub commit activity visualization
- ThemeToggle: Switches themes, animated
- SEOHead: Meta and structured data
- PageTransition: Animated route changes
- FontAwesome: Icon setup in
@utils/fontawesome.js
-
Run
npm auditregularly to catch vulnerabilities -
Address Dependabot alerts in GitHub
-
Never ignore security warnings; fix ASAP
-
Use npm
overridesfor transitive dependency fixes:"overrides": { "vulnerable-package": "^safe-version" }
-
After updates:
rm package-lock.json && npm installnpm audituntil 0 vulnerabilities- Test with
npm run buildandnpm run lint
-
Commit security fixes with the π emoji
Priorities:
- High severity β Fix immediately
- Medium β Within 24h
- Low β Within a week
Use Conventional Commits with themed emojis:
| Type | Emoji | Use For |
|---|---|---|
| feat | β¨ | New features |
| fix | π | Bug fixes |
| style | π¨ | UI/design/formatting |
| refactor | β»οΈ | Code refactoring |
| perf | β‘ | Performance improvements |
| test | π§ͺ | Adding/updating tests |
| docs | π | Documentation |
| chore | π§ | Tooling, dependencies, build |
| deploy | π | Deployment |
| enhance | π | Improvements to existing features |
Contextual emojis:
- π dark mode, π light mode, π theme, π― animation, π GitHub features, π navigation, π± responsive, βΏ accessibility, ποΈ infra, π security
Commit message format:
<emoji> <type>: <short description>
[optional body]
[optional footer]
Examples:
β¨ feat: add GitHub activity heatmap componentπ fix: prevent particles from falling during scrollπ feat: add theme persistence with localStorageπ fix: update lodash to patch critical vulnerability
Never include AI-generated signatures or footers. Keep commit messages clear and focused on the changes.
- GitHub CLI: Issue/PR/release management (
gh) - Vercel CLI: Deploy, manage serverless functions/projects (
vercel)
- Use path aliases and barrel files for all imports
- Prefer functional, accessible, and theme-aware components
- Regularly update dependencies and fix all security issues (see above)
- Document new features and update SEO/structured data as needed
Found a bug or have a suggestion?
Open an issue or PR β contributions are welcome!
Enjoy building and customizing your portfolio!