A modern React-based e-commerce platform specializing in women's clothing and sarees, featuring a complete admin dashboard and customer shopping experience.
- Product Catalog - Browse and search through various categories of sarees and women's clothing
- Advanced Product Filtering - Filter by category, fabric, occasion, color, and price range
- Product Pagination - Optimized loading with pagination for better performance
- User Authentication - Secure login/register with Firebase Auth
- Shopping Cart - Add, remove, and manage products in cart with persistent storage
- Wishlist - Save favorite products for later
- Checkout System - Multi-step checkout with address management
- Country selection (US and India)
- Dynamic state dropdowns based on country
- Address validation with country-specific postal codes
- Payment Gateway - Integrated Razorpay payment processing
- Supports UPI, Cards, Net Banking, and Wallets
- Secure payment processing with test mode support
- Order Management - Place orders and track order history
- User Profile - Manage personal information and preferences
- Responsive Design - Optimized for desktop and mobile devices
- Image Optimization - Lazy loading and optimized image handling
- Dashboard - Overview of key business metrics and analytics
- Product Management - Add, edit, and manage product catalog with bulk upload
- Enhanced Product Uploader - Advanced product import with image handling
- Inventory Management - Track stock levels and inventory
- Order Management - Process and manage customer orders
- Customer Management - View and manage customer accounts
- Analytics & Reports - Sales analytics and financial reports
- Data Converter - Tools for data migration and format conversion
- Settings - Configure application settings and preferences
- Data Management - Product data converter and bulk upload tools
- Enhanced Product Uploader - Advanced product management with image upload
- Financial Reports - Comprehensive financial analytics and reporting
- Custom Hooks - Reusable React hooks for common functionality
- Utility Scripts - Build and deployment automation scripts
- Frontend Framework: React 18
- Routing: React Router DOM v6
- Styling: Tailwind CSS with custom components
- Icons: Lucide React
- Backend: Firebase (Firestore, Auth, Storage, Analytics)
- Payment Gateway: Razorpay
- Notifications: React Hot Toast
- Build Tool: Create React App
- Package Manager: npm
{
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.8.1",
"firebase": "^11.9.1",
"lucide-react": "^0.263.1",
"react-hot-toast": "^2.4.1"
}{
"tailwindcss": "^3.4.17",
"@tailwindcss/forms": "^0.5.10",
"@tailwindcss/aspect-ratio": "^0.4.2"
}- Node.js (v14 or higher)
- npm or yarn
- Firebase project setup
-
Clone the repository
git clone <repository-url> cd srija4her-frontend
-
Install dependencies
npm install
-
Environment Setup Create a
.envfile in the root directory with the following configuration:Firebase Configuration:
REACT_APP_FIREBASE_API_KEY=your_firebase_api_key REACT_APP_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com REACT_APP_FIREBASE_DATABASE_URL=https://your-project-default-rtdb.firebaseio.com REACT_APP_FIREBASE_PROJECT_ID=your-project-id REACT_APP_FIREBASE_STORAGE_BUCKET=your-project.appspot.com REACT_APP_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id REACT_APP_FIREBASE_APP_ID=your_app_id REACT_APP_FIREBASE_MEASUREMENT_ID=your_measurement_id
Razorpay Configuration:
REACT_APP_RAZORPAY_KEY_ID=rzp_test_xxxxxxxxxxxxx REACT_APP_RAZORPAY_KEY_SECRET=your_razorpay_key_secret
Note:
- Get Firebase config from Firebase Console
- Get Razorpay keys from Razorpay Dashboard
- Razorpay Key Secret should only be used on backend (not in frontend)
- After creating/updating
.env, restart the development server
-
Start the development server
npm start
Important: After creating or modifying the
.envfile, you must restart the development server for changes to take effect.
The application will open at http://localhost:3000
- Make sure
.envfile is in the root directory (same level aspackage.json) - Restart the development server after creating/modifying
.env - Check browser console for configuration logs
- Verify Razorpay keys are correctly set in
.env - Ensure keys start with
rzp_test_for test mode - Check browser console for Razorpay configuration status
- Restart server after adding Razorpay keys
- Verify all Firebase environment variables are set
- Check Firebase project settings in Firebase Console
- Ensure Firestore rules allow read/write access
- Check browser console for Firebase initialization logs
src/
├── components/
│ ├── admin/ # Admin dashboard components
│ │ ├── AdminPanel.js
│ │ ├── AnalyticsPage.js
│ │ ├── CustomersManagement.js
│ │ ├── DataConverter.js
│ │ ├── EnhancedProductUploader.js
│ │ ├── FinancialReports.js
│ │ ├── InventoryManagement.js
│ │ ├── OrderManagement.js
│ │ ├── ProductForm.js
│ │ ├── ProductManagement.js
│ │ ├── ProductUploader.js
│ │ └── SettingsPage.js
│ ├── auth/ # Authentication components
│ │ ├── Login.js
│ │ └── Register.js
│ ├── cart/ # Shopping cart components
│ │ ├── Cart.js
│ │ └── CartItem.js
│ ├── common/ # Shared components
│ │ ├── Header.js
│ │ ├── Footer.js
│ │ └── Loader.js
│ ├── products/ # Product-related components
│ │ ├── ProductCard.js
│ │ ├── ProductDetail.js
│ │ └── ProductList.js
│ └── user/ # User profile components
│ ├── OrderHistory.js
│ ├── UserProfile.js
│ └── Wishlist.js
├── context/ # React Context providers
│ ├── AuthContext.js
│ └── CartContext.js
├── hooks/ # Custom React hooks
├── pages/ # Main page components
│ ├── Admin.js
│ ├── Checkout.js
│ ├── Home.js
│ ├── ProductDetails.js
│ └── Products.js
├── scripts/ # Build and utility scripts
│ └── uploadProducts.js
├── services/ # API and external services
│ ├── api.js
│ ├── firebase.js
│ ├── payment.js
│ └── productsService.js
├── styles/ # Global styles
│ └── globals.css
├── utils/ # Utility functions and constants
│ ├── constants.js
│ └── helpers.js
├── App.css # Main app styles
├── App.js # Main application component
├── index.css # Global CSS
├── index.js # Application entry point
├── products.json # Product data
├── cors.json # CORS configuration
├── postcss.config.js # PostCSS configuration
└── tailwind.config.js # Tailwind CSS configuration
npm start- Runs the app in development modenpm test- Launches the test runnernpm run build- Builds the app for productionnpm run eject- Ejects from Create React App (irreversible)
node src/scripts/uploadProducts.js- Bulk upload products to Firebase
The application uses Firebase Authentication with role-based access:
- Customer Role: Access to shopping features, profile, and order history
- Admin Role: Access to admin dashboard and management features
The platform supports various product categories:
- Silk Sarees - Premium silk sarees
- Cotton Sarees - Comfortable cotton sarees
- Designer Sarees - Latest designer collections
- Wedding Collection - Special wedding sarees
- Casual Wear - Everyday casual sarees
- Party Wear - Party and festive sarees
- India - All states and union territories
- United States - All 50 states plus DC
- Country selection dropdown
- Dynamic state/province dropdowns based on country
- Country-specific postal code validation:
- India: 6-digit pincode
- US: 5-digit ZIP or 5+4 format
- Phone number validation based on country
- Separate billing and shipping addresses
The application is fully responsive and optimized for:
- Desktop computers
- Tablets
- Mobile devices
- Authentication State: Managed via React Context (AuthContext)
- Shopping Cart: Managed via React Context (CartContext)
- Component State: React hooks (useState, useEffect, useCallback, useMemo)
- Pagination: Loads 20 products per page (configurable)
- Smart Loading: Loads up to 100 products when no filters applied
- Caching: SessionStorage caching for faster subsequent loads
- Lazy Loading: Images load lazily for better initial page load
- Lazy loading for product images
- Image preloading for featured products
- Error handling with fallback placeholders
- Optimized image formats and sizes
- React.memo for ProductCard components
- useCallback and useMemo for expensive operations
- Debounced search and filter operations
- Optimized re-renders with proper dependency arrays
products.json- Sample product data for initial setupcors.json- CORS configuration for Firebasetailwind.config.js- Tailwind CSS customizationpostcss.config.js- PostCSS configuration for stylingsrc/scripts/uploadProducts.js- Utility for bulk product upload
- Tailwind CSS: Utility-first CSS framework
- Custom Components: Reusable UI components
- Responsive Design: Mobile-first approach
- Global Styles: Custom CSS in
styles/globals.css - Dark Mode Ready: Prepared for dark mode implementation
npm run buildThis creates a build folder with optimized production files.
- Firebase Hosting: Recommended for Firebase integration
- Netlify: Easy deployment with continuous integration
- Vercel: Great for React applications
- Traditional Web Hosting: Upload build folder contents
Update Firebase configuration in your environment variables or Firebase config file.
The application is integrated with Razorpay for secure payment processing.
- Multiple Payment Methods: UPI, Credit/Debit Cards, Net Banking, Wallets
- Test Mode Support: Configured for testing with test API keys
- Secure Processing: Payment data encrypted and secure
- Error Handling: Comprehensive error handling and user feedback
- Get your Razorpay API keys from Razorpay Dashboard
- Add keys to
.envfile:REACT_APP_RAZORPAY_KEY_ID=rzp_test_xxxxxxxxxxxxx REACT_APP_RAZORPAY_KEY_SECRET=your_key_secret
- Restart the development server
- Card Number:
4111 1111 1111 1111 - Expiry: Any future date (e.g.,
12/25) - CVV: Any 3 digits (e.g.,
123)
- Key ID (public key) is safe to use in frontend
- Key Secret should only be used on backend for payment verification
- All keys stored in
.envfile (not hardcoded)
The admin dashboard includes:
- Sales analytics
- Customer insights
- Product performance metrics
- Financial reporting
- Fork the repository
- Create a 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 private and proprietary. All rights reserved.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation
- Multi-language support
- Advanced search and filtering
- Product recommendations
- Loyalty program integration
- Mobile app development
- AI-powered size recommendations
Built with care for Srija4Her
