๐ NextJS Setup Guide 2025 โ
Welcome to your NextJS development journey! This guide walks you through setting up a professional NextJS environment on Windows, Linux, and macOS.
๐ป Minimum Hardware Requirements โ
WARNING
Purpose: Ensure your system can run modern web development tools smoothly.
- ๐ฒ Processor: Intel Core i5/AMD Ryzen 5/Apple M1 or better
- ๐งฎ RAM: 8GB minimum (16GB recommended)
- ๐พ Storage: 256GB SSD (or faster)
- ๐ฅ๏ธ Display: 1920x1080 resolution or higher
- ๐ Internet: Broadband connection for package installations and updates
โ ๏ธ Insufficient hardware may slow down build times and development tasks.
๐ ๏ธ VS Code Setup โ
Purpose: VS Code offers a lightweight yet powerful IDE for NextJS development.
๐ฅ Installation Steps โ
- Download Visual Studio Code
- Install:
- Windows: Add "Open with Code" to Explorer context menu; add to PATH.
- Linux: Install via your package (deb, rpm, or snap) and ensure it's in PATH.
- macOS: Drag to Applications; run
Cmd+Shift+P
and type โShell Command: Installโ to addcode
to PATH.
- โ
Verify:bash
code --version
๐ GitHub Account & Git Setup โ
GitHub Account โ
- ๐ Visit GitHub Signup
- ๐ Complete your profile and verify your email.
Git Installation โ
๐ช Windows: โ
- Download Git for Windows
- Install with default settings:
- Use Git from Git Bash/Command Prompt
- Set the initial branch to main
- Enable Git Credential Manager
๐ง Linux (Ubuntu/Debian): โ
bash
sudo apt update
sudo apt install git
๐ macOS: โ
bash
brew install git
๐ Configure Git โ
bash
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
๐ SSH Key Setup โ
WARNING
๐ก๏ธ Security Steps โ
- Generate SSH Key:bash
ssh-keygen -t ed25519 -C "your.email@example.com"
- Start SSH Agent:
- Windows:bash
eval $(ssh-agent -s) ssh-add C:\Users\YourUsername\.ssh\id_ed25519
- Linux/macOS:bash
eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519
- Windows:
- Copy Key to Clipboard:
- Windows:bash
clip < C:\Users\YourUsername\.ssh\id_ed25519.pub
- Linux:bash
cat ~/.ssh/id_ed25519.pub | xclip -selection clipboard
- macOS:bash
pbcopy < ~/.ssh/id_ed25519.pub
- Windows:
- Add to GitHub:
Go to GitHub Settings โ SSH Keys โ New SSH Key and paste your key.
โก Node.js & NextJS Setup โ
๐ฅ Install Node.js โ
Choose one of these methods:
- Official Installer: Download from nodejs.org
- Using NVM (recommended):bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash nvm install --lts nvm use --lts
๐๏ธ Create a New NextJS App โ
- Scaffold the Project:bash
npx create-next-app@latest my-nextjs-app
- Navigate & Start Development:bashThe app runs at http://localhost:3000.
cd my-nextjs-app npm run dev
๐ Project Structure โ
Your project includes:
- pages/: Routes and view components.
- public/: Static assets.
- styles/: CSS and global styles.
- next.config.js: Configuration.
๐งฉ VS Code Extensions for NextJS โ
๐ ๏ธ Essential Extensions โ
Extension | Purpose | Link |
---|---|---|
๐ ESLint | Linting for JavaScript/TypeScript | Install |
โจ Prettier | Code formatter | Install |
๐ Tailwind CSS IntelliSense | Autocompletion for Tailwind CSS | Install |
๐๏ธ GitLens | Enhanced Git capabilities | Install |
๐ Markdown All in One | Markdown editing support | Install |
๐ท Additional Recommended Extensions โ
Extension | Purpose | Link |
---|---|---|
๐ Apollo GraphQL | GraphQL integration with Apollo Client | Install |
๐ณ Docker | Docker container management and integration | Install |
โธ๏ธ Kubernetes | Kubernetes cluster management and YAML support | Install |
โก Quick Install Command โ
bash
code --install-extension dbaeumer.vscode-eslint && \
code --install-extension esbenp.prettier-vscode && \
code --install-extension bradlc.vscode-tailwindcss && \
code --install-extension eamodio.gitlens && \
code --install-extension yzhang.markdown-all-in-one && \
code --install-extension apollographql.vscode-apollo && \
code --install-extension ms-azuretools.vscode-docker && \
code --install-extension ms-kubernetes-tools.vscode-kubernetes-tools
โ๏ธ VS Code Configuration for NextJS โ
- Open Settings JSON:
- Windows/Linux:
Ctrl+Shift+P
- macOS:
Cmd+Shift+P
- Type โPreferences: Open User Settings (JSON)โ
- Windows/Linux:
- Apply Settings:json
{ "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "files.trimTrailingWhitespace": true, "files.insertFinalNewline": true, "terminal.integrated.shellArgs.linux": ["-l"], "eslint.format.enable": true, "javascript.validate.enable": false, "typescript.validate.enable": false }
๐ง Additional Tools Installation โ
๐ท GraphQL Setup โ
- Install GraphQL CLI (optional):bash
npm install -g graphql-cli
- Add GraphQL to your project (if needed):bash
npm install graphql
- For advanced use: Consider Apollo or Relay for client/server solutions.
๐ณ Docker Setup โ
- Download & Install:
- Windows/macOS: Get Docker Desktop.
- Linux (Ubuntu/Debian):bash
sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
- Verify Installation:bash
docker --version
โธ๏ธ Kubernetes Setup โ
- Install Minikube (local Kubernetes cluster):
- Windows/macOS: Follow instructions at Minikube Start.
- Linux:bash
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 sudo install minikube-linux-amd64 /usr/local/bin/minikube
- Verify Installation:bash
minikube version
โ Verification โ
๐ Check Installation โ
bash
# Node.js
node --version # Should show the installed version
# NextJS App
cd my-nextjs-app
npm run dev # Verify app runs at http://localhost:3000
# Git
git --version
# SSH (to GitHub)
ssh -T git@github.com # Should confirm your SSH connection
๐ Conclusion โ
You now have a complete NextJS development environment set up, plus installation steps for:
- ๐ ๏ธ GraphQL tools
- ๐ณ Docker
- โธ๏ธ Kubernetes
Happy coding!