ViteReactStarter

vite-react-chakra-starter — Vite Starter Template

By agustinusnathaniel

A starter template based on Vite, React, TypeScript, and Chakra UI, integrating TanStack Router file-based routing, TanStack Query, Vitest, Biome, and other development tools for quickly initializing frontend projects.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

2 previews
Desktop homepage1 / 2
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 2

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-02View source

What stands out

A quick read of the recorded project description.

01

Build and type-checking configuration integrating Vite, React, and TypeScript

02

Uses TanStack Router file-based routing, automatically generating a type-safe route tree

03

Built-in Chakra UI component system and editable theme configuration

04

Includes TanStack Query for server state management

05

Provides Biome code checking and formatting, and Vitest unit test scripts

06

Comes with static deployment configurations for platforms such as Vercel, Netlify, and Cloudflare Pages

Template Details

This template targets scenarios that need to quickly set up a React frontend project, with the build tool, routing, component library, and development tools preconfigured. The build layer uses Vite (Rolldown experimental version), the language is TypeScript, the UI component library is Chakra UI, routing uses TanStack Router's file-based routing and automatically generates a type-safe routeTree.gen.ts, and server state management uses TanStack Query. Code quality and testing are handled by Biome and Vitest, and the package manager is specified as pnpm.

The template explicitly does not provide backend API integration patterns, authentication and authorization flows, a database or data persistence layer, complex state management beyond React Query, or a complete deployment pipeline; it only includes platform configuration files. The build output is TanStack Start's static prerendering result, output to dist/client, with unknown paths returning a static 404.html, so hosting platforms do not need to configure SPA rewrites. PWA capability is provided via vite-plugin-pwa but is disabled by default.

