Skip to content

Next.js + Tailwind CSS + TypeScript template for useful development features.

License

Notifications You must be signed in to change notification settings

usphantomlancer/nextjs-tailwind-typescript-template

Repository files navigation

Next.js + Tailwind CSS + TypeScript Template for Start

Features

This repository is battery packed with:

  • ⚡️ Next.js 13 with App Router
  • ⚛️ React 18
  • ✨ TypeScript
  • 💨 Tailwind CSS 3 — Configured with CSS Variables to extend the primary color
  • 🃏 Jest — Configured for unit testing
  • 📈 Absolute Import and Path Alias — Import components using @/ prefix
  • 📏 ESLint — Find and fix problems in your code, also will auto sort your imports
  • 💖 Prettier — Format your code consistently
  • 🐶 Husky & Lint Staged — Run scripts on your staged files before they are committed
  • 🤖 Conventional Commit Lint — Make sure you & your teammates follow conventional commit
  • ⏰ Release Please — Generate your changelog by activating the release-please workflow
  • 👷 Github Actions — Lint your code on PR
  • 🚘 Automatic Branch and Issue Autolink — Branch will be automatically created on issue assign, and auto linked on PR
  • 🔥 Snippets — A collection of useful snippets
  • 🗺 Site Map — Automatically generate sitemap.xml
  • 📦 Expansion Pack — Easily install common libraries, additional components, and configs.

See the 👉 feature details and changelog 👈 for more.

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

    npx create-next-app -e https://github.com/usphantomlancer/nextjs-tailwind-typescript-template project-name

    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/usphantomlancer/nextjs-tailwind-typescript-template/tree/pages-directory project-name
  3. Using degit

    npx degit usphantomlancer/nextjs-tailwind-typescript-template YOUR_APP_NAME

2. Install dependencies

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

yarn install

3. Run the development server

You can start the server using this command:

yarn 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.

About

Next.js + Tailwind CSS + TypeScript template for useful development features.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published