Hardware Shop Inventory Management System - Development PromptProject OverviewCreate a comprehensive React-based inventory management application for a hardware shop with modern UI/UX, efficient state management, and professional business features.Core Requirements1. Inventory ManagementAdd Products: Per-unit pricing system with:Item name, total quantity purchasedBuy price per unit, label price per unitMinimum profit margin per unitProduct category (Tools, Hardware, Paint, Electrical, etc.)Supplier informationProduct image upload capabilityStock Tracking: Real-time quantity updates with low stock alertsEdit/Delete: In-line editing with validation and confirmation dialogsSearch & Filter: Advanced filtering by category, price range, stock levelBarcode Support: Generate and scan barcodes for quick operations2. Sales SystemPoint of Sale Interface: Shopping cart with:Adjustable quantities and pricing (within profit margins)Real-time price validation (cannot exceed label price or go below buy price + minimum profit)Multiple payment methods (Cash, Card, Credit)Customer selection (walk-in or registered customers)Dynamic Pricing: Bulk discount tiers and promotional pricingReceipt Generation: Professional receipts showing:Item details with original vs. selling priceDiscount percentages per itemTotal savings and profit breakdownShop branding and contact information3. Customer ManagementCustomer Database: Store customer information, purchase historyCredit Sales: Track unpaid invoices and payment schedulesCustomer Analytics: Most valuable customers, buying patterns4. Financial TrackingSales Analytics: Daily, weekly, monthly revenue and profit reportsExpense Management: Track business expenses (rent, utilities, supplies)Profit Analysis: Item-wise and category-wise profitabilityTax Reports: Generate tax-ready financial summaries5. Supplier ManagementSupplier Database: Contact information, payment terms, lead timesPurchase Orders: Automated reorder suggestions based on stock levelsCost Tracking: Price history and supplier performanceTechnical SpecificationsFrontend FrameworkReact 18 with modern hooks (useState, useReducer, useEffect, useContext)State Management: useReducer for complex state, Context API for global stateStyling: Tailwind CSS with custom componentsIcons: Lucide React for consistent iconographyRouting: React Router for multi-page navigationData ManagementLocal Storage: Persistent data storage with automatic backupsExport/Import: CSV/Excel export functionalityData Validation: Comprehensive form validation and error handlingReal-time Updates: Automatic inventory updates during salesUI/UX DesignModern Dashboard: Clean, professional interface with intuitive navigationResponsive Design: Mobile-friendly for tablet/phone useDark/Light Theme: User preference toggleLoading States: Smooth transitions and loading indicatorsAccessibility: ARIA labels, keyboard navigation, screen reader supportPerformance FeaturesSearch Optimization: Debounced search with instant resultsPagination: Handle large inventories efficientlyLazy Loading: Images and components loaded on demandCaching: Smart caching for frequently accessed dataAdvanced FeaturesBusiness IntelligenceDashboard Analytics:Today's sales vs. yesterday/last weekTop-selling items and categoriesLow stock alerts with reorder suggestionsProfit margin analysis by categoryVisual Reports: Charts and graphs using Chart.js or RechartsPredictive Analytics: Sales forecasting based on historical dataAutomationAuto-reorder Alerts: When stock falls below minimum thresholdPrice Optimization: Suggest optimal pricing based on market trendsInventory Valuation: Calculate total inventory worth at cost and retail pricesMulti-location SupportBranch Management: If expanding to multiple locationsStock Transfer: Move inventory between locationsCentralized Reporting: Consolidated reports across all branchesSecurity & BackupUser Authentication: Admin, Manager, Cashier role levelsData Encryption: Secure sensitive financial dataAutomatic Backups: Daily data backups with restore functionalityAudit Trail: Track all inventory changes and sales transactionsUser Interface SpecificationsLayout StructureHeader: Logo, Search Bar, User Profile, Notifications Sidebar: Dashboard, Inventory, Sales, Customers, Suppliers, Reports, Settings Main Content: Dynamic content based on navigation Footer: Quick stats, export options, help links Color Scheme & BrandingPrimary: Professional blue (#3B82F6
)Secondary: Success green (#10B981
), Warning amber (#F59E0B
), Error red (#EF4444
)Neutral: Modern grays for backgrounds and textCustomizable: Allow shop owner to upload logo and customize colorsKey PagesDashboard: Sales overview, quick actions, alertsInventory: Full product listing with advanced filtersPoint of Sale: Streamlined checkout interfaceReports: Comprehensive business analyticsSettings: App configuration, user management, backup optionsData ModelsProduct Model{ id, name, category, description, barcode, buyPricePerUnit, labelPricePerUnit, minimumProfitPerUnit, currentStock, minStockLevel, maxStockLevel, supplier, images, dateAdded, lastUpdated, salesHistory, profitMargin } Sale Model{ id, date, items[], customer, paymentMethod, subtotal, discount, tax, total, profit, cashier, receiptNumber, status } Customer Model{ id, name, phone, email, address, totalPurchases, creditLimit, outstandingBalance, joinDate, lastPurchase, loyaltyPoints } Success CriteriaPerformance: App loads in under 2 seconds, smooth interactionsUsability: Non-technical users can operate without trainingReliability: 99%+ uptime with data integrity protectionScalability: Handle 10,000+ products and 1000+ daily transactionsBusiness Impact: Reduce inventory management time by 50%Development ApproachMVP Phase: Core inventory and sales functionalityEnhancement Phase: Analytics, customer management, advanced featuresOptimization Phase: Performance tuning, mobile optimizationDeployment: Progressive Web App (PWA) for offline capabilityAdditional ConsiderationsPrint Support: Receipt and report printingOffline Mode: Basic functionality when internet is unavailableIntegration Ready: API structure for future POS hardware integrationMultilingual: Support for local language if neededCurrency: Local currency formatting and multi-currency supportExpected Deliverable: A production-ready inventory management application that transforms hardware shop operations from manual to digital, increasing efficiency, profitability, and customer satisfaction.
Loading...
I'll add toast notifications when items are added to the shopping cart in the Point of Sale page. Let me implement this feature using a toast context and component.
Perfect! I've added a comprehensive toast notification system to your Point of Sale page. Here's what I've implemented:
ToastContext
for managing toast notificationssuccess
, error
, warning
, info
The toast notifications now provide immediate feedback for all cart operations, making the Point of Sale experience much more interactive and user-friendly!