Skip to content

hiimvikash/nextjs

Repository files navigation

Next.js Course - Table of Contents

Course Overview

A comprehensive guide to Next.js covering routing, components, error handling, and advanced features.

Table of Contents

Core Concepts

Routing System

Error Handling & Special Pages

Advanced Routing Features

Metadata & SEO

Navigation


Quick Navigation

Topic File Description
RSC 02.RSC.md React Server Components basics
Routing 03.RoutingBasic.md File-based routing fundamentals
Nested Routes 04.NestedRoutes.md Multi-level URL structures
Dynamic Routes 05.DynamicRoutes.md Variable URL parameters
Nested Dynamic 06.NestedDR.md Complex dynamic routing
Catch All 07.CatchAllRoute.md Flexible route matching
Custom 404 08.Custom404Page.md Custom error pages
Private Folders 09.PrivateFolder_Grouping.md Code organization
Layouts 1011Layout.md Shared UI components
Metadata 1213.Metadata.md SEO and meta tags
Navigation 14_15_16_17.Navigation.md Navigation components
Error Handling 18_19_20_21 22_23.Error.md Error boundaries and recovery

1. Next.js 15 Notes - Introduction & Overview

What is Next.js?

Next.js is a React framework for building full-stack web applications. While React alone is just a library for building user interfaces (handling only the view layer), Next.js extends React's capabilities to create production-ready applications.

Key Differences: React vs Next.js

React (Library):

  • Handles only the view layer/user interfaces
  • Requires additional decisions and packages for:
    • Routing
    • Data fetching
    • Other production features

Next.js (Framework):

  • Uses React for UI building
  • Provides additional built-in features for production applications
  • Has established opinions and conventions
  • No need for additional packages - everything included

Why Learn Next.js?

Next.js simplifies the process of building production-ready web applications by providing essential features out of the box.

Key Features of Next.js

1. File-Based Routing

  • No need to install/configure third-party routing packages
  • Simply create files and routes are automatically generated
  • Eliminates traditional React routing complexity

2. API Routes (Full-Stack Framework)

  • Build both frontend React components AND backend APIs
  • Seamless integration between frontend and backend code
  • Single application for complete full-stack development

3. Rendering Flexibility

  • Supports both server-side rendering (SSR)
  • Supports client-side rendering (CSR)
  • Improves performance when implemented properly
  • Better search engine optimization (SEO)

4. Streamlined Data Fetching

  • Built-in async/await support in React components
  • Makes data fetching straightforward and efficient
  • Simplified data management

5. Flexible Styling Options

  • CSS Modules support
  • Tailwind CSS integration
  • CSS-in-JS solutions
  • Multiple approaches to match preferences

6. Built-in Optimizations

  • Image optimization
  • Font optimization
  • Script optimization
  • Enhances Core Web Vitals
  • Improves overall user experience

7. Optimized Build System

  • Development environment optimized
  • Production build system included
  • Focus on coding instead of complex configurations
  • No additional build tool setup required

Prerequisites

Required Knowledge:

  • HTML, CSS, and JavaScript fundamentals
  • React fundamentals (since Next.js is a React framework)

Essential React Concepts:

  • Function components
  • Props
  • State management
  • JSX syntax
  • React Hooks

Note on React Knowledge:

  • Don't need to be an expert
  • Should be familiar with core concepts
  • Solid foundation in React fundamentals is essential

NextJS from official Docs

πŸ“˜ Next.js (App Router) - Complete Learning Path

This guide will help you cover all important topics and scenarios in Next.js using the App Router, including both Client and Server Components.


πŸš€ Phase 1: Getting Started (Foundation)

  1. Introduction to Next.js
  2. Routing: App Router Overview
  3. Project Structure
  4. Layouts
  5. Pages
  6. Nested Routes
  7. Linking and Navigation

βš™οΈ Phase 2: Server vs Client Components

  1. Rendering Overview
  2. Server Components
  3. Client Components
  4. When to Use Client Components
  5. Shared Components Between Server and Client

πŸ”Œ Phase 3: Data Fetching

  1. Data Fetching Overview
  2. Fetching Data on the Server (Server Components)
  3. Loading UI & Suspense
  4. Error Handling
  5. Using Third-Party APIs

🌐 Phase 4: Advanced Routing Features

  1. Dynamic Routes
  2. Catch-all Routes
  3. Route Groups
  4. Intercepting Routes
  5. Parallel Routes
  6. Modals with Routes

🧠 Phase 5: Forms, Actions & Mutations

  1. Handling Forms
  2. Server Actions (form-based mutations)
  3. Client-side Forms

πŸ”’ Phase 6: Authentication & Authorization

  1. Authentication Patterns
  2. Using NextAuth.js
  3. Protecting Routes

πŸ“¦ Phase 7: API Routes and Middleware

  1. API Routes (Pages Router only)
  2. Middleware

⚑ Phase 8: Optimization & Performance

  1. Streaming
  2. Image Optimization
  3. Font Optimization
  4. Caching
  5. Preloading Data

πŸ§ͺ Phase 9: Testing & Deployment

  1. Testing
  2. Deployment on Vercel
  3. Environment Variables

πŸ” Bonus: Full Examples & Recipes


βœ… Final Tip

Go through the phases in order and build small projects along the way (e.g., dashboard, blog, auth app) to reinforce each concept.

Happy learning! πŸš€

About

This repository contain my notes while learning NextJS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published