Building Portfolio in Next.js
Tutorials
Building Portfolio in Next.js

By Subash Maharjan


Chapters
  • Chapter 1

    Introduction

  • Chapter 2

    Project Architecture

  • Chapter 3

    SCSS Design Tokens

  • Chapter 4

    The Hero Component

  • Chapter 5

    The MDX Content Layer

  • Chapter 6

    Syntax Highlighting & Project Filters

  • Chapter 7

    Smooth Layout Transitions

  • Chapter 8

    Modern Contact Forms

  • Chapter 9

    SEO & Deployment

  • Chapter 10

    Lighthouse Performance & Blogging

  • Chapter 11

    Interactive Playgrounds & Subscriptions

  • Chapter 12

    Dynamic Social Previews & Launch

  • Chapter 13

    Project Summary for Recruiters

  • building portfolio in nextjs

    Introduction

    Chapter 1

    2 min read

    On this page
    Core Architecture & StrategyPortfolio Section StructureTechnical Setup Essentials
    Company LogoSubash
    HOMEABOUTPORTFOLIOCONTENTSCONTACT

    Building a portfolio website with Next.js using the App Router provides a powerful foundation for a fast, SEO-friendly, and modern developer showcase. This approach leverages Server Components to deliver minimal JavaScript to the client while maintaining a highly interactive user experience.

    Core Architecture & Strategy

    To create a professional-grade portfolio, the project should focus on these primary pillars:

    • Modular Styling: Use SCSS Modules (e.g., *.module.scss) to ensure styles are locally scoped, preventing class name collisions across your hero, project, and contact sections.
    • Performance with SSR: Next.js automatically extracts Critical CSS during Server-Side Rendering (SSR), ensuring your styles load instantly with the HTML to prevent a "Flash of Unstyled Content" (FOUC).
    • Dynamic Theming: Implement a server-safe dark mode using next-themes, which prevents layout shifts by injecting theme scripts into the document head before the page renders.
    • Content Management: Use MDX to write project case studies or blog posts in Markdown while embedding interactive React components directly into the text.

    Portfolio Section Structure

    A standard high-converting portfolio typically includes the following:

    1. Hero Section: A brief intro with your name, role, and a clear call to action (e.g., "View My Work").
    2. Projects Grid: A showcase of your best work using responsive cards and Image Optimization for fast loading.
    3. About & Skills: A summary of your technical stack and background, often enhanced with Framer Motion animations.
    4. Contact Form: A functional area for inquiries, often integrated with services like Nodemailer or EmailJS.

    Technical Setup Essentials

    To maintain a clean and scalable codebase, utilize Path Aliases in your tsconfig.json. This allows you to use absolute imports instead of messy relative paths.

    Pro-Tip: Path Aliases

    To avoid messy imports like import styles from '../../styles/Home.module.scss', ensure your tsconfig.json has an alias set up:

    "paths": {
      "@/*": ["./src/*"]
    }

    Then you can always use: import styles from '@/styles/Home.module.scss'.

    HOME
    ABOUT
    PORTFOLIO
    CONTENTS
    CONTACT

    © 2026Subash Maharjan™

    Made byHudeoworks Design