Production-oriented starter for React apps: Vite, TypeScript, Tailwind CSS, and shadcn/ui (Radix primitives). Use it as a base for SPAs with routing, forms, server-state helpers, and an accessible component kit already wired up.
| Area | Tools |
|---|---|
| Core | React 19, TypeScript, Vite 6 |
| UI | Tailwind CSS, shadcn/ui, Radix UI, Lucide icons |
| Routing | React Router |
| Data & forms | TanStack Query, React Hook Form, Zod |
| DX | ESLint 9 (flat config), PostCSS, SWC (via @vitejs/plugin-react-swc) |
- Node.js 20+ (see
.nvmrc) - npm, pnpm, yarn, or bun
git clone https://github.com/Psybah/react-vite-starter-template.git
cd react-vite-starter-template
npm install
npm run devThe dev server runs at http://localhost:5173 (Vite default).
| Command | Description |
|---|---|
npm run dev |
Start dev server (port 5173) |
npm run build |
Typecheck, then production build to dist/ |
npm run preview |
Serve the production build locally (port 4173) |
npm run lint |
Run ESLint |
npm run typecheck |
Run TypeScript without emitting |
src/
├── components/ui/ # shadcn/ui components
├── hooks/ # Shared hooks
├── lib/ # Utilities (e.g. cn())
├── pages/ # Route-level views
├── App.tsx # Providers, router, layout shell
├── main.tsx # Entry
└── index.css # Tailwind + design tokens
Path alias: @/* → src/* (configured in tsconfig and vite.config.ts).
This repo is set up for shadcn/ui. Add components with the CLI (config in components.json):
npx shadcn@latest add button- Vite —
vite.config.ts(dev port5173, preview4173,@alias) - Tailwind —
tailwind.config.ts, tokens insrc/index.css - TypeScript — project references in
tsconfig.json, app sources intsconfig.app.json - ESLint — flat config in
eslint.config.js
Build static assets:
npm run buildOutput is in dist/. This project includes a vercel.json SPA fallback for client-side routing on Vercel; adapt as needed for Netlify, Cloudflare Pages, etc.
MIT — use freely; add your own license file if you publish the template.