This is a starter kit for building modern React applications using Next.js, TypeScript, and TailwindCSS.
- node (>= 22.7.4)
- npm (>= 10.8.2)
-
Clone the repository:
git clone [email protected]:walkerchiu/nextjs-tailwindcss-kit.git cd nextjs-tailwindcss-kit
-
Install dependencies:
npm install
-
Initialize Husky:
npx husky init
-
Run the prepare script:
npm run prepare
-
Start the development server:
npm run dev
The application will be available at
http://localhost:3000
. -
Build the application for production:
npm run build
-
Run the production build locally:
npm start
-
Lint the code:
npm run lint
This project uses lint-staged
to run linters on staged files before committing. It ensures that your code meets the project's linting and formatting standards.
To manually run lint-staged
, use the following command:
npx lint-staged
The pre-commit hooks configuration is defined in the .pre-commit-config.yaml
file.
To set up pre-commit hooks, run the following command:
# Install pre-commit to manage git hooks
brew install pre-commit
# Install the git hook scripts.
pre-commit install
# Run against all the files.
pre-commit run --all-files
To learn more about Next.js, TypeScript, and TailwindCSS, take a look at the following resources: