Hey there, developer! Ready to dive into our awesome NextJS Boilerplate? This guide will help you set up and start developing in no time. Let's get started!
First things first, let's make sure you're using the right versions:
- Node: 18.19.0
- NPM: 10.2.3
Pro tip: Use NVM to manage your Node versions easily!
nvm install 18.19.0
nvm use 18.19.0
We use Git LFS for managing large files. Here's how to set it up:
-
For Ubuntu/Debian fans:
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash sudo apt-get install git-lfs
-
Mac users (with Homebrew):
brew update brew install git-lfs
-
Windows users: Grab the installer from Git LFS Releases
To install our npm packages, you'll need a GSAP token. Ask your project lead for this key!
-
For Mac/Linux: Add to your shell profile (e.g.,
~/.bash_profile
,~/.zshrc
):export GSAP_NPM_TOKEN=<your-gsap-token>
-
For Windows: Choose your favorite method:
- Command Prompt:
setx GSAP_NPM_TOKEN "<your-gsap-token>"
- PowerShell:
[Environment]::SetEnvironmentVariable("GSAP_NPM_TOKEN", "<your-gsap-token>", [System.EnvironmentVariableTarget]::User)
- GUI: Search for "Environment Variables" in the Start menu and add it there.
- Command Prompt:
Remember to restart your terminal after setting this up!
For a smooth coding experience, set up these linters in VSCode:
Update your VSCode settings (JSON) with our recommended configuration:
- Press
Cmd + Shift + P
(on Mac) orCtrl + Shift + P
(on Windows/Linux) - Type "Open Settings (JSON)" and select it
- Add or update the following settings:
{
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"stylelint.validate": ["css", "scss"]
}
These settings ensure that:
- Prettier formats your code on save
- ESLint fixes issues automatically
- Stylelint validates your CSS and SCSS files
With these linters set up, you'll catch and fix issues early, keeping your code clean and consistent!
git clone [email protected]:Experience-Monks/nextjs-boilerplate.git
npm install
Ready to code? Start your local server:
npm run dev
This will fire up:
- Frontend (https): https://localhost:3000
- Storybook: http://localhost:9001
Want to dive deeper? Check out our docs:
We're open source! Check out our MIT License.
Happy coding! 🎉👩💻👨💻