# React TypeScript Base Project
A modern React application starter template with TypeScript, Webpack, ESLint, and Prettier.
## 🚀 Features
- ⚡️ React 18
- 📦 TypeScript 5
- 🛠️ Webpack 5
- 🧹 ESLint + Prettier
- 📚 Storybook
- 🔄 Hot Module Replacement
- 🎯 Code Splitting
- 📝 TypeScript Support
- 🎨 Modular CSS Support
- 📱 Production-ready build optimization
## 📦 Installation
```bash
# Clone the repository
git clone <repository-url>
# Navigate to project directory
cd react-base
# Install dependencies
npm install
# Start development server
npm run start
# Run type checking
npm run type-check
# Lint files
npm run lint
# Fix lint issues
npm run lint:fix
# Format code
npm run format
# Build for production
npm run build
# Analyze bundle
npm run build:analyze
react-base/
├── src/ # Source files
│ ├── components/ # Shared components
│ ├── pages/ # Page components
│ ├── utils/ # Utility functions
│ ├── hooks/ # Custom React hooks
│ ├── assets/ # Static assets
│ ├── App.tsx # Root component
│ └── index.tsx # Application entry point
├── public/ # Public static files
├── dist/ # Production build
├── .storybook/ # Storybook configuration
├── scripts/ # Build/setup scripts
├── webpack/ # Webpack configuration
└── tests/ # Test files
# Check outdated dependencies
npm run update:check
# Update all dependencies
npm run update
# Check versions
npm run version-check
# Clean install
npm run clean:install
eslint.config.mjs
- ESLint configurationtsconfig.json
- TypeScript configurationwebpack.common.js
- Shared webpack configurationwebpack.dev.js
- Development webpack configurationwebpack.prod.js
- Production webpack configuration.prettierrc
- Prettier configuration
# Run Storybook development server
npm run storybook
# Build Storybook
npm run build-storybook
start
: Start development serverbuild
: Build for productionbuild:analyze
: Analyze production bundletype-check
: Run TypeScript type checkinglint
: Run ESLintlint:fix
: Fix ESLint issuesformat
: Format code with Prettierstorybook
: Start Storybook development serverbuild-storybook
: Build Storybookupdate
: Update dependenciesversion-check
: Check tool versionsclean
: Clean build filesclean:install
: Clean and reinstall dependencies
- Use TypeScript for type safety
- Follow ESLint rules for consistent code
- Write stories for components using Storybook
- Split code into small, reusable components
- Use React hooks for state management
- Follow semantic versioning
- Keep dependencies updated
- Write meaningful commit messages
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverage
The production build will be created in the dist
directory. To create a production build:
npm run build
To analyze the bundle size:
npm run build:analyze
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE
file for details.
- React
- TypeScript
- Webpack
- ESLint
- Prettier
- Storybook
Shanker Dhand - shankerdhand@gmail.com