The repository structure places route definitions in src/routes/, page components in src/lib/pages/, base UI components in src/lib/components/ui/, and theme configuration in src/lib/styles/theme/, and configures the path alias @/* pointing to src/*. The Node.js and pnpm version requirements and dependency version numbers given in the README are the template's own declarations; in actual use, the repository's current dependency manifest should be taken as authoritative.

ViteReactStarter

Is it right for your project?

Use Cases

  • Need to quickly initialize a React frontend project with routing and a component library
  • Want to use file-based routing and automatically generate type definitions
  • Need a preconfigured code checking, formatting, and unit testing toolchain
  • Plan to deploy static build output to Vercel, Netlify, or Cloudflare Pages

Suitable For

  • Frontend developers familiar with React and TypeScript
  • Projects that need static prerendered output rather than server functions
  • Teams that want to use pnpm as the package manager
  • Projects that accept Chakra UI as the component library and are willing to extend the theme themselves

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    After pulling the template with degit, run pnpm install to install dependencies

  2. 2

    The development server runs at http://localhost:5173 by default

  3. 3

    The build command is pnpm build, and the output directory is dist/client

  4. 4

    PWA support is disabled by default in vite.config.ts; enable it manually when needed

  5. 5

    The Node.js and pnpm version requirements declared in the README should be checked against the repository's current dependency manifest

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in the public repository; the free scope is the code of that version and does not mean external services or third-party assets are free.

Must comply with when using

  • Free use, modification, commercial use, and distribution of that version's code are permitted.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the complete MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur separate charges.
View Original Text Basis

Compiled by DeepSeek based on repository license and README ·2026-10-02. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 96 / 100
Technologies
Vite · React
Website type
Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-09-28
Screenshot last checked
2026-10-02

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Vite as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Automatically checked against source and license rules; no manual editorial review.

Inspect the recorded source material

SHA-256: 0ab386cc25243b4e768d9486360cbe6dacd2a9cad34e79c0ecaf9df4ba4809ee

2026-10-02T13:57:46.330Z

Source file / repository
# Vite React Chakra Starter

<img src="https://og.sznm.dev/api/generate?heading=vite-react-chakra-starter&text=React+vite+template+with+Chakra-UI+and+TypeScript+setup.&template=color&center=true&height=330" />

A production-ready starter template for building React applications with Vite, TypeScript, Chakra UI v3, and TanStack Router. This template provides a modern development setup with file-based routing, state management, and comprehensive tooling.

[**Live Demo**](https://vite-react-chakra-starter.sznm.dev/)

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/git?s=https://github.com/agustinusnathaniel/vite-react-chakra-starter) [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/agustinusnathaniel/vite-react-chakra-starter)

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/agustinusnathaniel/vite-react-chakra-starter)

## Purpose and Scope

This template solves the problem of quickly bootstrapping a new React application with:
- Modern build tooling (Vite with Rolldown)
- Type-safe routing (TanStack Router)
- Component library (Chakra UI v3)
- Development tooling (Biome, Vitest, TypeScript)
- PWA capabilities (optional, disabled by default)

**What this template does not provide:**
- Backend API integration patterns
- Authentication/authorization flows
- Database or data persistence layer
- Complex state management (beyond React Query)
- Deployment pipelines (only configuration files)

## Tech Stack

| Category | Technology | Version | Purpose |
|----------|-----------|---------|---------|
| Build Tool | Vite (Rolldown) | 7.1.20 | Fast dev server and optimized builds |
| Framework | React | 19.2.0 | UI library |
| Language | TypeScript | 5.9.3 | Type safety |
| Routing | TanStack Router | 1.139.12 | File-based routing with type safety |
| UI Library | Chakra UI | 3.30.0 | Component system |
| State Management | TanStack Query | 5.90.11 | Server state management |
| Testing | Vitest | 4.0.14 | Unit and integration testing |
| Linting/Formatting | Biome | 2.3.2 | Code quality and formatting |
| Package Manager | pnpm | 10.24.0 | Fast, disk-efficient package management |

## Architecture Overview

```mermaid
graph TB
    subgraph "Entry Point"
        A[src/router.tsx - getRouter] --> B[Start Client Hydration]
    end
    
    subgraph "Document Shell - __root.tsx"
        B --> C[html / head / body]
        C --> D[HeadContent - meta and links]
        C --> E[Provider - Chakra UI Theme]
        E --> F[QueryClientProvider]
    end
    
    subgraph "Routing Layer"
        F --> G[Outlet - Route Content]
        G --> H[Route Tree - Auto-generated]
        H --> I[Page Components]
    end
    
    subgraph "Component Architecture"
        E --> J[Layout Component]
        J --> K[Header]
        J --> L[Footer]
        J --> M[Page Content]
        M --> N[UI Components]
        N --> O[Chakra UI Primitives]
    end
    
    subgraph "Supporting Systems"
        P[Theme System] --> E
        Q[Color Mode Provider] --> E
        R[Query Client] --> F
        S[Route Generation] --> H
    end
    
    style A fill:#e1f5ff
    style B fill:#e1f5ff
    style C fill:#fff4e1
    style J fill:#fff4e1
    style P fill:#e8f5e9
    style Q fill:#e8f5e9
```

## Repository Structure

```
vite-react-chakra-starter/
├── src/
│   ├── router.tsx                 # Application entry point (createRouter/getRouter)
│   ├── routes/                    # TanStack Router route definitions
│   │   ├── __root.tsx             # Document shell (html/head/body) with meta tags
│   │   └── index.tsx              # Home page route
│   ├── routeTree.gen.ts           # Auto-generated route tree (DO NOT EDIT)
│   └── lib/                       # Application code
│       ├── components/            # Reusable UI components
│       │   └── ui/                # Base UI components (button, color-mode, provider)
│       ├── layout/                # Layout components
│       │   ├── index.tsx          # Main layout wrapper
│       │   └── components/        # Header, Footer
│       ├── pages/               # Page-level components
│       │   ├── home/            # Home page and its components
│       │   └── 404/             # 404 error page
│       ├── services/            # Services and shared constants
│       │   └── constants.ts     # Query client instance
│       ├── styles/              # Theme configuration
│       │   └── theme/           # Chakra UI theme setup
│       └── utils/               # Utility functions
│           ├── sample.ts        # Example utility
│           └── sample.test.ts   # Example test
├── public/                      # Static assets
├── vite.config.ts               # Vite configuration
├── vitest.config.ts             # Test configuration
├── tsconfig.json                # TypeScript configuration
├── biome.json                   # Linting and formatting rules
└── package.json                 # Dependencies and scripts
```

## Getting Started

### Prerequisites

- Node.js ^24.11.x
- pnpm 10.24.0

### Installation

```bash
# Clone or use template
npx degit agustinusnathaniel/vite-react-chakra-starter <app_name>
cd <app_name>

# Install dependencies
pnpm install

# Start development server
pnpm dev
```

The development server runs on `http://localhost:5173` (Vite's default).

## Development Workflows

### Running the Application

```bash
# Development server with hot reload
pnpm dev

# Production build preview
pnpm build
pnpm serve
```

### Code Quality

```bash
# Check code style and linting
pnpm biome:check

# Auto-fix issues
pnpm biome:fix

# Type checking
pnpm type:check

# Run all checks (lint, type, test)
pnpm check:turbo
```

### Testing

```bash
# Run tests once
pnpm test

# Run tests with UI
pnpm test:ui

# Run tests with coverage
pnpm test:coverage
```

### Building

```bash
# Production build
pnpm build

# Output directory: dist/client
```

## Key Dependencies and Their Roles

### Core Framework

- **@tanstack/react-router**: File-based routing with type safety. Routes are defined in `src/routes/` and automatically generate a type-safe route tree.
- **@tanstack/react-query**: Server state management. Configured in `src/lib/services/constants.ts`.
- **@chakra-ui/react**: Component library with design tokens. Theme configured in `src/lib/styles/theme/`.

### Development Tools

- **@tanstack/react-start**: React framework with file-based routing, a document shell, and static prerendering. Its Vite plugin (`@tanstack/react-start/plugin/vite`) generates the route tree and prerenders routes to `dist/client`.
- **@tanstack/devtools-vite**: Development tools for debugging Router and Query.
- **vite-plugin-checker**: TypeScript type checking during development (disabled in production).
- **vite-tsconfig-paths**: Enables TypeScript path aliases (`@/*`) in Vite.

### Build Configuration

- **rolldown-vite**: Experimental Vite build using Rolldown (Rust-based bundler) for faster builds.
- **vite-plugin-pwa**: PWA support (currently disabled, see `vite.config.ts`).

## Configuration Files

| File | Purpose |
|------|---------|
| `vite.config.ts` | Vite build configuration, plugins, dev server settings |
| `vitest.config.ts` | Test runner configuration, coverage settings |
| `tsconfig.json` | TypeScript compiler options, path aliases |
| `biome.json` | Linting rules, formatting preferences, file patterns |
| `commitlint.config.ts` | Commit message conventions (Conventional Commits) |
| `turbo.json` | Task dependencies and caching for CI/CD |

## Path Aliases

The project uses TypeScript path aliases configured in `tsconfig.json`:

- `@/*` → `src/*`

Example: `import { Button } from '@/lib/components/ui/button'`

## Deployment

### Build Output

- **Command**: `pnpm build`
- **Output Directory**: `dist/client`

The build is a fully static TanStack Start prerender (no server functions). Hosts serve files directly from `dist/client`; unknown paths return the static `404.html`, so no SPA rewrites are required.

### Platform-Specific Configuration

- **Vercel**: `vercel.json` - static output to `dist/client` with security headers
- **Netlify**: `netlify.toml` - static output to `dist/client` with security headers
- **Cloudflare Pages**: `wrangler.toml` - static output to `dist/client`
- **Nixpacks**: `nixpacks.toml` - Container build configuration

See platform-specific documentation:
- [Vercel Static Deployments](https://vercel.com/docs/static-deployments)
- [Netlify Deploys](https://docs.netlify.com/site-deploys/overview/)
- [Cloudflare Pages](https://developers.cloudflare.com/pages/)

## Common Development Tasks

### Adding a New Route

1. Create a file in `src/routes/` (e.g., `src/routes/about.tsx`)
2. Use `createFileRoute` to define the route
3. The route tree is auto-generated on save

```tsx
import { createFileRoute } from '@tanstack/react-router';

export const Route = createFileRoute('/about')({
  component: About,
});
```

### Adding a New Page Component

1. Create a directory in `src/lib/pages/`
2. Create `index.tsx` with the page component
3. Import and use in route file

### Adding a New UI Component

1. Create component in `src/lib/components/ui/` or appropriate subdirectory
2. Follow existing patterns (forwardRef for DOM components, proper TypeScript types)
3. Export from component file

### Modifying Theme

Edit `src/lib/styles/theme/index.ts` to customize Chakra UI tokens, colors, and design system values.

## References

- [Vite Documentation](https://vitejs.dev)
- [Chakra UI Documentation](https://chakra-ui.com/)
- [TanStack Router Documentation](https://tanstack.com/router)
- [TanStack Query Documentation](https://tanstack.com/query)
- [TypeScript Documentation](https://www.typescriptlang.org)
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.

react-starter-kit

react-starter-kit

A full-stack SaaS monorepo starter built on Vite and React, with Bun, TypeScript, tRPC, Drizzle ORM, Better Auth, Stripe, and Cloudflare Workers. It includes email OTP, passkey, Google OAuth, organizations, subscription billing, Drizzle migrations, seed scripts, and Terraform infrastructure.

Vite · SaaS

cove

cove

Cove is a minimal TanStack Start starter template maintained by mugnavo, integrating React, TanStack Router/Query, Tailwind CSS, shadcn/ui, Drizzle ORM with PostgreSQL, Better Auth, Vite Plus, and Nitro.

Vite · SaaS

vite-react-boilerplate

vite-react-boilerplate

A production-ready Vite + React starter template with TypeScript, Tailwind CSS, TanStack Router/Query/Table, Storybook, React Hook Form + Zod, Vitest and Playwright testing, plus Husky/Commitizen/Commitlint commit conventions.

Vite · Starter

react-vite-admin

react-vite-admin

A backend management starter built on Vite and React, integrating Recoil, React Query, TypeScript, and Axios, with Ant Design-style interface screenshots. Suitable as a starting point for management-side projects, licensed under MIT, with Chinese documentation and common scripts.

Vite · Admin dashboard

typescript-react_best_practices-vite_template

typescript-react_best_practices-vite_template

A Vite + React + TypeScript starter template by CodelyTV, preconfigured with Jest and React Testing Library unit tests, Cypress end-to-end tests, ESLint and Prettier using Codely's shared configuration, GitHub Actions workflows, a Makefile, and Sass.

Vite · Starter

cloudflare-starter-kit

cloudflare-starter-kit

A Cloudflare Workers project scaffolding template maintained by kriasoft, using Vite and TypeScript, with three built-in workspaces: api, app, and edge, and preconfigured local testing, multiple environments, and a GitHub Actions deployment workflow.

Vite · Starter