β‘ The fastest way to create modern React applications with a complete, production-ready stack.
Create React Stack is a powerful CLI tool that generates modern React applications with Vite, TypeScript, Tailwind CSS, TanStack Query, and all the essential tools you need to build amazing web applications.
- π Lightning Fast: Powered by Vite for instant development and optimized builds
- π‘οΈ Type Safe: Full TypeScript support with strict type checking
- π¨ Beautiful UI: Tailwind CSS with custom design system and responsive components
- π‘ Smart Data Fetching: TanStack Query for efficient server state management
- π§ Code Quality: ESLint and Prettier configured with React and TypeScript best practices
- π Production Ready: GitHub Actions CI/CD, optimized builds, and deployment-ready configuration
- π± Responsive Design: Mobile-first approach with modern UI components
- π― Developer Experience: Hot reload, TypeScript IntelliSense, and comprehensive tooling
npx @ali_samir/create-react-stack my-app
cd my-app
npm run dev
That's it! Your React app is ready to go. π
# Create app with custom name
npx @ali_samir/create-react-stack my-awesome-app
# Skip dependency installation
npx @ali_samir/create-react-stack my-app --skip-install
# Get help
npx @ali_samir/create-react-stack --help
Your new React app comes with:
my-app/
βββ src/
β βββ components/ # Reusable React components
β β βββ Counter.tsx # Example counter component
β βββ services/ # API services and utilities (empty, ready for your code)
β βββ App.tsx # Main application component
β βββ main.tsx # Application entry point
β βββ index.css # Global styles with Tailwind
βββ .eslintrc.cjs # ESLint configuration
βββ .prettierrc # Prettier configuration
βββ .prettierignore # Prettier ignore file
βββ tailwind.config.js # Tailwind CSS configuration
βββ postcss.config.js # PostCSS configuration
βββ tsconfig.json # TypeScript configuration
βββ tsconfig.node.json # TypeScript config for Node.js
βββ vite.config.ts # Vite configuration
βββ index.html # HTML template
βββ package.json # Dependencies and scripts
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint errors
npm run format # Format code with Prettier
npm run format:check # Check code formatting
import { useState } from "react";
const Counter = () => {
const [count, setCount] = useState(0);
return (
<div className="card max-w-md mx-auto">
<h2 className="text-2xl font-semibold mb-4">Counter Example</h2>
<div className="text-6xl font-bold text-primary-600 mb-6">{count}</div>
<div className="space-x-4">
<button
onClick={() => setCount(count - 1)}
className="btn btn-secondary"
>
Decrease
</button>
<button onClick={() => setCount(count + 1)} className="btn btn-primary">
Increase
</button>
</div>
</div>
);
};
import { useQuery } from "@tanstack/react-query";
import axios from "axios";
const fetchRandomUser = async () => {
const response = await axios.get("https://randomuser.me/api/");
return response.data.results[0];
};
const UserProfile = () => {
const { data, isLoading, error } = useQuery({
queryKey: ["user"],
queryFn: fetchRandomUser,
});
if (isLoading) return <div className="text-center">Loading...</div>;
if (error)
return <div className="text-center text-red-500">Error loading user</div>;
return (
<div className="card">
<h3 className="text-xl font-semibold">
{data.name.first} {data.name.last}
</h3>
<p className="text-gray-600">{data.email}</p>
</div>
);
};
The project uses Tailwind CSS with a custom design system:
// Pre-configured utility classes
<button className="btn btn-primary">Primary Button</button>
<button className="btn btn-secondary">Secondary Button</button>
<div className="card">Card Content</div>
The project includes strict TypeScript configuration with path mapping:
// Use path mapping for cleaner imports
import { Button } from "@/components/Button";
import { api } from "@/services/api";
Pre-configured with React, TypeScript, and Tailwind rules:
npm run lint # Check for issues
npm run lint:fix # Auto-fix issues
Code formatting with Tailwind plugin:
npm run format # Format all files
npm run format:check # Check formatting
- Push your code to GitHub
- Connect your repository to Vercel
- Deploy with zero configuration
- Build your project:
npm run build
- Deploy the
dist
folder to Netlify
FROM node:18-alpine as builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
We welcome contributions! Please see our Contributing Guide for details.
# Clone the repository
git clone https://github.com/alisamirali/create-react-stack.git
cd create-react-stack
# Install dependencies
npm install
# Test the CLI locally
node bin/create-react-stack.js test-app --skip-install
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project helpful, please give it a star! β
- Vite - Next generation frontend tooling
- React - A JavaScript library for building user interfaces
- TypeScript - Typed JavaScript at any scale
- Tailwind CSS - A utility-first CSS framework
- TanStack Query - Powerful data synchronization for React
Made with β€οΈ by the community