Documentation
Get Started
Everything you need to download, configure, and start building with this production-ready Next.js boilerplate.
Download the Boilerplate
Choose your preferred method to get the code.
Clone via HTTPS
Best for most users. Requires Git installed.
git clone https://github.com/poran120/react-nextjs-boilerplate.gitClone via SSH
For users with SSH keys configured on GitHub.
git clone git@github.com:poran120/react-nextjs-boilerplate.gitDownload ZIP
No Git required. Downloads a compressed archive.
Installation
Step-by-step guide to get the project running locally.
Navigate to the project
cd react-nextjs-boilerplateInstall dependencies
Choose your preferred package manager:
npm installyarn installpnpm installStart the development server
npm run devThe app will be available at http://localhost:3000
Environment Setup
Configure environment variables for your project.
Create a .env.local file in the project root:
# Backend API
NEXT_PUBLIC_API_BASE_URL=http://localhost:8000
# Client URL
NEXT_PUBLIC_CLIENT_BASE_URL=http://localhost:3000Environment Variables
NEXT_PUBLIC_API_BASE_URLRequiredBackend API base URL used by server actionsNEXT_PUBLIC_CLIENT_BASE_URLRequiredClient-facing base URL for redirects and linksNODE_ENVOptionalAutomatically set by Next.js (development / production)Available Scripts
Built-in scripts for development, building, and linting.
npm run devStart development server with Turbopacknpm run buildCreate an optimized production buildnpm run startStart the production servernpm run lintRun ESLint to check for code issuesDeployment
Deploy your application to production.
Vercel (Recommended)
Zero-config deployment optimized for Next.js.
- Push your code to GitHub
- Import the repository on vercel.com
- Vercel auto-detects Next.js and configures the build
- Set environment variables in the Vercel dashboard
- Deploy
Manual Deployment
For custom hosting providers or self-hosted servers.
npm run build
npm run startNext Steps
Now that your project is running, explore the architecture to understand the folder structure, utilities, and conventions.
Explore Architecture →