๐ 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 |
โก 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 && \
โ๏ธ 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 }
โ 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