Building a Modern Portfolio with Next.js and Tailwind CSS
Building a Modern Portfolio with Next.js and Tailwind CSS
Creating a personal portfolio is one of the best ways to showcase your work and establish your online presence. In this post, I'll walk through how I built this very website using modern web technologies.
Why Next.js?
Next.js provides an excellent developer experience with features like:
- App Router for intuitive file-based routing
- Server Components for improved performance
- Built-in image optimization
- SEO-friendly with metadata API
The Tech Stack
Here's what I used:
const techStack = {
framework: "Next.js 14",
language: "TypeScript",
styling: "Tailwind CSS",
content: "MDX",
deployment: "Vercel",
};
Setting Up the Project
Getting started is straightforward:
npx create-next-app@latest portfolio --typescript --tailwind --app
Key Design Decisions
1. Dark Mode Support
I used next-themes for seamless dark mode toggling with system preference detection.
2. MDX for Blog Posts
MDX allows mixing Markdown with React components, making it perfect for technical blog posts with interactive examples.
3. Static Data Files
Experience, projects, and publications data live in JSON files, making updates straightforward without needing a CMS.
Performance Considerations
- Images are optimized using Next.js Image component
- Pages use static generation where possible
- CSS is minimal thanks to Tailwind's purging
Conclusion
Building a portfolio with Next.js is a rewarding experience. The framework handles much of the complexity, letting you focus on content and design.
Share this post
More posts
Transfer Learning for Low-Resource Languages: Lessons Learned
Insights and practical tips from my research on applying transfer learning techniques to Nepali and other low-resource languages.
Optimizing React Performance: A Practical Guide
Practical techniques for identifying and fixing performance bottlenecks in React applications.