Next.js Template with TailwindCSS and TypeScript
This is a starter template for building web applications using Next.js with a comprehensive set of tools and libraries to enhance your development workflow and ensure code quality. It includes support for TailwindCSS, TypeScript, ESLint, Prettier, Husky, Lint Staged, Commitlint, Jest, React Testing Library, and Github Actions.
Follow these steps to get started with your project:
Clone the Repository: Use git clone
to clone this repository to your local machine.
Install Dependencies:
npm install
yarn
pnpm install
Development: Start the development server with:
npm run dev
yarn dev
pnpm dev
Linting and Formatting:
npm run lint
to lint your code and npm run format
to format it.yarn lint
to lint your code and yarn format
to format it.pnpm lint
to lint your code and pnpm format
to format it.Testing: Write and run tests using:
npm test
yarn test
pnpm test
Continuous Integration: Github Actions workflows are set up for automated testing and deployment. Customize the workflows in the .github/workflows
directory.
Customization: Customize the project as per your requirements. Add new components, pages, styles, and more.
Deployment: Deploy your application to the hosting platform of your choice using the appropriate commands or configurations.
/
├── .github/
│ └── workflows/ # Github Actions workflows
├── .husky/ # Husky configuration
├── src/
│ └── app/ # Next.js pages
│ └── components/ # React components used in pages
│ └── utils/ # Utility functions
├── .jest/ # Jest setup files
├── .eslintrc.json # ESLint configuration
├── .gitignore # Git ignore rules
├── .prettierrc # Prettier configuration
├── commitlint.config.js # Commitlint configuration
├── jest.config.mjs # Jest configuration
├── next.config.js # Next.js configuration
├── package.json # Project dependencies and scripts
├── README.md # Project README (you're here!)
├── postcss.config.js # PostCSS configuration
├── tailwind.config.js # TailwindCSS configuration
└── tsconfig.json # TypeScript configuration