A complete Point of Sale (POS) system built for perfume retail in the United Arab Emirates. Full-stack web and mobile-responsive application with inventory management, sales tracking, VAT calculation, and comprehensive reporting.
perfume-pos-uae/
āāā index.ts # Hono HTTP server with API endpoints
āāā db/
ā āāā schema.ts # Database initialization and demo data
āāā frontend/
ā āāā index.tsx # React app entry point
ā āāā root.tsx # HTML shell with asset loading
ā āāā favicon.svg # App icon
ā āāā components/
ā āāā App.tsx # Main app layout
ā āāā ProductCatalog.tsx # Product display & search
ā āāā Cart.tsx # Shopping cart interface
ā āāā Checkout.tsx # Payment processing UI
āāā README.md # Documentation
The app loads with 6 demo perfume products:
All products have 100 units in stock initially.
GET /api/products # All products with stock
GET /api/products/:id # Single product details
POST /api/sales # Create new sale transaction
Body: { items: [{id, name, price, quantity}], paymentMethod }
GET /api/inventory # All products with low stock alerts
POST /api/inventory/stock # Update stock (receive/adjust)
Body: { productId, quantity, type, reference }
GET /api/reports/sales # Sales report with filtering
Query: ?startDate=2026-08-01&endDate=2026-08-31
GET /api/dashboard # Stats: today's sales, low stock alerts, totals
id, name, sku (unique), category, price, cost, stockdescription, barcode (for future barcode scanning)id, transactionId (unique), total, subtotal, vatAmountpaymentMethod (cash, card, transfer)status, createdAtEdit db/schema.ts seedDemoData() function or use admin panel (future feature)
VAT is calculated as 5% in:
frontend/components/Cart.tsx (line with subtotal * 0.05)frontend/components/Checkout.tsx (same calculation)index.ts /api/sales endpointChange 0.05 to your desired rate everywhere.
Categories are auto-detected from products. Add new products with new category names.
Update the <select> in frontend/components/Checkout.tsx to add/remove payment options.
The POS is 100% mobile-responsive:
User Selects Products
ā
Cart Updates (Local State)
ā
User Clicks Checkout
ā
Checkout Modal Shows (VAT Calculated)
ā
Payment Method Selected
ā
POST /api/sales
ā
Database Transaction:
1. Create sale record
2. Create sale_items (line items)
3. Update product stock
4. Log inventory movements
ā
Success Response + Transaction ID
ā
Cart Cleared, UI Reset
Built on Val Town ⢠Full Stack ⢠Production-Ready
Need help? Check the source code at View Source