A comprehensive frontend-only React.js e-commerce application for "Balaji Threads Shop" featuring modern UI, complete state management, and extensive functionality for both customers and administrators.
- Homepage: Hero carousel, featured products, category browsing
- Product Catalog: Advanced search, filtering, sorting, pagination
- Product Details: Image zoom, variants, reviews, related products
- Shopping Cart: Quantity management, save for later, estimated delivery
- Wishlist: Save favorite products, move to cart
- Checkout: Guest/user checkout, address management, payment simulation
- Order History: Track orders, reorder functionality
- User Profile: Account management, address book
- Product Comparison: Side-by-side comparison (up to 4 products)
- Recently Viewed: Track browsing history
- Multi-language: English and Hindi support
- Dark/Light Mode: Theme switching with persistence
- Responsive Design: Mobile-first approach
- Dashboard: Sales metrics, inventory alerts, analytics
- Product Management: CRUD operations, bulk import/export
- Order Management: Status updates, order tracking
- User Management: User roles, account management
- Inventory Management: Stock tracking, low stock alerts
- Promo Code Management: Discount code creation and management
- Analytics: Sales trends, popular products, user activity
- Audit Logging: Track all admin actions
- Notifications: Real-time alerts for orders and inventory
- Framework: React 18 with Hooks
- Routing: React Router DOM v6
- State Management: Context API with useReducer
- Styling: Tailwind CSS with custom theme
- UI Components: Headless UI for accessible components
- Icons: Heroicons
- Internationalization: i18next
- Charts: Chart.js for analytics
- Data Export: XLSX for CSV/Excel export
- Build Tool: Create React App
- Data Persistence: localStorage (simulating backend)
- Primary: Deep Blue (#1e40af) - Representing trust and reliability
- Secondary: Gold (#f59e0b) - Indian textile luxury accent
- Background: White/Dark Gray - Clean, modern appearance
- Textile Colors: Saffron, Maroon, Emerald, Royal Blue
- Primary: System fonts for optimal performance
- Hindi Support: Noto Sans Devanagari for Hindi text
- Responsive: Fluid typography scaling
- Node.js 16+ and npm/yarn
- Modern web browser with JavaScript enabled
- Clone the repository
git clone <repository-url>
cd balaji-threads-shop- Install dependencies
npm install
# or
yarn install- Start the development server
npm start
# or
yarn start- Open your browser
Navigate to
http://localhost:3000
npm run build
# or
yarn buildThe build folder will contain optimized production files ready for deployment.
src/
โโโ components/ # Reusable UI components
โ โโโ common/ # Shared components (ProductCard, etc.)
โ โโโ layout/ # Layout components (Header, Footer)
โโโ contexts/ # React Context providers
โ โโโ AppContext.js # Main application state
โโโ pages/ # Page components
โ โโโ auth/ # Authentication pages
โ โโโ admin/ # Admin panel pages
โ โโโ [other-pages] # Public pages
โโโ i18n/ # Internationalization
โ โโโ index.js # Language configuration
โโโ App.js # Main app component with routing
โโโ index.js # Application entry point
Admin Access:
- Username:
admin - Password:
admin - Access:
/admin/login
User Registration:
- Open registration available
- Demo accounts can be created
The application stores all data in localStorage with the key balajiThreadsData:
{
products: [], // Product catalog
users: [], // User accounts
cart: [], // Shopping cart items
wishlist: [], // Wishlist items
orders: [], // Order history
reviews: [], // Product reviews
notifications: [], // System notifications
auditLog: [], // Admin action log
promoCodes: [], // Discount codes
// ... other data
}- Backup: Download all data as JSON
- Restore: Upload JSON file to restore data
- CSV Export: Export orders and products as CSV
- Bulk Import: JSON-based product import
The application supports English and Hindi:
- Language Toggle: Available in header
- Persistent: Language preference saved to localStorage
- RTL Support: Prepared for future RTL language support
- Currency: Indian Rupee (โน) formatting
- Mobile: < 640px
- Tablet: 640px - 1024px
- Desktop: > 1024px
- Mobile-first design approach
- Touch-friendly interface
- Optimized images and performance
- Accessible navigation patterns
- ARIA Labels: Comprehensive screen reader support
- Keyboard Navigation: Full keyboard accessibility
- Focus Management: Proper focus indicators
- Color Contrast: WCAG 2.1 AA compliance
- Semantic HTML: Proper heading hierarchy
- Alt Text: Image descriptions for screen readers
- Connect your GitHub repository to Vercel
- Configure build settings:
- Build Command:
npm run build - Output Directory:
build
- Build Command:
- Deploy automatically on push
- Connect repository to Netlify
- Build settings:
- Build command:
npm run build - Publish directory:
build
- Build command:
The built application is a static site compatible with:
- GitHub Pages
- AWS S3 + CloudFront
- Firebase Hosting
- Surge.sh
- Homepage loads with featured products
- Navigation works across all pages
- Product search and filtering
- Cart operations (add, remove, update)
- Wishlist functionality
- Theme switching (light/dark)
- Language switching (English/Hindi)
- Responsive design on mobile
- Admin panel access and operations
- Data persistence across sessions
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Code Splitting: Dynamic imports for route-based splitting
- Image Optimization: Lazy loading and responsive images
- Memoization: React.memo for component optimization
- Bundle Analysis: Optimized dependencies
- Caching: localStorage for data persistence
- Lighthouse Score: 90+ (Performance, Accessibility, SEO)
- First Contentful Paint: < 2s
- Largest Contentful Paint: < 3s
- No Real Backend: All data is stored in localStorage
- No Real Payments: Payment processing is simulated
- No Email: Email notifications are mocked
- Single Device: Data not synced across devices
- Storage Limits: localStorage has size limitations
- Real backend integration (Node.js/Express)
- Payment gateway integration (Stripe/Razorpay)
- Email notification system
- Advanced search with Elasticsearch
- Progressive Web App (PWA) features
- Real-time notifications with WebSocket
- Advanced analytics dashboard
- Multi-vendor marketplace support
For questions, issues, or contributions:
- Issues: Create a GitHub issue
- Documentation: Check this README
- Demo: Visit the live demo at [deployment-url]
This project is created for educational and demonstration purposes.
Important: This is a demo application. All products, transactions, and user data are simulated. No real payments are processed.
- Unsplash: Product and hero images
- Heroicons: Beautiful SVG icons
- Tailwind CSS: Utility-first CSS framework
- React Community: Amazing ecosystem and resources
Made with โค๏ธ in India for the textile industry
Balaji Threads Shop - Quality Threads for Every Need