POS_Prompts

Point of Sale (POS) System Prompts

Generated for NVIBOX/POS project

Development Prompts

Checkout Flow

As a cashier, I need a streamlined checkout process where I can:
1. Scan items quickly (barcode or manual entry)
2. Apply discounts/coupons
3. Process multiple payment types (cash, card, mobile)
4. Print/scan receipt
5. Complete the transaction

Error cases:
- Invalid barcode
- Insufficient funds (card declined)
- Network timeout
- Printer offline

Inventory Management

As a store manager, I need to track inventory levels:
- Real-time stock counts
- Low stock alerts
- Automatic reorder suggestions
- Batch expiration tracking
- Supplier integration

The system should show:
- Current stock vs minimum threshold
- Days until out of stock
- Last restock dates
- Barcode scanning for receiving

Invoice Import (Critical Feature)

As a store manager, I need automatic invoice import capability:
- Support DSDLink format (standard food service vendor)
- Support Fintect format (financial invoice system)
- Parse invoice PDFs or CSV exports
- Match incoming items to stocked products via UPC/EAN
- Create new products automatically when UPC not found
- Suggest price changes based on invoice cost changes
- Preview invoice before committing to inventory
- Flag potential new products for review

The system should:
- Auto-detect file format (DSDLink vs Fintect)
- Map vendor item codes to UPCs
- Calculate suggested retail price from cost
- Batch import with undo capability
- Send email summary of processed invoices

Product Management

As a store manager, I need easy product management:

Add New Products:
- UPC/EAN barcode (scan or type)
- Product name
- Cost price (per unit)
- Retail price (auto-calculated from markup)
- General markup percentage (40% default)
- Category selection
- Unit of measure (each, case, lb)

Price Changes:
- Bulk update by category
- Compare to invoice costs
- Preview price impact on stock
- Maintain price change history

Product Search:
- By UPC barcode
- By name (fuzzy search)
- By vendor code
- By category

Sales Reporting

As a store owner, I need comprehensive sales reports:
- Daily, weekly, monthly summaries
- Top-selling products
- Sales by category
- Revenue vs cost of goods
- Employee performance metrics

Export formats: CSV, PDF, Excel

Database Schema (Expanded)

Tables:
1. products (id, name, sku, barcode_upc, vendor_codes JSON, cost, price, markup, category_id, uom, created_at)
2. categories (id, name, description, parent_id)
3. customers (id, name, email, phone, loyalty_points)
4. employees (id, name, role, password_hash)
5. sales (id, employee_id, customer_id, datetime, total, payment_type)
6. sale_items (sale_id, product_id, quantity, unit_price, discount)
7. inventory_transactions (product_id, type, quantity, timestamp, note, source)
8. invoices (id, vendor, date, file_path, format, status, processed_at)
9. invoice_items (invoice_id, product_id, vendor_sku, cost, quantity, matched)
10. price_changes (product_id, old_price, new_price, reason, approved_by, timestamp)

Chart.js Integration Prompts

Real-time Sales Dashboard

Create a live-updating chart showing:
- Sales volume over time (hourly for today)
- Revenue by product category
- Compare actual vs forecasted sales
- Real-time conversion rate

Use Chart.js with:
- Streaming plugin for live updates
- Bar chart for category breakdown
- Line chart for time series
- Auto-refresh every 30 seconds

Inventory Heatmap

Visualize inventory levels:
- Color-coded grid (green=good, yellow=low, red=out)
- Product name as labels
- Quantity as color intensity
- Click to show details

Chart type: Packed bubble or heatmap
Interactive: Hover tooltips, click to view details

Invoice Processing Dashboard

Display invoice import status:
- DSDLink vs Fintect file counts
- New products flagged
- Price changes pending
- Processing success rate
- Vendor performance chart

Chart types: Pie chart, bar chart
Update in real-time as invoices process

API Endpoints

GET    /api/products                    # List all products
POST   /api/products                    # Add new product
GET    /api/products/:id                  # Get specific product
PUT    /api/products/:id                  # Update product
DELETE /api/products/:id                  # Delete product
POST   /api/products/bulk                  # Bulk add/update

GET    /api/invoices                     # List invoices
POST   /api/invoices/upload              # Upload DSDLink/Fintect file
GET    /api/invoices/:id                  # Get invoice details
POST   /api/invoices/:id/preview         # Preview invoice before import
POST   /api/invoices/process             # Process invoice

GET    /api/invoices/new-products         # Products added from invoices
GET    /api/invoices/price-changes        # Price changes from invoices
POST   /api/invoices/approve              # Approve invoice processing

GET    /api/sales                         # List sales
POST   /api/sales                        # Process sale
GET    /api/sales?date=YYYY-MM-DD         # Get sales for date
GET    /api/sales/:id                     # Get sale details

GET    /api/inventory                     # Current inventory
POST   /api/inventory/adjust              # Adjust stock
GET    /api/inventory/alerts              # Low stock alerts

GET    /api/reports/sales                 # Sales report
GET    /api/reports/inventory             # Inventory report
GET    /api/reports/invoice-summary       # Invoice import summary

Mobile App Prompts

Quick Product Addition

As a store manager scanning a new product:
1. Camera scan UPC
2. If not found: "New product - add details?"
3. Fill: cost, default markup %, category
4. Auto-calculate retail price
5. Save and add to cart
6. Confirm success with barcode scan

Price Change Notification

When invoice import finds price changes:
- Show: Product name, Old price, New cost, Suggested retail
- Options: Accept, Modify, Skip
- Batch approval UI
- Undo last batch if needed

Cloudflare Pages Deployment

# Build configuration
Build command: npm run build
Build directory: dist
Publish directory: dist

# Environment variables
NODE_VERSION: 18
ANALYTICS_ID: <auto>

# Redirects
/* /index.html 200