A modern and minimal boilerplate for React projects using TypeScript, Vite, Antd Design, and other essential tools for a productive development experience.
- ⚡️ Vite - Lightning fast build tool
- ⚛️ React 19 - The library for web UIs
- 📝 TypeScript - JavaScript with syntax for types
- 🔷 Ant Design - A comprehensive React UI library
- 🎨 Styled Components - CSS-in-JS styling solution
- 📚 Storybook - UI component development environment
- 🔍 ESLint - Code linting
- 💅 Prettier - Code formatting
- 🐶 Husky - Git hooks made easy
- 📋 Commitlint - Lint commit messages
- 🧭 TanStack Router - Type-safe routing for React
- 🌐 i18next - Internationalization framework for language switching and localization
- 🗃️ Zustand - Simple and fast state management
-
Clone this repository:
-
Install dependencies:
npm install
- Start development server:
npm run dev
npm run dev
- Start development servernpm run build
- Build for production (runs TypeScript compiler and Vite build)npm run preview
- Preview production buildnpm run prepare
- Setup Husky git hooksnpm run lint
- Run ESLintnpm run lint:fix
- Fix ESLint errorsnpm run format
- Format code with Prettiernpm run format:check
- Check code formattingnpm run storybook
- Start Storybook server (port 6006)npm run build-storybook
- Build Storybook
This boilerplate follows Conventional Commits:
feat
: New featurefix
: Bug fix- docs: Documentation changes
style
: Code style changes (formatting, etc.)refactor
: Code refactoringperf
: Performance improvementstest
: Adding or updating testschore
: Maintenance tasksci
: CI/CD changes
Collecting workspace informationI'll help update the project structure section in your README.md to reflect your actual workspace structure. Here's the updated version:
.
├── .env.example # Example environment variables
├── .husky/ # Git hooks configuration
├── .storybook/ # Storybook configuration
├── docs/ # Project documentation
├── public/ # Public static files
├── src/
│ ├── assets/ # Static assets (images, locales)
│ ├── lib/ # Common utilities and configurations
│ │ ├── hooks/ # Custom React hooks
│ │ ├── types/ # TypeScript types and interfaces
│ │ └── utils/ # Utility functions
│ ├── components/ # Reusable UI components
│ │ └── ui/ # Common UI components
│ ├── features/ # Feature-specific modules
│ ├── pages/ # Page components
│ ├── routes/ # Router configuration
│ ├── store/ # Global state management
│ ├── stories/ # Storybook stories
│ ├── styles/ # Global styles
└── ... configuration files
Key directories:
assets/
: Contains static files like images and localization fileslib/
: Shared utilities, helpers, and configurationsutils/
: Utility functions and helperstypes/
: Shared TypeScript types and interfaceshooks/
: Custom React hooks
components/
: Reusable UI components organized by featurefeatures/
: Feature-specific code organized in modulespages/
: Top-level page componentsroutes/
: TanStack Router configuration and route definitionsstore/
: Global state management using Zustand
This structure better reflects your actual project organization and includes the additional directories like features
, hooks
, pages
, and store
that are present in your workspace.
MIT License