Skip to content

bdipesh/react_starter

Repository files navigation

πŸš€ React Starter Kit

A production-ready React starter template with modern tooling and best practices baked in. Clone, configure, and start building your next amazing project in minutes! Added a beautifully crafted common component with Zod validation.

✨ Features

  • ⚑️ Lightning Fast - Powered by Vite for instant HMR and optimized builds
  • 🎯 TypeScript Ready - Full TypeScript support with type checking
  • 🎨 Modern React - React 18+ with hooks and latest features
  • πŸ“ ESLint Configured - Comprehensive linting rules pre-configured
  • πŸ”§ Developer Experience - Fast Refresh, clear error overlays, and optimized workflows
  • πŸ“¦ Production Optimized - Minification, code splitting, and tree shaking out of the box
  • πŸ—οΈ Best Practices - Structured project layout following industry standards
  • πŸ”Œ Extensible - Easy to add routing, state management, and styling libraries

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v18 or higher) - Download here
  • npm (v9+) or yarn (v1.22+) or pnpm (v8+)

πŸš€ Quick Start

Get up and running in 3 simple steps:

1️⃣ Clone the Repository

git clone https://github.com/bdipesh/react_starter.git
cd react_starter

2️⃣ Install Dependencies

npm install
# or
yarn install
# or
pnpm install

3️⃣ Start Development Server

npm run dev
# or
yarn dev
# or
pnpm dev

πŸŽ‰ Open http://localhost:5173 in your browser to see your app!

πŸ“œ Available Scripts

Command Description
npm run dev Starts the development server with hot reload
npm run build Creates an optimized production build
npm run preview Preview the production build locally
npm run lint Run ESLint to check code quality

πŸ“ Project Structure

react_starter/
β”œβ”€β”€ public/              # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/          # Images, fonts, and other assets
β”‚   β”œβ”€β”€ components/      # Reusable React components
β”‚   β”œβ”€β”€ App.tsx          # Main App component
β”‚   β”œβ”€β”€ main.tsx         # Application entry point
β”‚   └── index.css        # Global styles
β”œβ”€β”€ ..eslintrc.cjs        # ESLint configuration
β”œβ”€β”€ tsconfig.json        # TypeScript configuration
β”œβ”€β”€ vite.config.ts       # Vite configuration
└── package.json         # Project dependencies and scripts

πŸ”§ Configuration

TypeScript

The project uses TypeScript with strict mode enabled for better type safety. Configuration can be adjusted in:

  • tsconfig.json - App TypeScript config
  • tsconfig.node.json - Node/Vite TypeScript config

ESLint

ESLint is pre-configured with React-specific rules. Customize rules in ..eslintrc.cjs to match your team's coding standards.

Vite

Vite configuration can be modified in vite.config.ts. The starter includes:

  • React plugin with Fast Refresh
  • Optimized development experience
  • Production build optimizations

🎨 Adding Popular Libraries

React Router (Navigation)

npm install react-router-dom

State Management Options

Zustand (Lightweight):

npm install zustand

Styling Solutions

Tailwind CSS:

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

API & Data Fetching

React Query:

npm install @tanstack/react-query

Axios:

npm install axios

πŸ—οΈ Building for Production

Create an optimized production build:

npm run build

The build artifacts will be stored in the dist/ directory. These files are:

  • βœ… Minified and optimized
  • βœ… Code-split for better performance
  • βœ… Ready to deploy to any static hosting service

Preview Production Build

npm run preview

🚒 Deployment

This starter can be deployed to various platforms:

Vercel

Deploy with Vercel

Netlify

Deploy to Netlify

Other Platforms

  • GitHub Pages - Use gh-pages package
  • AWS Amplify - Connect your repository
  • Firebase Hosting - Use Firebase CLI
  • Cloudflare Pages - Push to Git and deploy

🀝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ Best Practices Included

  • βœ… Component-based architecture for reusability
  • βœ… TypeScript for type safety and better DX
  • βœ… ESLint for consistent code quality
  • βœ… Fast Refresh for instant feedback during development
  • βœ… Optimized builds with automatic code splitting
  • βœ… Modern ES6+ syntax support

🎯 What's Next?

After setting up your project, consider:

  1. AlreadyConfig - Configuration of UI, fetch, and state management. You can focus on your app idea. All things are set here.
  2. Testing - Add Jest and React Testing Library
  3. CI/CD - Configure GitHub Actions for automated deployments

πŸ“š Resources

πŸ‘¨β€πŸ’» Author

Dipesh B

🌟 Show Your Support

Give a ⭐️ if this project helped you! It helps others discover this starter template.


Happy Coding! πŸš€
Built with ❀️ by developers, for developers

About

A simple react starter project with all initial configuration and Beautifully crafted common components using tailwind css

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors