Portfolio Website Architecture
Project Overview
A modern, single-page portfolio website built with Next.js 14, showcasing skills, projects, and contact information with smooth animations and responsive design.
Live URL: https://www.abishek-maharajan.online (opens in a new tab)
Tech Stack: Next.js 14, React 18, TypeScript, TailwindCSS, Framer Motion, Shadcn/ui
Deployment: GitHub Pages (static export)
Architecture & Structure
Core Technology Decisions
-
Next.js 14 with Static Export (
output: "export")- Generates static HTML/CSS/JS for GitHub Pages hosting
- No server-side rendering required
- Optimized for performance and SEO
-
Single Page Application (SPA)
- All content on one page (
src/app/page.tsx) - Smooth scroll navigation between sections
- No routing needed
- All content on one page (
-
Component-Based Architecture
- Reusable UI components in
src/components/ - Section-based content organization in
src/sections/ - Shadcn/ui for base UI primitives
- Reusable UI components in
File Structure
abishek-portfolio/
├── .github/workflows/
│ └── deploy.yml # GitHub Actions CI/CD
├── public/
│ ├── cropped.jpg # Profile photo
│ ├── memoji_out_optimized.mp4 # Optimized avatar (191 KB)
│ └── memoji_poster.jpg # Video poster (4.55 KB)
├── src/
│ ├── app/
│ │ ├── layout.tsx # Root layout
│ │ ├── page.tsx # Main portfolio page
│ │ └── globals.css # Global styles
│ ├── components/
│ │ ├── ui/ # Shadcn/ui primitives
│ │ ├── motion-*.tsx # Animation wrappers
│ │ └── *.tsx # Reusable components
│ ├── sections/
│ │ ├── hero.tsx # Landing section
│ │ ├── about.tsx # About section
│ │ ├── skills.tsx # Skills showcase
│ │ └── contact.tsx # Contact section
│ ├── lib/
│ │ ├── utils.ts # Utilities
│ │ ├── logger.ts # Logging
│ │ ├── secureLink.ts # Secure links
│ │ └── webVitals.ts # Performance monitoring
│ └── utils/
│ └── paths.ts # Asset path helper
├── pages/
│ └── docs/ # Documentation (Nextra)
├── next.config.mjs # Next.js + Nextra config
├── theme.config.jsx # Nextra theme config
└── package.jsonContent Structure
Page Layout
The main page (src/app/page.tsx) renders four sections:
<Hero /> // Introduction & animated avatar
<About /> // Personal background & photo
<Skills /> // Technical skills categorized
<Contact /> // Social links & contact infoSection Breakdown
1. Hero Section
- Greeting with animated text
- Memoji video (160x190px, optimized)
- Role titles with staggered animations
- Inspirational quote
- Social media links
2. About Section
- Two-column responsive layout
- Personal story and background
- 3D portrait card (desktop)
- Animated text reveals
3. Skills Section
- 5 categorized skill groups:
- Programming (6 skills)
- Web Development (8 skills)
- Data & Analytics (3 skills)
- AI/ML & LLMs (3 skills)
- DevOps & Infrastructure (7 skills)
4. Contact Section
- Call-to-action message
- Social media links
- Contact buttons
Performance Optimizations
LCP Optimization
Hero Video Optimization:
- Original: 48.8 MB → Optimized: 191 KB (99.6% reduction)
- Dimensions: 160x190px (natural portrait)
- Preload: metadata only
- Poster image: 4.55 KB JPEG
Results:
- LCP: 1.0-1.5 seconds (from 5-8 seconds)
- Performance Score: 90-95 (from < 50)
- Bandwidth Savings: 48.6 MB per page load
Build Optimizations
- Static Export (pure HTML/CSS/JS)
- Code Splitting (automatic)
- Tree Shaking (remove unused code)
- Package optimization (lucide-react)
Security & Observability
Security Headers
Implemented in next.config.mjs:
- Strict-Transport-Security (HSTS)
- X-Frame-Options
- X-Content-Type-Options
- Content-Security-Policy
- And more...
Monitoring
Web Vitals Tracking:
- LCP (Largest Contentful Paint)
- INP (Interaction to Next Paint)
- CLS (Cumulative Layout Shift)
- FCP (First Contentful Paint)
- TTFB (Time to First Byte)
Error Handling:
- React Error Boundary
- Structured logging
- Performance tracking
Dependencies
Core
next@14.2.32- React frameworkreact@18.2.0- UI librarytypescript@5.9.3- Type checking
Documentation
nextra@4.6.0- Documentation frameworknextra-theme-docs@4.6.0- Documentation theme
Styling
tailwindcss@3.4.17- Utility-first CSSframer-motion@11.0.5- Animations
Icons
@fortawesome/*- FontAwesome iconslucide-react@0.331.0- Lucide icons
Design Principles
Visual Hierarchy
- Clear typography scale
- Consistent spacing
- Minimal color palette
- Generous whitespace
User Experience
- Smooth scroll navigation
- Hover states on interactive elements
- Accessibility (ARIA labels, semantic HTML)
- Fast load times
Brand Identity
- GoldenSignature font for logo
- Clean, modern, minimal design
- Professional with personality
- Consistent patterns
Key Takeaways
What Makes This Portfolio Effective
- Single Page Design - All content accessible without navigation
- Progressive Disclosure - Animations reveal content as user scrolls
- Mobile-First - Works perfectly on all devices
- Fast Loading - Static export = instant page loads
- Easy Maintenance - Component-based, clear structure
- Professional Polish - Smooth animations, consistent design
- SEO Optimized - Proper meta tags, semantic HTML
- Accessible - ARIA labels, keyboard navigation
Architecture Highlights
- Separation of Concerns - Clear file organization
- Reusability - Motion components used throughout
- Configurability - Easy to update content
- Scalability - Easy to add new features
- Type Safety - TypeScript prevents errors
- Modern Stack - Latest React patterns