Building a High-Performance Next.js Portfolio
Aniket Raj — Professional Portfolio & Blog
A high-performance, production-grade digital hub built with the latest Next.js 15 features. This project serves as a comprehensive showcase of technical expertise, featuring a modular blog system, interactive canvas-based visuals, and a futuristic design language.
1. Project Overview
What is this project? This is a modern, full-stack personal portfolio and technical blog built using Next.js 15. It integrates a sleek, cyberpunk-inspired UI with high-performance animations, a project gallery, and an automated blog system that supports both MDX and PDF content.
What real problem does it solve and who is it built for? It provides a centralized, professional platform for developers and tech professionals to showcase their work, share technical knowledge through detailed articles, and enable secure communication with potential clients or employers. It solves the fragmentation of digital presence by combining a portfolio, resume, and blog into one optimized experience.
Value Proposition "A futuristic, performance-optimized digital ecosystem designed to maximize professional visibility and technical storytelling."
2. Live Demo & Visuals
Live Demo: https://www.rajaniket.com/
(Screenshots coming soon)
3. Tech Stack & Choices
| Technology | Version | Why Chosen |
|---|---|---|
| Core | ||
| Next.js | ^15.2.4 | Primary framework for its SSR/Static Generation capabilities and robust App Router for SEO. |
| React | ^19.0.0 | Latest UI library for component-based architecture and experimental performance hooks. |
| TypeScript | ^5.8.3 | Enforces strict type-safety across the entire repository, reducing runtime errors. |
| Styling | ||
| Tailwind CSS | ^3.4.17 | Utility-first styling for rapid, responsive design and consistent theme variables. |
| Framer Motion | ^12.6.5 | Orchestrates complex UI transitions, spring-physics, and scroll-linked animations. |
| Data & State | ||
| Next-Themes | ^0.4.6 | Manages the global theme state (cyberpunk, midnight) with SSR support. |
| Zod | ^3.24.2 | Validates both client-side form inputs and server-side environment variables. |
| React Hook Form | ^7.55.0 | Handles complex form state and validation logic for the Contact section. |
| Communications | ||
| Resend | ^4.5.1 | Reliable API-based email delivery for secure server-to-user communication. |
| Prism.js | ^1.30.0 | Lightweight code highlighter for technical blog summaries and code blocks. |
4. Exhaustive Feature Catalog
🎨 Immersive Visuals & UX Engine
- 3D Interactive Tilt Cards ⭐
- Stacked Scroll Experience ⭐
- Spider Network Particle Canvas ⭐
- Magnetic Physics UI ⭐
framer-motion to detect cursor proximity and apply a localized gravity field ("pull") to major Call-To-Action buttons.
- Experience: Interfaces feel tactile and highly expensive, physically responding to user intent before a click.
- Fluid Cursor Trail Engine ⭐
- Dynamic Theme Customizer
- Grayscale-to-Color Personal Photo
🏆 Credentials & Showcasing
- High-Fidelity Certifications Lightbox
<img> tags over next/image.
- Experience: Completely bypasses standard framework image-compression bottlenecks to guarantee 4K legibility of micro-text on official certificates while interacting with the fullscreen lightbox.
✍️ Content & Blog Logic
- Hybrid MDX/PDF Blog Engine ⭐
- Reading Progress Navigation
- Automated Metadata Generator
- Related Posts Algorithm
🛡️ Technical & Performance Highlights
- Device-Aware Performance Scaling ⭐
- Micro-Throttled Analytics Engine
250ms throttle block onto the window.scroll event listener powering the AnalyticsEvents component.
- Experience: Captures rich scroll-depth metrics without thrashing the main thread or dropping rendering frames during intense background paints.
- Microsoft Clarity Telemetry Integration
next/script utilizing strategy="afterInteractive".
- Experience: Provides deep, passive user session reporting and heatmap recordings entirely off the critical rendering path to maintain perfect Lighthouse FCP scores.
- Intersection-Linked Reveals
- Type-Safe Server Actions
- Dynamic Component Deferral
ssr: false for heavy canvas components.
- Experience: Drastically reduces the "Time to Interactive" (TTI) by loading decorative elements after critical content.
💼 Career & Productivity Tools
- Career Timeline Tracker
- Project Metrics Strip
5. Project Structure
aniket-portfolio/
├── app/ # Next.js App Router (entry points & actions)
│ ├── actions/ # Server Actions
│ │ └── contact.ts # Zod validation + Resend API logic
│ ├── blog/ # Dynamic blog pages
│ │ ├── page.tsx # Blog archive / listing
│ │ └── [slug]/ # Individual post template
│ │ └── page.tsx # generateMetadata + generateStaticParams
│ ├── globals.css # Base Tailwind + Custom UI Utilities
│ ├── layout.tsx # Root layout (fonts, providers, global animations)
│ ├── not-found.tsx # Custom 404 experience
│ ├── page.tsx # Homepage (Composition of sections)
│ ├── robots.ts # Search engine instructions
│ └── sitemap.ts # Auto-generated XML sitemap
├── components/ # Modular component library
│ ├── analytics/ # Vercel, Google, & Umami scripts
│ │ ├── AnalyticsEvents.tsx # Custom event tracking
│ │ ├── GoogleAnalytics.tsx # G-tag integration
│ │ └── UmamiAnalytics.tsx # Umami self-hosted script
│ ├── animations/ # Reusable Framer Motion components
│ │ ├── AnimatedTitle.tsx # Staggered letter animations
│ │ ├── CustomCursorTrail.tsx # Global physics-based trailing cursor
│ │ ├── MagneticWrapper.tsx # Zero-gravity UI pull physics
│ │ ├── MotionWrapper.tsx # Page transition logic
│ │ ├── SectionReveal.tsx # Scroll-into-view revealing
│ │ ├── SpotlightReveal.tsx # Cursor-gradient revealing
│ │ ├── SpotlightText.tsx # High-contrast text reveals
│ │ └── Typewriter.tsx # Dynamic hero typing simulation
│ ├── blog/ # Post-level UI components
│ │ ├── CodeHighlighter.tsx # Prism.js implementation
│ │ ├── PdfViewer.tsx # Embedded document renderer
│ │ └── ReadingProgress.tsx # Dynamic scroll depth bar
│ ├── layout/ # Persistent shell components
│ │ ├── ClientLayoutProviders.ts# Context & Theme wrapper
│ │ ├── Footer.tsx # Modular footer with links
│ │ ├── MobileNav.tsx # Responsive hamburger + focus trap
│ │ ├── Navbar.tsx # Sticky header shell
│ │ └── NavLinks.tsx # Scroll-active tracking links
│ ├── sections/ # Singular page view components
│ │ ├── About.tsx # Interactive profile & stats
│ │ ├── BlogPreview.tsx # Latest articles listing
│ │ ├── Contact.tsx # Contact shell & link logic
│ │ ├── Education.tsx # Academic history & highlights
│ │ ├── Hero.tsx # Interactive landing experience
│ │ ├── Projects.tsx # Filterable project grid
│ │ ├── Services.tsx # Professional offerings
│ │ ├── Skills.tsx # Categorized tech arsenal
│ │ └── WorkExperience.tsx # Stacked card scroll experience
│ ├── shared/ # Cross-component primitives
│ │ ├── ContactForm.tsx # Zod + React Hook Form component
│ │ └── ProjectCard.tsx # Responsive grid card logic
│ ├── theme/ # Dynamic styling logic
│ │ ├── ThemeCustomizer.tsx # Real-time UI theme switcher
│ │ ├── ThemeProvider.tsx # Next-themes implementation
│ │ └── ThemeToggle.tsx # Mode switching trigger
│ └── ui/ # Atomic interface elements
│ ├── CopyButton.tsx # Clipboard interaction
│ ├── index.ts # UI barrel export
│ ├── ScrollToTop.tsx # Floating action button
│ └── Toast.tsx # Auto-dismissing notifications
├── content/ # Content Management
│ └── blog/ # Article source files (.mdx)
├── hooks/ # Custom logic abstractions
│ └── index.ts # useActiveSection, useReducedMotion
├── lib/ # Data & Utility Layer
│ ├── blog.ts # MDX/PDF file system parsers
│ ├── constants.ts # Global strings & config
│ ├── experience.ts # Timeline data & career records
│ ├── projects.ts # Project portfolio descriptions
│ └── skills.ts # Technical proficiency mapping
├── public/ # Static assets & public storage
│ ├── Aniket_Raj_Resume.pdf # Downloadable resume asset
│ ├── og-image.png # Meta social share image
│ ├── content/ # Large public files
│ │ └── pdfs/ # Technical documents for blog
│ └── images/ # Project screenshots & personal photos
├── scripts/ # Automation & maintenance
│ ├── migrations/ # Data structure update scripts
│ └── utils/ # Internal codebase tools
├── types/ # Shared TypeScript definitions
│ └── index.ts # Core interfaces (Post, Project, Experience)
├── next.config.mjs # Framework configuration
├── package.json # Dependencies & scripts
├── tailwind.config.ts # Design system tokens & colors
└── tsconfig.json # TypeScript compiler configuration
6. State Management & Data Flow
Global State Strategy
The project utilizes Next-Themes and standard React State for UI-specific flows.- Theme State: Managed globally to persist user preference (
cyberpunk,midnight, etc.) across visits. - Interaction State: Tracks active sections on scroll to highlight the corresponding item in the Navbar.
- Form State:
react-hook-formmanages the complex lifecycle of the Contact section, from input focus to server-side submission feedback.
Data Walkthrough: "Sending a Contact Message"
- Validation: User inputs are validated in real-time on the client using a Zod schema.
- Transmission: The data is passed to a Server Action, ensuring the Resend API key is never exposed to the browser.
- Execution: The server re-validates the payload, prepares a HTML template, and calls the Resend API.
- Feedback: A success or error result is returned, triggering a global
Toastnotification and resetting the form on success.
7. Browser APIs & Technical Highlights
Native Browser APIs Used
- Canvas API: Powers the high-performance Spider Network and Mouse Trail.
- IntersectionObserver API: Controls section reveal animations and pauses background processes when off-screen.
- MatchMedia API: Detects "Prefers Reduced Motion" OS settings to automatically disable intensive animations for accessibility.
- Clipboard API: Powers the one-click copy functionality in the Contact section.
- requestAnimationFrame: Orchestrates the rendering loops for canvases to match the user's screen refresh rate.
Built with ⚡ by Aniket Raj
What Sitting Through Dozens of Frontend Interviews Actually Taught Me
Next PostToken Tracker for Claude
Enjoyed this post? Let's connect and talk frontend!
Get in Touch