Skip to content

movoid12/react-tanstarter

 
 

Repository files navigation

A minimal starter template for 🏝️ TanStack Start. → Preview here

Getting Started

We're using pnpm by default, but you can modify the scripts in package.json to use your preferred package manager.

  1. Use this template or clone this repository with gitpick:

    npx gitpick dotnize/react-tanstarter myapp
    cd myapp
  2. Install dependencies:

    pnpm install
  3. Create a .env file based on .env.example.

  4. Push the schema to your database with drizzle-kit:

    pnpm db push

    https://orm.drizzle.team/docs/migrations

  5. Run the development server:

    pnpm dev

    The development server should now be running at http://localhost:3000.

Issue watchlist

Goodies

Scripts

These scripts in package.json use pnpm by default, but you can modify them to use your preferred package manager.

  • auth:generate - Regenerate the auth db schema if you've made changes to your Better Auth config.
  • db - Run drizzle-kit commands. (e.g. pnpm db generate to generate a migration)
  • ui - The shadcn/ui CLI. (e.g. pnpm ui add button to add the button component)
  • format, lint, check-types - Run Prettier, ESLint, and check TypeScript types respectively.
    • check - Run all three above. (e.g. pnpm check)
  • deps - Selectively upgrade dependencies via taze.

Utilities

  • auth-guard.ts - Sample middleware for forcing authentication on server functions. (see #5 and #17)
  • ThemeToggle.tsx - A simple component to toggle between light and dark mode. (#7)

Building for production

Read the hosting docs for information on how to deploy your TanStack Start app.

License

Code in this template is public domain via Unlicense. Feel free to remove or replace for your own project.

Also check out

About

🏝️ minimal TanStack Start template with Better Auth, Drizzle ORM, shadcn/ui

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 88.8%
  • CSS 9.0%
  • JavaScript 2.2%