This is a modern starter template designed for developers to kickstart their Next.js v15 projects. It comes pre-configured with essential tools and best practices to accelerate development and reduce boilerplate setup.
- Next.js v15: The latest version of Next.js with optimized performance and features.
- Organized Folder Structure: Clean and extensible architecture for better maintainability.
- State Management: Integrated with Redux Toolkit for advanced state management.
- Context API: Simplified state sharing without prop drilling.
- Custom Hooks: Prebuilt hooks to enhance reusability and efficiency.
- Environment Variables: Centralized and secure configuration using
.env
files.
⚠️ Note: Make sure to uncomment the.env
file from the.gitignore
file to ignore pushing it in the repo.
Start by cloning the repository:
git clone [email protected]:Moamal-2000/nextjs-template.git
Ensure you have Node.js installed on your machine. Then run:
npm install
Or, if you prefer Yarn:
yarn install
To start the local development server, use:
npm run dev
Your application will be available at http://localhost:3000
by default.
To create an optimized production build, run:
npm run build
You can then serve the build using:
npm run start
/pages
: Contains the app's routes and API endpoints./components
: Reusable UI components./styles
: Global and component-specific styles./hooks
: Custom React hooks for shared logic./redux
: State management setup with Redux Toolkit./public
: Static assets like images and fonts.
This template is designed to be flexible and extendable. Feel free to customize it to fit your specific project requirements.
Contributions are welcome! If you have ideas for improvement or find any issues, feel free to fork the repository, make your changes, and open a pull request.