Back to blog

Building a Modern Portfolio with Next.js

A deep dive into architecting a developer portfolio using Next.js App Router, Tailwind CSS, and MDX for a fast, SEO-friendly experience.

2 min read
Next.jsReactWeb Dev

Why Next.js for a Portfolio?

When it comes to building a developer portfolio, performance and SEO are non-negotiable. Next.js gives us the best of both worlds: the interactivity of React with the performance benefits of server-side rendering and static generation.

The App Router Advantage

The App Router introduced in Next.js 13+ brings several game-changing features:

  • React Server Components by default, reducing client-side JavaScript
  • Nested layouts for consistent UI patterns
  • Streaming for progressive page loading
  • Built-in SEO with the metadata API

Architecture Decisions

Server Components First

The key insight is that most of a portfolio is static content. Project cards, skill badges, and blog posts don't need client-side interactivity. By defaulting to Server Components, we ship less JavaScript and get faster initial page loads.

// This runs entirely on the server — zero client JS
export default function Projects() {
  return (
    <section>
      {projects.map(project => (
        <ProjectCard key={project.title} {...project} />
      ))}
    </section>
  );
}

MDX for Blog Content

Using MDX lets us write blog posts in Markdown while embedding React components when we need interactive examples. Combined with gray-matter for frontmatter parsing, we get a simple file-based CMS.

Performance Wins

By following these patterns, the portfolio achieves:

  • 100 Lighthouse performance score with server-side rendering
  • Zero layout shift with proper image sizing via next/image
  • Sub-second Time to Interactive thanks to minimal client JavaScript

The result is a portfolio that loads fast, ranks well, and is a joy to maintain.