Welcome to the Next.js 14 TypeScript Starter project! This repository is a boilerplate for Next.js 14 applications using TypeScript, integrating several advanced features and tools to kickstart your development.
This starter kit includes the following technologies:
- Next.js 14 with the App Router
- TypeScript: Static type checking
- Redux & Redux-Persist: State management and persistence
- Tailwind CSS: Utility-first CSS framework
- Sass: CSS pre-processing
- Docker: Application containerization
- Jest: Unit testing
- Playwright: End-to-end testing
- React Hook Form: Efficient form management
- ESLint & Prettier: Code linting and formatting
- Yup: Schema validation for forms
- lint-staged: Running linters on git staged files
Ensure you have Node.js version 14.x or higher installed. Docker is optional but recommended for containerization.
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/OlushesiToheeb/nextjs14-typescript-starter.git cd nextjs14-typescript-starter
-
Install dependencies:
npm install
To run the application in development or production environments, use the following commands:
-
Development mode:
npm run dev
-
Production mode:
Build and start the application:
npm run build npm start
To build and run the application using Docker, execute:
docker build -t nextjs14-typescript-starter .
docker run -p 3000:3000 nextjs14-typescript-starter
Run unit and end-to-end tests using:
-
Unit tests with Jest:
npm run test
-
End-to-end tests with Playwright:
npm run test:e2e
Ensure your code meets the coding standards with:
-
Linting:
npm run lint
-
Formatting:
npm run format
Husky and lint-staged are configured to run linters on git staged files to ensure code quality before commits.
Contributions to improve the starter kit are highly welcomed. Please feel free to fork the repository, make your changes, and submit a pull request.