This is a boilerplate project for creating Next.js applications with the following features:
- SWR: Data fetching library for efficient and simplified API requests.
- Redux Toolkit: State management library for Redux with simplified syntax.
- Chakra UI: A simple, modular, and accessible component library.
- TypeScript: Typed superset of JavaScript for enhanced development.
- ESLint: JavaScript and TypeScript linter for maintaining code quality.
- Prettier: Code formatter for consistent code style.
- Husky: Git hooks for automated linting and formatting.
- Clone this repository:
git clone https://github.com/yourusername/your-repo.git
cd your-repo
- Install dependencies:
npm install
- Start the development server:
npm run dev
npm run dev
: Starts the development server.npm run build
: Builds the app for production.npm run start
: Starts the app in production mode.npm run lint
: Lints the code using ESLint.
pages/
: Contains the Next.js pages and routing.components/
: React components.store/
: Redux Toolkit setup and slice files.data/
: Swr setup and hooks for data fetching.styles/
: Global styles and Chakra UI theme.public/
: Static assets.package.json
: Project configuration and dependencies.tsconfig.json
: TypeScript configuration..prettierrc
: Prettier configuration..eslintrc.js
: ESLint configuration..husky/
: Husky Git hooks configuration.
Checkout to next-redux
branch
Checkout to next-swr
branch
Feel free to contribute to this project. Create a pull request or open an issue for any suggestions or improvements.
This project is licensed under the MIT License.
Remember to replace `yourusername` and `your-repo` with your actual GitHub username and repository name. This `README.md` provides an overview of the project, explains how to get started, lists available scripts, explains the project structure, and includes sections for contributing and licensing information.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.