/react-starter

๐Ÿฑ Another React Starter using Bun, Vite, TypeScript, tailwindcss and daisyUI.

Primary LanguageTypeScript

React Starter

๐Ÿฑ Another React Starter using Bun, Vite, TypeScript, tailwindcss and daisyUI.

๐Ÿฃ Features

  • ๐Ÿž bun for a fast runtime and package manager.
  • โšก๏ธ vite for instant server start and lighting fast HMR.
  • ๐Ÿท๏ธ TypeScript for a less frustrating & consistent experience.
  • ๐Ÿ๏ธ TanStack Router for a fully type-safe React router.
  • ๐Ÿ๏ธ TanStack Query for asynchronous state management.
  • ๐Ÿ’„ tailwindcss for utility-first CSS.
  • ๐Ÿ’„ daisyUI for tailwindcss components.
  • ๐Ÿงฑ storybook for building UIs in isolation.
  • ๐Ÿงช vitest for fast testing.
  • ๐Ÿงช Playwright for fast and reliable e2e testing.
  • ๐Ÿงช Mock Service Worker for client-agnostic API mocks.
  • ๐Ÿฉบ eslint for static analysis.
  • ๐Ÿฉบ Knip for finding dead code.
  • ๐ŸŽจ prettier for formatting.
  • ๐Ÿฉบ lefthook for fast Git hooks management.
  • ๐Ÿ‘ท Turborepo for caching and task parallelization.
  • ๐Ÿ‘ท GitHub Actions for easy workflow automation.

๐Ÿ› ๏ธ Usage

You can either use this template or deploy on Vercel or use tiged, by running the following command:

bunx tiged jimmy-guzman/react-starter

๐Ÿ Getting Started

First install bun, by running the following command:

curl -fsSL https://bun.sh/install | bash

Now you can install dependencies, by running the following command:

bun install

Or if you already have bun installed you upgrade, by running the following command:

bun upgrade --stable

And to download new browsers for Playwright, run the following command:

bunx playwright install

And install Turborepo, run the following command:

bun install --global turbo

Then to run the development server, run the following command:

turbo dev

Your application will be available at http://localhost:5173/ โค๏ธ

๐Ÿงž Available Tasks

Command Action
bun install Installs dependencies
turbo dev Starts local dev server at http://localhost:5173/
turbo build Build your production site to ./dist/
turbo preview Preview your build locally, before deploying
turbo test Unit tests your code with vitest
turbo e2e E2E tests your code with playwright
turbo lint Lints everything with eslint
turbo lint:fix Fixes lint errors with eslint
turbo format Checks formatting with prettier
turbo format:fix Fixes formatting errors with prettier
turbo typecheck Checks types with TypeScript
turbo sb Starts storybook at http://localhost:6006
turbo sb:build Build your production storybook to ./storybook-static/
turbo check Checks everything

You can also run all tasks with bun run, i.e bun run dev