A modern, feature-rich starter template for building web applications with Next.js, TypeScript, Tailwind CSS, Shadcn UI, Prettier, and ESLint.
Clone this repository:
git clone https://github.com/yourusername/next-typescript-template.git my-project
cd my-project
Install dependencies:
npm install
# or
yarn install
# or
pnpm install
# or
bun install
Start the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
next-typescript-template/
├── public/ # Static assets
├── src/
│ ├── app/ # App router pages
│ ├── components/ # React components
│ │ └── ui/ # Shadcn UI components
│ └── lib/ # Utility functions
├── .eslintrc.js # ESLint configuration
├── .prettierrc # Prettier configuration
├── next.config.js # Next.js configuration
├── tailwind.config.js # Tailwind CSS configuration
└── tsconfig.json # TypeScript configuration
This template uses Shadcn UI for UI components. You can add more components using the CLI:
npx shadcn@latest add [component-name]
For example:
npx shadcn@latest add dropdown-menu
npx shadcn@latest add avatar
This template uses Tailwind CSS for styling. You can customize the theme in tailwind.config.js
.
TypeScript configuration is in tsconfig.json
. You can customize it to fit your project's needs.
This template includes a consolidated GitHub workflow to automate common tasks:
The CI/CD workflow runs the following tasks in parallel:
All tasks are visualized in a matrix in the GitHub Actions UI, making it easy to see which tasks passed or failed.
To use these workflows, make sure your repository has the appropriate permissions:
This template follows Next.js App Router's model of using Server Components by default, with Client Components where needed for interactivity.
'use client'
directive at the topWhen adding interactivity:
'use client'
directiveFor more information, see the Next.js documentation on Client and Server Components.
You can deploy this template to any platform that supports Next.js, such as:
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
This project is licensed under the MIT License - see the LICENSE file for details.