Remember that performance monitoring system I built? The one I was so proud of? Well, it turns out that was just a band-aid on a much bigger problem. Let me tell you about how my portfolio's past caught up with me.
The Origin Story
When I first built this portfolio, I had just learned web development. The only framework I knew was Angular - and an old version at that. I had no concept of maintainability, code quality, or best practices. The result? One massive HTML file, one enormous SCSS file, and one absolutely monstrous TypeScript file containing my entire website.
But here's the thing - it worked. And when something works, you keep building on it. Over the years, I kept adding features: the WebGL galaxy background, the click spark effects, the decrypt animations, the Magic Bento hover effects. Each addition made the codebase more tangled, but the site kept looking better and better.
The Breaking Point
The performance monitor was my attempt to fix everything without addressing the root cause. It was like putting a turbocharger on a car with a cracked engine block. Sure, it helped - but the foundation was crumbling.
The real problems were deeper:
• No code splitting - users loaded everything at once
• No lazy loading - below-fold content blocked initial render
• Outdated Angular patterns - no modern optimization techniques
• Unmaintainable structure - any change risked breaking everything
• No SSR - poor SEO and slow initial paint
The Decision
I knew what I needed: a complete rewrite. Not a refactor. Not an upgrade. A full, ground-up rebuild using modern best practices. The choice of framework was easy - Next.js 15 with React 19, the latest and greatest, with server components, app router, and built-in optimizations.
The Migration Journey
Here's how I approached the rewrite:
1. Component Architecture
Instead of one monolithic file, I broke everything into focused components. Each section (Hero, Education, Experience, Projects, Skills, Interests) became its own module with clear responsibilities.
2. Server Components
Next.js server components meant I could render static content on the server and only hydrate interactive parts. The Hero shell renders on the server; the decrypt animation hydrates on the client.
3. Dynamic Imports
Below-fold sections are now lazy loaded with next/dynamic. Users see the hero instantly while the rest loads in the background.
4. Porting the WebGL
The trickiest part was porting the galaxy background. The GLSL shaders translated directly, but the React lifecycle required careful handling of the WebGL context - creating on mount, cleanup on unmount, and proper resize handling.
5. Asset Optimization
Every PNG became a WebP. Every image uses next/image for automatic optimization. The result? Dramatically smaller payloads.
The Results
The new portfolio is everything the old one couldn't be:
• Maintainable - Clean component structure, no comments needed
• Fast - Server-rendered, lazy-loaded, optimized assets
• Modern - Next.js 15, React 19, latest best practices
• SEO-ready - Proper meta tags, server rendering, sitemap
• Buttery smooth - GPU-accelerated animations, event delegation
And the best part? That performance monitor I was so proud of? I removed it entirely. When your foundation is solid, you don't need band-aids.
Sometimes the right answer isn't to fix what's broken - it's to build something better.