24

sonu.dev

Behind the scenes of building my personal portfolio with Next.js 13, MDX, Tailwind, and Contentlayer

🚧 How I Built My Portfolio

This portfolio was a hands-on learning project where I combined multiple modern frontend technologies to showcase my work and personal brand. I built it using Next.js 13, TypeScript, Tailwind CSS, and MDX, ensuring it’s both beautiful and performance-optimized.

🎯 Goal

My goal was to create a clean, responsive site that:

  • Reflects my skills as a frontend and full-stack developer
  • Is optimized for performance and SEO
  • Supports dynamic content via MDX
  • Is enjoyable to build and maintain

πŸš€ Features Implemented

  • βœ… Modern Tech Stack: Built using App Router from Next.js 13 with TypeScript
  • πŸ“± Responsive Design: Ensured usability on mobile, tablet, and desktop
  • πŸ“š MDX + Contentlayer: For writing blog posts and project pages in Markdown with React components
  • πŸ’‘ Framer Motion Animations: Added smooth transitions and scroll effects
  • πŸ’» Syntax Highlighting: Configured with rehype-pretty-code for clean code blocks
  • ⚑ Performance Optimized: Lighthouse score close to 100
  • πŸŒ— Dark Mode: Light and dark theme support using Tailwind’s dark class
  • πŸ” SEO-Ready: Metadata, open graph, and structured content

πŸ› οΈ Stack I Used

  • Framework: Next.js 13 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Content: Contentlayer + MDX
  • Animation: Framer Motion
  • Icons: Lucide-react
  • Formatter: Rome (for fast linting/formatting)
  • Analytics: Upstash Redis (basic logging)

πŸ—οΈ Folder Structure

β”œβ”€β”€ app/              # App directory for routing and layout
β”œβ”€β”€ components/       # Reusable UI components
β”œβ”€β”€ content/          # MDX files (projects, posts)
β”œβ”€β”€ public/           # Static images and assets
β”œβ”€β”€ styles/           # Global Tailwind styles
β”œβ”€β”€ types/            # Custom TypeScript interfaces
└── util/             # Helpers and utilities