pos-system / index.html
mrmpl's picture
# Professional POS System Development Request ## Project Overview Create a comprehensive Point of Sale (POS) system for retail businesses with a modern, responsive web interface. The system should handle sales transactions, inventory management, customer data, and basic reporting functionality. ## Technical Requirements ### Frontend - **Framework**: React.js with TypeScript - **Styling**: Tailwind CSS for responsive design - **State Management**: React Context API or Redux Toolkit - **UI Components**: Modern, accessible components with proper keyboard navigation - **Responsive Design**: Mobile-first approach, optimized for tablets and desktops ### Backend - **Runtime**: Node.js with Express.js - **Database**: SQLite for development (easily migrable to PostgreSQL) - **API**: RESTful API with proper error handling - **Authentication**: JWT-based authentication system - **Data Validation**: Input sanitization and validation ### Database Schema Design comprehensive tables for: - Products (ID, name, price, category, stock_quantity, barcode, description, weight, dimensions, supplier_id, reorder_point, reorder_quantity, cost_price, markup_percentage, tax_category, expiration_date, serial_number, location, status) - Categories (ID, name, description, parent_category_id, sort_order, is_active, tax_rate, commission_rate) - Customers (ID, name, email, phone, address, loyalty_points, total_spent, visit_count, last_visit, birthday, anniversary, preferred_contact_method, credit_limit, payment_terms, referral_source, tags, notes) - Sales (ID, customer_id, employee_id, location_id, total_amount, tax_amount, discount_amount, tip_amount, payment_method, transaction_type, status, timestamp, receipt_number, channel) - Sale_Items (ID, sale_id, product_id, quantity, unit_price, discount_applied, tax_applied, commission_rate, subtotal, return_quantity, notes) - Users (ID, username, password_hash, role, permissions, employee_id, location_access, created_at, last_login, is_active, phone, email, hourly_rate, commission_rate) - Vendors (ID, name, contact_info, payment_terms, tax_id, address, phone, email, website, notes, status, rating) - Purchase_Orders (ID, vendor_id, order_date, expected_delivery, status, total_amount, tax_amount, notes, created_by, approved_by) - Locations (ID, name, address, phone, manager_id, timezone, tax_rate, currency, operating_hours, square_footage, rental_cost) - Employees (ID, name, position, hire_date, salary, commission_rate, access_level, schedule, performance_metrics, training_records) - Promotions (ID, name, description, discount_type, discount_value, start_date, end_date, applicable_products, conditions, usage_limit, current_usage) - Loyalty_Program (ID, customer_id, points_balance, tier_level, tier_benefits, points_earned, points_redeemed, expiration_date) - Inventory_Adjustments (ID, product_id, adjustment_type, quantity_changed, reason, date, employee_id, notes) - Gift_Cards (ID, card_number, balance, issued_amount, issued_date, customer_id, status, expiration_date) - Returns (ID, original_sale_id, return_date, reason, refund_amount, restocking_fee, processed_by, status, notes) - Shifts (ID, employee_id, location_id, start_time, end_time, break_duration, sales_total, transactions_count, cash_drawer_start, cash_drawer_end) - Appointments (ID, customer_id, employee_id, service_type, scheduled_time, duration, status, notes, reminder_sent) - Suppliers (ID, name, contact_person, phone, email, address, payment_terms, lead_time, minimum_order, preferred_status) - Tax_Rates (ID, location_id, tax_type, rate, description, effective_date, expiration_date) - Discounts (ID, name, type, value, conditions, start_date, end_date, usage_limit, applicable_items, customer_eligibility) - Reservations (ID, customer_id, product_id, quantity, reservation_date, expiration_date, status, notes, deposit_amount) - Maintenance_Logs (ID, equipment_id, maintenance_type, date, cost, technician, notes, next_maintenance_due) - Audit_Logs (ID, user_id, action, table_affected, record_id, old_values, new_values, timestamp, ip_address) - Subscriptions (ID, customer_id, product_id, frequency, next_delivery, status, start_date, end_date, discount_applied) - Quotes (ID, customer_id, items, total_amount, valid_until, status, notes, created_by, follow_up_date) - Complaints (ID, customer_id, issue_type, description, date_reported, status, resolution, resolved_by, follow_up_required) - Marketing_Campaigns (ID, name, type, target_audience, start_date, end_date, budget, actual_cost, response_rate, roi) - Product_Reviews (ID, product_id, customer_id, rating, review_text, date, verified_purchase, helpful_votes) - Training_Records (ID, employee_id, training_type, completion_date, score, certification_expiry, trainer_id) - Cash_Drawer_Events (ID, employee_id, event_type, amount, timestamp, reason, manager_approval) - Rental_Items (ID, product_id, customer_id, rental_start, rental_end, daily_rate, total_cost, deposit, status, condition_notes) ## Core Features to Implement ### 1. Product Management - Add, edit, delete products - Categorize products - Track inventory levels with low-stock alerts - Barcode scanning simulation (text input) - Bulk product import/export (CSV) ### 2. Sales Interface - Intuitive cash register interface - Product search and selection - Shopping cart functionality - Apply discounts (percentage/fixed amount) - Calculate tax automatically - Multiple payment methods (cash, card, digital wallet) - Receipt generation and printing - Transaction history ### 3. Customer Management - Customer registration and profiles - Purchase history tracking - Basic loyalty points system - Customer search functionality ### 4. Inventory Management - Real-time stock tracking - Low stock notifications - Inventory adjustments - Stock movement history ### 5. Reporting Dashboard - Daily/weekly/monthly sales reports - Top-selling products - Revenue analytics with charts - Inventory status overview - Export reports to PDF/Excel ### 6. User Management - Role-based access control (Admin, Cashier, Manager) - User authentication and authorization - Activity logging ## User Interface Requirements ### Main Dashboard - Quick access to all major functions - Real-time sales summary - Low stock alerts - Recent transactions overview ### Sales Interface - Large, touch-friendly buttons - Product grid with images - Running total display - Quick payment processing - Receipt preview ### Admin Panel - Product management interface - User management - System settings - Reports and analytics ## Technical Specifications ### Performance - Fast product search (implement debouncing) - Optimized database queries - Responsive UI with loading states - Error handling and user feedback ### Security - Secure password hashing - Input validation and sanitization - HTTPS enforcement - Session management - Protection against common vulnerabilities ### Data Management - Automatic data backup suggestions - Data export functionality - Database migration scripts - Seed data for testing ## Comprehensive Feature Set ### Sales & Transaction Management - Split payments across multiple methods - Layaway and installment payment plans - Gift card sales and redemption - Store credit management - Tip processing for service businesses - Tax exemption handling - Currency conversion for international sales - Price override with manager approval - Bulk discount application - Buy-one-get-one (BOGO) promotions - Seasonal pricing adjustments - Happy hour/time-based pricing - Quantity-based pricing tiers - Customer-specific pricing - Rain check system for out-of-stock items ### Advanced Inventory Management - Multi-warehouse inventory tracking - Automated reorder points and quantities - Vendor management and purchase orders - Receiving and inspection workflows - Inventory cycle counting - Dead stock identification and management - Seasonal inventory planning - Product bundling and kits - Serial number tracking - Expiration date management - Inventory valuation methods (FIFO, LIFO, Average Cost) - Dropshipping integration - Consignment tracking - Rental inventory management - Asset tracking for high-value items ### Customer Relationship Management - Customer segmentation and tagging - Birthday and anniversary tracking - Personalized marketing campaigns - Customer feedback collection - Complaint and resolution tracking - VIP customer identification - Shopping behavior analysis - Customer lifetime value calculation - Referral program management - Customer communication history - Wishlist and favorites tracking - Custom customer fields - Family/household account linking - Corporate account management - Credit limit management ### Employee Management - Time clock integration - Employee scheduling - Commission tracking - Performance metrics - Training module tracking - Employee discount management - Cash drawer assignment - Shift reporting - Employee access logs - Sales target tracking - Manager approval workflows - Employee productivity reports - Payroll integration preparation - Employee performance reviews - Training certification tracking ### Advanced Reporting & Analytics - Real-time dashboard with KPIs - Profit margin analysis - ABC analysis for inventory - Sales forecasting - Seasonal trend analysis - Customer acquisition cost tracking - Customer retention metrics - Product performance analytics - Employee performance reports - Loss prevention reports - Audit trail reporting - Tax reporting - Financial statement preparation - Vendor performance analysis - Marketing campaign ROI tracking - Heat map analytics for product placement - Cross-selling and upselling analysis - Return/refund pattern analysis - Peak hours identification - Comparative period analysis ### Multi-Channel Integration - E-commerce platform synchronization - Social media marketplace integration - Third-party delivery service integration - Mobile app companion - Kiosk mode for self-service - Online ordering with in-store pickup - Curbside pickup management - Ship-from-store functionality - Marketplace listing management - Omnichannel inventory synchronization - Unified customer profiles across channels - Cross-channel promotion management - Channel-specific pricing - Returns across channels - Loyalty program integration across platforms ### Payment & Financial Management - Cryptocurrency payment support - BNPL (Buy Now Pay Later) integration - Mobile wallet integration (Apple Pay, Google Pay, Samsung Pay) - QR code payments - Invoice generation and management - Recurring payment processing - Subscription management - Automated billing - Payment plan management - Credit card tokenization - PCI compliance features - Fraud detection and prevention - Chargeback management - Multi-currency support - Exchange rate management - Banking integration - Cash flow management - Expense tracking - Petty cash management - Safe and drawer management ### Marketing & Promotions - Email marketing integration - SMS marketing campaigns - Push notifications - Loyalty program management - Points and rewards system - Referral tracking - Social media integration - Review and rating collection - Promotional calendar management - Flash sales management - Clearance automation - Cross-promotion suggestions - Customer win-back campaigns - Abandoned cart recovery - Birthday and anniversary promotions - Seasonal campaign management - Influencer tracking - Affiliate program management - Contest and giveaway management - Customer testimonial collection ### Operations & Workflow - Multi-location management - Franchise management tools - Supplier relationship management - Quality control workflows - Compliance tracking - Document management - Standard operating procedures - Task management and assignments - Communication tools - Maintenance scheduling - Equipment tracking - Utility management - Facility management - Security integration - Loss prevention tools - Audit preparation tools - Regulatory compliance reporting - Health and safety tracking - Emergency procedures - Incident reporting ### Advanced Technical Features - Artificial Intelligence and Machine Learning - Predictive analytics for demand forecasting - Automated pricing optimization - Customer behavior prediction - Fraud detection algorithms - Recommendation engine - Chatbot integration - Voice recognition - Image recognition for product identification - Sentiment analysis from customer feedback - Predictive maintenance alerts - Smart reordering algorithms - Dynamic pricing based on demand - Anomaly detection in sales patterns - Automated report generation with insights ### Blockchain & Cryptocurrency - Cryptocurrency payment acceptance - Blockchain-based loyalty programs - Smart contracts for vendor agreements - Supply chain transparency - Digital identity verification - Decentralized customer data management - NFT integration for digital collectibles - Cryptocurrency rewards program - Blockchain-based inventory verification - Digital receipt authentication ### Advanced Security Features - Biometric authentication (fingerprint, face, voice) - Advanced encryption protocols - Zero-trust security architecture - Behavioral analytics for fraud detection - Real-time threat monitoring - Secure API gateways - Data loss prevention - Advanced user behavior analytics - Secure multi-party computation - Quantum-resistant encryption preparation ### IoT Integration - Smart shelf sensors - Automated inventory counting - Environmental monitoring - Energy usage tracking - Predictive maintenance sensors - Customer flow analysis - Smart lighting and climate control - Automated security systems - Smart mirror integration - Connected payment terminals ### Augmented Reality (AR) & Virtual Reality (VR) - AR product visualization - Virtual try-on capabilities - AR-guided shopping experiences - Virtual showroom creation - 3D product modeling - AR inventory management - Virtual training modules - Interactive product demonstrations - AR-based navigation - Virtual customer service ### Business Intelligence & Advanced Analytics - Real-time business intelligence dashboard - Predictive analytics for sales forecasting - Customer lifetime value modeling - Market basket analysis - Cohort analysis - Churn prediction modeling - Price elasticity analysis - Inventory optimization algorithms - Demand planning and forecasting - Competitive analysis tools - Social media sentiment tracking - Economic indicator integration - Weather-based demand forecasting - Geographic sales analysis - Time-series analysis ### Integration Capabilities - ERP system integration - Accounting software synchronization - CRM platform connectivity - Email marketing platform integration - Social media management tools - Review platform integration - Shipping carrier integration - Tax calculation service integration - Payment gateway integration - Banking API connections - Inventory management system sync - Customer support platform integration - Analytics platform connectivity - Marketing automation integration - Human resources system integration ### Compliance & Regulatory Features - GDPR compliance tools - CCPA compliance management - PCI DSS compliance features - SOX compliance reporting - HIPAA compliance (for healthcare retail) - Age verification systems - Tobacco and alcohol compliance - Prescription tracking (for pharmacies) - Hazardous material handling - Food safety compliance - Organic certification tracking - Fair trade verification - Sustainability reporting - Carbon footprint tracking - Ethical sourcing verification ### Customer Experience Enhancement - Queue management system - Appointment scheduling - Service request tracking - Virtual shopping assistant - Augmented reality features - Product comparison tools - Recommendation engine - Personalized shopping experience - Language localization - Accessibility compliance - Voice commands - Gesture recognition - Contactless interactions - Self-checkout options - Express checkout lanes - Mobile scanning and payment - In-store navigation - Product availability checker - Price comparison tools - Social shopping features ### Data Management & Security - Advanced data encryption - Role-based permissions - Multi-factor authentication - Single sign-on (SSO) integration - Data anonymization - GDPR compliance tools - Data retention policies - Automated backups - Disaster recovery planning - Data import/export tools - API rate limiting - Audit logging - Security monitoring - Vulnerability scanning - Penetration testing integration - Compliance reporting - Data governance tools - Privacy management - Consent management - Data quality monitoring ## Development Guidelines - Clean, maintainable code with proper commenting - Responsive design that works on various screen sizes - Proper error handling and user feedback - Comprehensive testing setup - Clear documentation and setup instructions - Environment configuration for development/production ## Deliverables Expected 1. Complete source code with proper folder structure 1. Database setup scripts and migrations 1. README file with installation and usage instructions 1. Sample data for testing 1. Basic user manual or documentation 1. Deployment configuration ## Success Criteria - System handles basic POS operations smoothly - Intuitive user interface requiring minimal training - Accurate inventory tracking and reporting - Secure user authentication and data protection - Responsive design works across devices - Clean, maintainable codebase Please implement this system with production-ready code quality, proper error handling, and comprehensive functionality that can serve as a foundation for a real retail business. - Initial Deployment
f68e2f1 verified
Raw History Blame Contribute Delete
28 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Retail POS System</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.sidebar {
transition: all 0.3s ease;
}
.sidebar.collapsed {
width: 70px;
}
.sidebar.collapsed .sidebar-text {
display: none;
}
.product-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.cart-item:hover {
background-color: #f3f4f6;
}
@media (max-width: 768px) {
.sidebar {
width: 70px;
}
.sidebar .sidebar-text {
display: none;
}
.main-content {
margin-left: 70px;
}
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div class="sidebar bg-blue-800 text-white w-64 flex-shrink-0">
<div class="p-4 flex items-center justify-between border-b border-blue-700">
<div class="flex items-center">
<i class="fas fa-cash-register text-2xl mr-3"></i>
<span class="sidebar-text font-bold text-xl">Retail POS</span>
</div>
<button id="toggleSidebar" class="text-white focus:outline-none">
<i class="fas fa-bars"></i>
</button>
</div>
<nav class="p-4">
<div class="mb-6">
<p class="sidebar-text uppercase text-xs font-semibold text-blue-300 mb-2">Main</p>
<a href="#" class="flex items-center py-2 px-2 rounded hover:bg-blue-700 mb-1 active-nav">
<i class="fas fa-home mr-3"></i>
<span class="sidebar-text">Dashboard</span>
</a>
<a href="#" class="flex items-center py-2 px-2 rounded hover:bg-blue-700 mb-1">
<i class="fas fa-shopping-cart mr-3"></i>
<span class="sidebar-text">POS</span>
</a>
<a href="#" class="flex items-center py-2 px-2 rounded hover:bg-blue-700 mb-1">
<i class="fas fa-boxes mr-3"></i>
<span class="sidebar-text">Inventory</span>
</a>
</div>
<div class="mb-6">
<p class="sidebar-text uppercase text-xs font-semibold text-blue-300 mb-2">Management</p>
<a href="#" class="flex items-center py-2 px-2 rounded hover:bg-blue-700 mb-1">
<i class="fas fa-users mr-3"></i>
<span class="sidebar-text">Customers</span>
</a>
<a href="#" class="flex items-center py-2 px-2 rounded hover:bg-blue-700 mb-1">
<i class="fas fa-user-tie mr-3"></i>
<span class="sidebar-text">Employees</span>
</a>
<a href="#" class="flex items-center py-2 px-2 rounded hover:bg-blue-700 mb-1">
<i class="fas fa-truck mr-3"></i>
<span class="sidebar-text">Suppliers</span>
</a>
</div>
<div class="mb-6">
<p class="sidebar-text uppercase text-xs font-semibold text-blue-300 mb-2">Reports</p>
<a href="#" class="flex items-center py-2 px-2 rounded hover:bg-blue-700 mb-1">
<i class="fas fa-chart-line mr-3"></i>
<span class="sidebar-text">Sales</span>
</a>
<a href="#" class="flex items-center py-2 px-2 rounded hover:bg-blue-700 mb-1">
<i class="fas fa-chart-pie mr-3"></i>
<span class="sidebar-text">Inventory</span>
</a>
<a href="#" class="flex items-center py-2 px-2 rounded hover:bg-blue-700 mb-1">
<i class="fas fa-file-invoice-dollar mr-3"></i>
<span class="sidebar-text">Financial</span>
</a>
</div>
<div>
<p class="sidebar-text uppercase text-xs font-semibold text-blue-300 mb-2">Settings</p>
<a href="#" class="flex items-center py-2 px-2 rounded hover:bg-blue-700 mb-1">
<i class="fas fa-cog mr-3"></i>
<span class="sidebar-text">System</span>
</a>
<a href="#" class="flex items-center py-2 px-2 rounded hover:bg-blue-700 mb-1">
<i class="fas fa-user-shield mr-3"></i>
<span class="sidebar-text">Users</span>
</a>
</div>
</nav>
</div>
<!-- Main Content -->
<div class="main-content flex-1 overflow-auto">
<!-- Top Navigation -->
<header class="bg-white shadow-sm p-4 flex justify-between items-center">
<h1 class="text-2xl font-bold text-gray-800">Point of Sale</h1>
<div class="flex items-center space-x-4">
<div class="relative">
<input type="text" placeholder="Search products..."
class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
<div class="flex items-center space-x-2">
<div class="relative">
<i class="fas fa-bell text-gray-600 text-xl cursor-pointer"></i>
<span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span>
</div>
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User" class="w-8 h-8 rounded-full">
<span class="ml-2 font-medium hidden md:inline">John Doe</span>
</div>
</div>
</div>
</header>
<!-- POS Content -->
<div class="p-4">
<div class="grid grid-cols-1 lg:grid-cols-3 gap-4">
<!-- Products Section -->
<div class="lg:col-span-2 bg-white rounded-lg shadow p-4">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold">Products</h2>
<div class="flex space-x-2">
<button class="px-3 py-1 bg-blue-100 text-blue-700 rounded hover:bg-blue-200">
<i class="fas fa-filter mr-1"></i> Filter
</button>
<button class="px-3 py-1 bg-blue-100 text-blue-700 rounded hover:bg-blue-200">
<i class="fas fa-sort mr-1"></i> Sort
</button>
</div>
</div>
<!-- Categories -->
<div class="flex overflow-x-auto mb-4 pb-2">
<button class="px-4 py-2 bg-blue-600 text-white rounded-full mr-2 whitespace-nowrap">All</button>
<button class="px-4 py-2 bg-gray-100 rounded-full mr-2 whitespace-nowrap">Electronics</button>
<button class="px-4 py-2 bg-gray-100 rounded-full mr-2 whitespace-nowrap">Clothing</button>
<button class="px-4 py-2 bg-gray-100 rounded-full mr-2 whitespace-nowrap">Groceries</button>
<button class="px-4 py-2 bg-gray-100 rounded-full mr-2 whitespace-nowrap">Home & Garden</button>
<button class="px-4 py-2 bg-gray-100 rounded-full mr-2 whitespace-nowrap">Toys</button>
</div>
<!-- Product Grid -->
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3">
<!-- Product 1 -->
<div class="product-card bg-white border rounded-lg p-3 cursor-pointer transition duration-300">
<div class="bg-gray-100 h-32 rounded flex items-center justify-center mb-2">
<img src="https://via.placeholder.com/100" alt="Product" class="h-24 object-contain">
</div>
<h3 class="font-medium text-sm truncate">Wireless Headphones</h3>
<div class="flex justify-between items-center mt-1">
<span class="text-green-600 font-bold">$59.99</span>
<span class="text-xs text-gray-500">12 in stock</span>
</div>
<button class="w-full mt-2 bg-blue-600 text-white py-1 rounded hover:bg-blue-700 text-sm">
Add to Cart
</button>
</div>
<!-- Product 2 -->
<div class="product-card bg-white border rounded-lg p-3 cursor-pointer transition duration-300">
<div class="bg-gray-100 h-32 rounded flex items-center justify-center mb-2">
<img src="https://via.placeholder.com/100" alt="Product" class="h-24 object-contain">
</div>
<h3 class="font-medium text-sm truncate">Smart Watch</h3>
<div class="flex justify-between items-center mt-1">
<span class="text-green-600 font-bold">$129.99</span>
<span class="text-xs text-gray-500">5 in stock</span>
</div>
<button class="w-full mt-2 bg-blue-600 text-white py-1 rounded hover:bg-blue-700 text-sm">
Add to Cart
</button>
</div>
<!-- Product 3 -->
<div class="product-card bg-white border rounded-lg p-3 cursor-pointer transition duration-300">
<div class="bg-gray-100 h-32 rounded flex items-center justify-center mb-2">
<img src="https://via.placeholder.com/100" alt="Product" class="h-24 object-contain">
</div>
<h3 class="font-medium text-sm truncate">Bluetooth Speaker</h3>
<div class="flex justify-between items-center mt-1">
<span class="text-green-600 font-bold">$34.99</span>
<span class="text-xs text-gray-500">8 in stock</span>
</div>
<button class="w-full mt-2 bg-blue-600 text-white py-1 rounded hover:bg-blue-700 text-sm">
Add to Cart
</button>
</div>
<!-- Product 4 -->
<div class="product-card bg-white border rounded-lg p-3 cursor-pointer transition duration-300">
<div class="bg-gray-100 h-32 rounded flex items-center justify-center mb-2">
<img src="https://via.placeholder.com/100" alt="Product" class="h-24 object-contain">
</div>
<h3 class="font-medium text-sm truncate">Phone Charger</h3>
<div class="flex justify-between items-center mt-1">
<span class="text-green-600 font-bold">$12.99</span>
<span class="text-xs text-gray-500">20 in stock</span>
</div>
<button class="w-full mt-2 bg-blue-600 text-white py-1 rounded hover:bg-blue-700 text-sm">
Add to Cart
</button>
</div>
<!-- Product 5 -->
<div class="product-card bg-white border rounded-lg p-3 cursor-pointer transition duration-300">
<div class="bg-gray-100 h-32 rounded flex items-center justify-center mb-2">
<img src="https://via.placeholder.com/100" alt="Product" class="h-24 object-contain">
</div>
<h3 class="font-medium text-sm truncate">Laptop Backpack</h3>
<div class="flex justify-between items-center mt-1">
<span class="text-green-600 font-bold">$45.99</span>
<span class="text-xs text-gray-500">6 in stock</span>
</div>
<button class="w-full mt-2 bg-blue-600 text-white py-1 rounded hover:bg-blue-700 text-sm">
Add to Cart
</button>
</div>
<!-- Product 6 -->
<div class="product-card bg-white border rounded-lg p-3 cursor-pointer transition duration-300">
<div class="bg-gray-100 h-32 rounded flex items-center justify-center mb-2">
<img src="https://via.placeholder.com/100" alt="Product" class="h-24 object-contain">
</div>
<h3 class="font-medium text-sm truncate">Wireless Mouse</h3>
<div class="flex justify-between items-center mt-1">
<span class="text-green-600 font-bold">$24.99</span>
<span class="text-xs text-gray-500">15 in stock</span>
</div>
<button class="w-full mt-2 bg-blue-600 text-white py-1 rounded hover:bg-blue-700 text-sm">
Add to Cart
</button>
</div>
<!-- Product 7 -->
<div class="product-card bg-white border rounded-lg p-3 cursor-pointer transition duration-300">
<div class="bg-gray-100 h-32 rounded flex items-center justify-center mb-2">
<img src="https://via.placeholder.com/100" alt="Product" class="h-24 object-contain">
</div>
<h3 class="font-medium text-sm truncate">USB Flash Drive</h3>
<div class="flex justify-between items-center mt-1">
<span class="text-green-600 font-bold">$9.99</span>
<span class="text-xs text-gray-500">25 in stock</span>
</div>
<button class="w-full mt-2 bg-blue-600 text-white py-1 rounded hover:bg-blue-700 text-sm">
Add to Cart
</button>
</div>
<!-- Product 8 -->
<div class="product-card bg-white border rounded-lg p-3 cursor-pointer transition duration-300">
<div class="bg-gray-100 h-32 rounded flex items-center justify-center mb-2">
<img src="https://via.placeholder.com/100" alt="Product" class="h-24 object-contain">
</div>
<h3 class="font-medium text-sm truncate">Screen Protector</h3>
<div class="flex justify-between items-center mt-1">
<span class="text-green-600 font-bold">$7.99</span>
<span class="text-xs text-gray-500">18 in stock</span>
</div>
<button class="w-full mt-2 bg-blue-600 text-white py-1 rounded hover:bg-blue-700 text-sm">
Add to Cart
</button>
</div>
</div>
</div>
<!-- Cart Section -->
<div class="bg-white rounded-lg shadow p-4">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-semibold">Current Sale</h2>
<button class="text-red-500 hover:text-red-700">
<i class="fas fa-trash-alt"></i> Clear
</button>
</div>
<!-- Customer Info -->
<div class="mb-4">
<div class="flex justify-between items-center mb-2">
<span class="text-sm font-medium">Customer</span>
<button class="text-blue-600 hover:text-blue-800 text-sm">
<i class="fas fa-plus mr-1"></i> Add
</button>
</div>
<div class="flex items-center bg-gray-100 p-2 rounded">
<i class="fas fa-user-circle text-gray-500 text-xl mr-2"></i>
<span class="text-sm">Walk-in Customer</span>
</div>
</div>
<!-- Cart Items -->
<div class="mb-4 max-h-96 overflow-y-auto">
<div class="cart-item border-b py-3 px-2 flex justify-between items-center transition duration-200">
<div class="flex items-center">
<button class="text-gray-400 hover:text-red-500 mr-2">
<i class="fas fa-times"></i>
</button>
<div>
<h4 class="text-sm font-medium">Wireless Headphones</h4>
<div class="flex items-center mt-1">
<button class="text-gray-500 hover:text-blue-600">
<i class="fas fa-minus text-xs"></i>
</button>
<span class="mx-2 text-sm">1</span>
<button class="text-gray-500 hover:text-blue-600">
<i class="fas fa-plus text-xs"></i>
</button>
</div>
</div>
</div>
<span class="font-medium">$59.99</span>
</div>
<div class="cart-item border-b py-3 px-2 flex justify-between items-center transition duration-200">
<div class="flex items-center">
<button class="text-gray-400 hover:text-red-500 mr-2">
<i class="fas fa-times"></i>
</button>
<div>
<h4 class="text-sm font-medium">Phone Charger</h4>
<div class="flex items-center mt-1">
<button class="text-gray-500 hover:text-blue-600">
<i class="fas fa-minus text-xs"></i>
</button>
<span class="mx-2 text-sm">2</span>
<button class="text-gray-500 hover:text-blue-600">
<i class="fas fa-plus text-xs"></i>
</button>
</div>
</div>
</div>
<span class="font-medium">$25.98</span>
</div>
</div>
<!-- Summary -->
<div class="border-t pt-3 mb-4">
<div class="flex justify-between mb-1">
<span class="text-gray-600">Subtotal:</span>
<span>$85.97</span>
</div>
<div class="flex justify-between mb-1">
<span class="text-gray-600">Tax (8%):</span>
<span>$6.88</span>
</div>
<div class="flex justify-between mb-1">
<span class="text-gray-600">Discount:</span>
<span class="text-red-500">-$0.00</span>
</div>
<div class="flex justify-between font-bold text-lg mt-2">
<span>Total:</span>
<span>$92.85</span>
</div>
</div>
<!-- Discount -->
<div class="mb-4">
<label class="block text-sm font-medium mb-1">Add Discount</label>
<div class="flex">
<select class="border rounded-l px-2 py-1 text-sm focus:outline-none">
<option>Percentage</option>
<option>Fixed Amount</option>
</select>
<input type="text" placeholder="Amount" class="border-t border-b px-2 py-1 w-full text-sm focus:outline-none">
<button class="bg-blue-600 text-white px-3 py-1 rounded-r hover:bg-blue-700 text-sm">
Apply
</button>
</div>
</div>
<!-- Payment Buttons -->
<div class="grid grid-cols-2 gap-2 mb-4">
<button class="bg-green-600 text-white py-2 rounded hover:bg-green-700">
<i class="fas fa-money-bill-wave mr-1"></i> Cash
</button>
<button class="bg-blue-600 text-white py-2 rounded hover:bg-blue-700">
<i class="fas fa-credit-card mr-1"></i> Card
</button>
<button class="bg-purple-600 text-white py-2 rounded hover:bg-purple-700">
<i class="fab fa-cc-paypal mr-1"></i> PayPal
</button>
<button class="bg-yellow-500 text-white py-2 rounded hover:bg-yellow-600">
<i class="fas fa-gift mr-1"></i> Gift Card
</button>
</div>
<!-- Notes -->
<div class="mb-4">
<label class="block text-sm font-medium mb-1">Order Notes</label>
<textarea class="w-full border rounded p-2 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500" rows="2" placeholder="Add notes for this order..."></textarea>
</div>
<!-- Complete Sale -->
<button class="w-full bg-green-600 text-white py-3 rounded-lg font-bold hover:bg-green-700 flex items-center justify-center">
<i class="fas fa-check-circle mr-2"></i> Complete Sale
</button>
</div>
</div>
</div>
</div>
</div>
<script>
// Toggle sidebar
document.getElementById('toggleSidebar').addEventListener('click', function() {
document.querySelector('.sidebar').classList.toggle('collapsed');
document.querySelector('.main-content').classList.toggle('ml-64');
document.querySelector('.main-content').classList.toggle('ml-16');
});
// Add to cart functionality
const addToCartButtons = document.querySelectorAll('.product-card button');
addToCartButtons.forEach(button => {
button.addEventListener('click', function() {
const productCard = this.closest('.product-card');
const productName = productCard.querySelector('h3').textContent;
const productPrice = productCard.querySelector('.text-green-600').textContent;
// In a real app, you would add this to your cart state
alert(`Added ${productName} to cart for ${productPrice}`);
});
});
// Responsive adjustments
function checkScreenSize() {
if (window.innerWidth <= 768) {
document.querySelector('.sidebar').classList.add('collapsed');
document.querySelector('.main-content').classList.remove('ml-64');
document.querySelector('.main-content').classList.add('ml-16');
} else {
document.querySelector('.sidebar').classList.remove('collapsed');
document.querySelector('.main-content').classList.add('ml-64');
document.querySelector('.main-content').classList.remove('ml-16');
}
}
window.addEventListener('resize', checkScreenSize);
checkScreenSize();
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=mrmpl/pos-system" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>