A comprehensive enterprise-ready React template built with Vite, featuring advanced data handling, authentication, payment processing, and more.
-
Data Grid Systems
- Server-side filtering/sorting with AG Grid and Ant Design
- Advanced filtering (text, number, date)
- Pagination and infinite scrolling
- Debounced search
-
CRUD Operations
- Complete product management
- Modal-based forms
- Server-side validation
-
File Operations
- CSV import/export
- Drag-and-drop file upload
- File validation
-
Authentication & Authorization
- Login system
- Role-based access control
- Permission management
-
Payment Integration
- Stripe payment processing
- Saved cards support
- 3D Secure integration
-
Documentation
- Comprehensive Storybook docs
- API documentation
- Usage examples
- React 18
- Vite
- Redux Toolkit
- Ant Design
- AG Grid Enterprise
- Stripe
- Storybook
- SASS/SCSS
- ESLint & Prettier
- Husky
Before setting up the project, ensure you have the following installed:
-
Node.js (v18 or higher)
# Check Node.js version node --version # If needed, install Node.js from https://nodejs.org/
-
Yarn (v4.3.0)
# Install Yarn npm install -g yarn # Set Yarn version yarn set version 4.3.0
-
Git
# Check Git version git --version # If needed, install Git from https://git-scm.com/downloads
-
Clone the Repository
git clone https://usama_codedistrict@bitbucket.org/codedistrict/react-vite-template.git cd react-vite-template
-
Install Dependencies
yarn install # OR pnpm install
-
Environment Setup
# Copy example env file cp .env.example .env # Update environment variables in .env file
-
Start Development Server
yarn dev # OR pnpm dev
The development server will start at
http://localhost:8000
-
Development
yarn dev # Start development server
-
Production Build
yarn build # Build for production yarn build:qa # Build for QA environment yarn build:uat # Build for UAT environment
-
Code Quality
yarn lint # Run ESLint yarn prettify # Run Prettier
-
Documentation
yarn storybook # Start Storybook documentation
For environment-specific configurations, create the following files:
.env.development
- Development environment.env.qa
- QA environment.env.uat
- UAT environment.env.production
- Production environment
-
Build the Application
yarn build
This will generate optimized production files in the
dist
folder. -
Preview Production Build
yarn preview
-
Build Docker Image
docker build -t react-vite-template .
-
Run Docker Container
docker run -p 8000:8000 react-vite-template
- View component documentation by running Storybook:
Access Storybook at
yarn storybook
http://localhost:6006
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Vite Documentation
- React Documentation
- Ant Design Documentation
- AG Grid Documentation
- Stripe Documentation
This project is licensed under the MIT License - see the LICENSE file for details.