React SPA Starter
A modern React SPA template with React Router v7, shadcn/ui, TypeScript, TanStack Query, and pre-built dashboard layouts for rapid development.
๐ Live Demo
Check out the live demo: https://react-spa-starter.vercel.app/
โจ Features
- React 19 - Latest React version with modern features
- React Router v7 - File-based routing with nested layouts
- TypeScript - Full type safety and better developer experience
- TanStack Query - Powerful data fetching and state management
- shadcn/ui - Beautiful and accessible UI components
- Tailwind CSS v4 - Modern utility-first CSS framework
- Vite - Fast build tool and development server
๐๏ธ Pre-built Components
- Sidebar Navigation - Collapsible sidebar with nested menus
- Authentication Layout - Ready-to-use login/auth structure
- Dashboard Layout - Professional dashboard with breadcrumbs
- Dark Mode - Built-in theme switching support
- Responsive Design - Mobile-first responsive layouts
๐ Quick Start
-
Clone or use this template
git clone [your-repo-url] cd react-spa-starter -
Install dependencies
npm install
-
Start development server
npm run dev
-
Open your browser
http://localhost:5173
๐ Project Structure
src/
โโโ components/ # Reusable UI components
โ โโโ app-sidebar/ # Sidebar navigation components
โ โโโ ui/ # shadcn/ui components
โโโ hooks/ # Custom React hooks
โโโ lib/ # Utility functions and configs
โโโ routes/ # Route components and layouts
โโโ styles/ # Global styles and CSS
๐ง Available Scripts
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
๐จ Customization
This template is designed to be easily customizable:
- Update branding - Change colors, logos, and titles
- Add routes - Create new pages in the
routes/directory - Modify sidebar - Edit navigation in
components/app-sidebar/ - Extend components - Add more shadcn/ui components as needed
๐ Tech Stack
- React - UI library
- React Router - Routing
- TypeScript - Type safety
- TanStack Query - Data fetching
- shadcn/ui - UI components
- Tailwind CSS - Styling
- Vite - Build tool
๐ License
This template is open source and available under the MIT License.
Ready to build something amazing? Start coding! ๐
On this page
Contributors
Created August 25, 2025
Updated August 25, 2025