Building a Modern Portfolio with Next.js 15
In this comprehensive guide, we'll explore how to build a stunning portfolio website using the latest technologies including Next.js 15, Tailwind CSS, and TypeScript.
Why Next.js 15?
Next.js 15 brings several exciting features:
- App Router: Enhanced routing with better performance
- Server Components: Improved server-side rendering
- TypeScript: First-class TypeScript support
- Image Optimization: Built-in image optimization
Setting Up the Project
First, let's create a new Next.js project:
npx create-next-app@latest my-portfolio --typescript --tailwind --eslint
Key Features We'll Build
- Responsive Design: Mobile-first approach
- Dark Mode: Toggle between light and dark themes
- Contact Form: Integrated with email service
- Blog System: MDX-powered blog
- Performance: Optimized for speed
Dark Mode Implementation
We'll use React Context to manage theme state:
const ThemeContext = createContext<ThemeContextType | undefined>(undefined);
Contact Form with Resend
Integrate email functionality using Resend API:
const response = await fetch('/api/send-email', {
method: 'POST',
body: JSON.stringify(formData),
});
Conclusion
Building a modern portfolio requires attention to detail, performance optimization, and user experience. With Next.js 15 and the right tools, you can create something truly exceptional.
Happy coding! 🚀