The Product Management module allows you to maintain your inventory by adding new products, viewing existing items, and removing discontinued products.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CodecraftBySyed/Mini-POS-System/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Product management is designed for simplicity and speed. Each product has two essential properties:- Name: The product identifier (e.g., “Coffee”, “Sandwich”)
- Price: The selling price in rupees
Simple Form
Add products with just a name and price
Instant Updates
Products appear immediately in the POS interface
Visual Grid
View all products in an organized card layout
One-Click Delete
Remove products with confirmation dialog
Adding Products
The product form is straightforward and validates input before saving:js/products.js
Product names are trimmed to remove leading/trailing whitespace, and prices are automatically converted to numbers during storage.
Displaying Products
Products are rendered as cards with hover effects for better user experience:js/products.js
Empty State Handling
When no products exist, the system displays a helpful empty state message:js/products.js
Deleting Products
Deletion is protected by a confirmation dialog to prevent accidental removal:js/products.js
Database Integration
Products are stored in IndexedDB with auto-incrementing IDs:js/db.js
The database automatically assigns unique IDs to products using IndexedDB’s
autoIncrement feature.User Workflow
Adding a Product
Adding a Product
- Navigate to the Products page
- Enter the product name (e.g., “Espresso”)
- Enter the price (e.g., “150”)
- Click “Add Product”
- Product appears immediately in the grid
- Success toast notification appears
- Form fields are cleared for next entry
Deleting a Product
Deleting a Product
- Locate the product card in the grid
- Click the red trash icon button
- Confirm deletion in the dialog
- Product is removed from database
- Grid updates automatically
- Deletion confirmation toast appears
Validation
- Name: Must not be empty (trimmed automatically)
- Price: Must be a valid number
- Deletion: Requires user confirmation
UI Features
- Responsive Grid: Adapts to screen size for optimal viewing
- Hover Effects: Cards gain shadow on hover for visual feedback
- Color-Coded Actions: Delete buttons are red for clear indication
- Toast Notifications: Confirm successful operations
- Currency Formatting: Prices always display with 2 decimal places
Best Practices
- Consistent Naming: Use clear, descriptive product names
- Accurate Pricing: Double-check prices before adding
- Regular Cleanup: Remove discontinued products to keep inventory current
- Backup Data: Use the export features in Reports for data backup
Related Pages
- Database API - Product storage schema
- POS Interface - Using products in sales
- Dashboard - Viewing product count