create-sparkvite
Version:
A blazing fast, opinionated CLI to scaffold React + Vite + Tailwind CSS v4 projects with modern tooling and zero configuration.
216 lines (159 loc) โข 6.06 kB
Markdown
# โก create-sparkvite
[](https://www.npmjs.com/package/create-sparkvite)
[](./LICENSE)
[](https://nodejs.org/)
> ๐ A blazing fast, opinionated CLI to scaffold **React + Vite + Tailwind CSS v4** projects with modern tooling and zero configuration.
SparkVite CLI creates production-ready React applications with carefully selected tools and configurations, so you can focus on building instead of setup.
## โจ Features
- โก **Lightning Fast** โ Powered by Vite for instant dev server and HMR
- ๐จ **Modern Styling** โ Tailwind CSS v4 with latest features
- ๐งฉ **Component Library** โ Optional ShadCN UI integration
- ๐ฆ **Package Manager Choice** โ Support for npm, yarn, pnpm, and bun
- ๐ค **TypeScript Ready** โ Full TypeScript support out of the box
- ๐ง **State Management** โ Choose from Context API, Zustand, or Redux Toolkit
- ๐งช **Testing Setup** โ Vitest + Testing Library configuration
- ๐ **Code Quality** โ ESLint + Prettier with sensible defaults
- ๐ **Routing Ready** โ React Router v6 integration
- ๐ฑ **PWA Support** โ Optional Progressive Web App configuration
- ๐๏ธ **Smart Structure** โ Organized folder structure with path aliases
- ๐ก **Git Ready** โ Automatic Git initialization with first commit
## ๐ Quick Start
```bash
# Create a new SparkVite project
npx create-sparkvite@latest
# Follow the interactive prompts
# Navigate to your project
cd your-project-name
# Start developing
npm run dev
```
## ๐ ๏ธ Interactive Setup
SparkVite CLI guides you through an interactive setup process:
### ๐ฆ **Project Configuration**
- **Project Name** โ Your app name (validates npm package naming)
- **Package Manager** โ Choose between npm, yarn, pnpm, or bun
### ๐ฏ **Technology Stack**
- **Language** โ JavaScript or TypeScript
- **UI Library** โ None or ShadCN UI
- **State Management** โ None, Context API, Zustand, or Redux Toolkit
- **Routing** โ Optional React Router integration
- **PWA** โ Progressive Web App support
### ๐ง **Development Tools**
- **Testing** โ Vitest + React Testing Library setup
- **Code Quality** โ ESLint + Prettier configuration
- **Version Control** โ Git repository initialization
## ๐ Project Structure
SparkVite creates a well-organized project structure:
```
your-project/
โโ src/
โ โโ components/
โ โโ pages/
โ โโ layouts/
โ โโ hooks/
โ โโ utils/
โ โโ context/
โ โโ stores/
โ โโ App.tsx
โ โโ main.tsx
โ โโ index.css
โโ public/
โโ package.json
โโ vite.config.ts
โโ tailwind.config.js
โโ tsconfig.json
โโ README.md
```
## โ๏ธ Configuration Details
### ๐จ **Tailwind CSS v4**
- Latest Tailwind CSS v4 with Vite plugin
- Custom theme configuration ready
- Optimized for production builds
### ๐ **Path Aliases**
Pre-configured `@/` alias pointing to `src/`:
```typescript
import Button from '@/components/Button';
import { useAuth } from '@/hooks/useAuth';
```
### ๐งช **Testing Setup**
When enabled, includes:
- Vitest test runner
- React Testing Library
- Jest DOM matchers
- Sample test file
### ๐ **Code Quality**
ESLint + Prettier configuration with:
- React and React Hooks rules
- TypeScript support (when selected)
- Prettier integration
- Pre-configured scripts: `lint`, `lint:fix`, `format`
### ๐ฑ **PWA Configuration**
Optional PWA setup with:
- Vite PWA plugin
- Service worker generation
- Web app manifest
## ๐ Available Scripts
After project creation, you can run:
```bash
# Development
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
# Code Quality (if enabled)
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint issues
npm run format # Format code with Prettier
# Testing (if enabled)
npm run test # Run tests with Vitest
```
## ๐ง State Management Options
### **Context API**
- Built-in React Context setup
- App-level provider configuration
- Custom hook for consuming context
### **Zustand**
- Lightweight state management
- TypeScript-ready store setup
- Sample counter store included
### **Redux Toolkit**
- Modern Redux with RTK
- Pre-configured store setup
- Sample slice with TypeScript support
## ๐ง Requirements
- **Node.js** 18 or higher
- **npm**, **yarn**, **pnpm**, or **bun**
### Development Setup
```bash
git clone https://github.com/Abuhurera00/create-sparkvite
cd create-sparkvite
npm install
npm run dev
```
## ๐ Issues & Support
- ๐ **Bug Reports**: [GitHub Issues](https://github.com/Abuhurera00/create-sparkvite/issues)
- ๐ก **Feature Requests**: [GitHub Discussions](https://github.com/Abuhurera00/create-sparkvite/discussions)
- ๐ **Documentation**: [Wiki](https://github.com/Abuhurera00/create-sparkvite/wiki)
## ๐ License
This project is licensed under the **MIT License** - see the [LICENSE](./LICENSE) file for details.
## ๐ Acknowledgments
SparkVite CLI is built on top of these amazing projects:
- [Vite](https://vitejs.dev/) - Next generation frontend tooling
- [React](https://react.dev/) - A JavaScript library for building user interfaces
- [Tailwind CSS](https://tailwindcss.com/) - A utility-first CSS framework
- [ShadCN UI](https://ui.shadcn.com/) - Beautifully designed components
<div align="center">
**Made with โค๏ธ for the React community**
[โญ Star on GitHub](https://github.com/Abuhurera00/create-sparkvite) โข [๐ฆ View on NPM](https://www.npmjs.com/package/create-sparkvite)
</div>