tanstack-router-template Tailwind Templates

Tanstack Router Template

Basic template for Tanstack Router. React 18, Typescript, Tanstack Query, shadcn, Zod, React Hook Form, Tailwind v4, Vite, Radix, Antfu

TanStack Router Template

My basic template with TanStack Router and a few other libraries.

image

Features

  • āš”ļø Vite - Lightning fast build tool
  • šŸŽÆ TanStack Router - Type-safe routing for React
  • āš›ļø React 18 - The library for web and native user interfaces
  • šŸ” TypeScript - JavaScript with syntax for types
  • šŸŽØ Tailwind CSS - A utility-first CSS framework
  • šŸ“” TanStack Query - Powerful asynchronous state management
  • šŸŖ Zustand - Bear necessities for state management
  • šŸ“ React Hook Form - Performant form validation
  • šŸ” Zod - TypeScript-first schema validation
  • šŸŽ­ Radix UI - Unstyled, accessible components
  • šŸŽÆ ESLint - Code linting with modern config
  • šŸŽÆ TypeScript ESLint - TypeScript support in ESLint

Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • pnpm

Installation

Clone the repository:

git clone https://github.com/toyamarodrigo/tanstack-router-template.git
cd tanstack-router-template

Install dependencies:

pnpm install

Start the development server:

pnpm dev

The application will be available at http://localhost:3000.

Available Scripts

  • pnpm dev - Start development server at port 3000
  • pnpm build - Build for production
  • pnpm serve - Preview production build at port 5000
  • pnpm lint - Run ESLint
  • pnpm lint:fix - Fix ESLint errors
  • pnpm typecheck - Check TypeScript types

Project Structure

src/
ā”œā”€ā”€ routes/           # Route components and definitions
ā”œā”€ā”€ components/       # Reusable UI components
ā”œā”€ā”€ styles/          # Global styles and Tailwind config
ā”œā”€ā”€ lib/             # Utility functions and configurations
ā”œā”€ā”€ app.tsx          # Main application component
└── main.tsx         # Application entry point

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Top categories

Loading Svelte Themes