theodorusclarence / ts-nextjs-tailwind-starter

🔋 Next.js + Tailwind CSS + TypeScript starter and boilerplate packed with useful development features
https://tsnext-tw.thcl.dev/
2.96k stars 522 forks source link
absolute-imports boilerplate boilerplate-template eslint github-actions husky jest nextjs nextjs-boilerplate nextjs-starter react snippets starter starter-template tailwind tailwindcss tailwindcss-starter-kit typescript

Next.js + Tailwind CSS + TypeScript Starter and Boilerplate

🔋 ts-nextjs-tailwind-starter

Next.js + Tailwind CSS + TypeScript starter packed with useful development features.

Made by Theodorus Clarence

[![GitHub Repo stars](https://img.shields.io/github/stars/theodorusclarence/ts-nextjs-tailwind-starter)](https://github.com/theodorusclarence/ts-nextjs-tailwind-starter/stargazers) [![Depfu](https://badges.depfu.com/badges/fc6e730632ab9dacaf7df478a08684a7/overview.svg)](https://depfu.com/github/theodorusclarence/ts-nextjs-tailwind-starter?project_id=30160) [![Last Update](https://img.shields.io/badge/deps%20update-every%20sunday-blue.svg)](https://shields.io/)

Features

This repository is 🔋 battery packed with:

See the 👉 feature details and changelog 👈 for more.

You can also check all of the details and demos on my blog post:

Getting Started

1. Clone this template using one of the three ways

  1. Use this repository as template

    Disclosure: by using this repository as a template, there will be an attribution on your repository.

    I'll appreciate if you do, so this template can be known by others too 😄

    Use as template

  2. Using create-next-app

    pnpm create next-app  -e https://github.com/theodorusclarence/ts-nextjs-tailwind-starter ts-pnpm

    If you still want to use pages directory (is not actively maintained) you can use this command

    npx create-next-app -e https://github.com/theodorusclarence/ts-nextjs-tailwind-starter/tree/pages-directory project-name
  3. Using degit

    npx degit theodorusclarence/ts-nextjs-tailwind-starter YOUR_APP_NAME
  4. Deploy to Vercel

    Deploy with Vercel

2. Install dependencies

It is encouraged to use pnpm so the husky hooks can work properly.

pnpm install

3. Run the development server

You can start the server using this command:

pnpm dev

Open http://localhost:3000 with your browser to see the result. You can start editing the page by modifying src/pages/index.tsx.

4. Change defaults

There are some things you need to change including title, urls, favicons, etc.

Find all comments with !STARTERCONF, then follow the guide.

Don't forget to change the package name in package.json

5. Commit Message Convention

This starter is using conventional commits, it is mandatory to use it to commit changes.

Projects using ts-nextjs-tailwind-starter

Are you using this starter? Please add your page (and repo) to the end of the list via a Pull Request. 😃

Expansion Pack 📦

This starter is now equipped with an expansion pack.

You can easily add expansion such as React Hook Form + Components, Storybook, and more just using a single command line.

https://user-images.githubusercontent.com/55318172/146631994-e1cac137-1664-4cfe-950b-a96decc1eaa6.mp4

Check out the expansion pack repository for the commands

App Router Update

Due to App Router update, the expansion pack is currently outdated. It will be updated in the future. You can still use them by copy and pasting the files.