Skip to content

๐Ÿ• A starter for Next.js 15+ with preconfigured Tailwind CSS, ESLint, VSCode Settings and Prettier.

License

Notifications You must be signed in to change notification settings

dinhanhthi/nextjs-tailwind-starter

Repository files navigation

๐Ÿ• nextjs-tailwind-starter

A starter for Next.js 15+ with preconfigured Tailwind CSS, ESLint, VSCode Settings and Prettier.

Getting Started

To get started, install nvm and use it to install the desired version of Node.js and Yarn.

nvm install 20 # node v20
# then install yarn
npm i --global yarn
yarn --version

Warning

--turbo doesn't work with yarn PnP, try npm or force yarn to use node-modules instead! (Using node_modules with new yarn: yarn config set nodeLinker node-modules) (Revert to pnp by yarn config set nodeLinker pnp)

# install
yarn

# run dev server
yarn dev
yarn dev --turbo

# build
yarn build
yarn buuld --turbo

# run production server
yarn start

# lint
yarn lint

# prettier
yarn prettier

# clean
yarn clean

# reinstall
yarn reinstall

# run test in watch mode
yarn test

For an example of an api request, let's make a GET to http://localhost:3001/api/hello.

Upgrade guide

# all and intuitive
yarn upgrade-interactive

# Next.js
yarn add next@latest react@latest react-dom@latest eslint-config-next@latest

# Tailwind
yarn add -D tailwindcss@latest postcss@latest autoprefixer@latest @tailwindcss/typography@latest eslint-plugin-tailwindcss@latest prettier-plugin-tailwindcss@latest