Build a complete mobile-first POS + Inventory + QR Label + Serial Tracking system using Expo (React Native). The app must be fully functional, offline-first, and production-ready with real logic (no placeholders). ==================================================== SYSTEM OVERVIEW ==================================================== This system manages SERIAL-LEVEL inventory with QR-based tracking. Each unit is uniquely tracked using a globally continuous serial number. Full flow: QR Label → Purchase (Stock In) → Inventory → Sales → Invoice → Transactions → Reports ==================================================== DATABASE DESIGN (STRICT) ==================================================== products: id name sku (unique) price created_at purchases: id created_at purchase_items: id purchase_id product_id serial_number (UNIQUE GLOBAL) batch price status (AVAILABLE / SOLD) created_at sales: id invoice_number (AUTO GENERATED, UNIQUE) created_at sales_items: id sale_id purchase_item_id price created_at business_details: id name phone address gst logo (image path/base64) signature (image path/base64) qr_settings: id same_fields (boolean) label_fields (JSON) qr_fields (JSON) IMPORTANT RULES: - Inventory is SERIAL-BASED - DO NOT store quantity in products - Quantity = COUNT(purchase_items WHERE status='AVAILABLE') - Serial number must be globally continuous (SN00001, SN00002… no reset per product) - One purchase = one bill - One sale = one bill ==================================================== 1. INVENTORY MODULE (STOCK TAB) ==================================================== - Add / edit / delete products - Auto-create product if not exists during scan or QR generation - SKU: - Auto or manual - Reuse if product exists - Show: - Total products - Available stock (count AVAILABLE serials) - Sold stock - Product detail: - List of serials (available + sold) ---------------------------------------------------- SCAN TO ADD STOCK ---------------------------------------------------- - Scan QR - If product does not exist → AUTO CREATE - Insert new purchase_item - Assign next global serial number ==================================================== 2. PURCHASE SYSTEM (GROUPED BILL) ==================================================== - One purchase = one bill - Multiple products inside Example: Biscuit (5) Honey (10) System must: → create 15 purchase_items → all under ONE purchase_id Each unit: - serial_number - batch - price ==================================================== 3. QR LABEL GENERATOR (CORE FEATURE) ==================================================== MULTI-PRODUCT INPUT: User can add multiple products in one batch: Example: Biscuit (5) Honey (10) FIELDS: - product_name - sku (auto/manual) - price - batch - starting_serial (optional) - quantity ---------------------------------------------------- SERIAL NUMBER LOGIC ---------------------------------------------------- - Format: SN00001, SN00002... - MUST be globally continuous across ALL products - Example: Biscuit 5 → SN00001–SN00005 Honey 10 → SN00006–SN00015 ---------------------------------------------------- QR DATA FORMAT (DYNAMIC JSON) ---------------------------------------------------- Example: { product_name, sku, price, batch, serial_number } Fields must be dynamically controlled by settings ---------------------------------------------------- LABEL DESIGN ---------------------------------------------------- Each label contains: - QR code - Selected text fields (dynamic) ---------------------------------------------------- A4 PDF GENERATION ---------------------------------------------------- - Grid layout (e.g., 24 labels/page) - Fill left → right → top → bottom - Combine multiple products in same pages - No empty spaces - Multi-page support ---------------------------------------------------- PREVIEW ---------------------------------------------------- - Show total labels - Show total pages ---------------------------------------------------- INVENTORY INTEGRATION ---------------------------------------------------- Toggle: [✓] Add to Inventory If enabled: → Create ONE purchase → Insert ALL units into purchase_items ==================================================== 4. SALES MODULE (CORE ENGINE) ==================================================== - Create ONE sale (bill) - Add items via: - QR scan (auto add) - Manual serial entry ---------------------------------------------------- SCAN FLOW ---------------------------------------------------- - Scan QR → extract serial_number - Find purchase_item IF: - AVAILABLE → add to cart - SOLD → show error ---------------------------------------------------- CART SYSTEM ---------------------------------------------------- - Each item = 1 serial - No quantity field ---------------------------------------------------- CHECKOUT ---------------------------------------------------- - Create ONE sale - Generate invoice_number automatically (e.g., INV-0001) - Insert multiple sales_items - Update: purchase_items.status = SOLD ---------------------------------------------------- IMPORTANT ---------------------------------------------------- - Invoice must be auto-created and saved silently - DO NOT show popup to generate invoice ==================================================== 5. INVOICE SYSTEM ==================================================== - Invoice is auto-created at checkout - Stored in system ---------------------------------------------------- ACCESS INVOICE ---------------------------------------------------- - Only accessible from Transactions tab ---------------------------------------------------- INVOICE DESIGN ---------------------------------------------------- Professional PDF: - Business logo - Business details - Customer placeholder (optional) - Product list - Serial numbers - Price per unit - Total amount - Invoice number - Date - Signature / stamp ==================================================== 6. TRANSACTIONS TAB (SALES LOG) ==================================================== - Unified system: - Sales - Purchases ---------------------------------------------------- FEATURES ---------------------------------------------------- - Filter: - Date range - Type (sale/purchase) - Search: - Invoice number - Product - Serial number ---------------------------------------------------- SCAN TO FIND SALE ---------------------------------------------------- - Scan QR - Show: - Product details - Purchase info - Sale invoice (if sold) ---------------------------------------------------- EXPORT ---------------------------------------------------- - Export Sales PDF - Export Purchase PDF - Based on selected date range ==================================================== 7. DASHBOARD (HOME TAB) ==================================================== Show: - Total sales amount - Total transactions - Total products - Available stock - Sold items - Recent sales preview ==================================================== 8. SETTINGS TAB ==================================================== ----------------------------------- 1. BUSINESS INFORMATION ----------------------------------- - Name - Phone - Address - GST - Upload: - Logo - Signature / Stamp ----------------------------------- 2. DATA MANAGEMENT ----------------------------------- - Export full database (JSON) - Import JSON backup - Reset data (optional) ----------------------------------- 3. QR CODE GENERATE SETTINGS ----------------------------------- FIELD TOGGLES: [✓] Product Name (required) [✓] SKU [✓] Price [✓] Batch [✓] Serial Number [ ] Variant [ ] MFG Date [ ] EXP Date ----------------------------------- MODE: ----------------------------------- (•) Same fields for Label & QR ( ) Separate configuration If separate: - Label fields - QR fields ----------------------------------- BEHAVIOR: ----------------------------------- - QR generator must read settings - Only selected fields: → encoded in QR → printed on label - Settings must persist ==================================================== TECH REQUIREMENTS ==================================================== - Expo (React Native) - expo-sqlite (database) - expo-camera (QR scanner) - expo-print (PDF) - expo-sharing - expo-file-system UI: - Bottom Tabs: Home | Sales | Stock | Sales Log | Settings - Mobile-first design - Fast scanning experience ==================================================== OUTPUT REQUIREMENTS ==================================================== - Full folder structure - All screens implemented - Database setup - Fully working logic (NOT pseudo code) - Ready to run in Expo ==================================================== STRICT RULES ==================================================== - Do NOT skip any module - Do NOT store quantity directly - Do NOT break serial sequence - Do NOT hardcode QR fields - Maintain full data consistency - Ensure complete flow from QR → Sale → Invoice → Report
Sign in to leave a comment
No completed page designs yet.
Completed design pages will appear here when they are ready to preview.
No user flows yet.
The User Flow Agent will generate per-persona navigation diagrams after SRD updates.
No completed page designs yet.
Completed design pages will appear here when they are ready to preview.
No user flows yet.
The User Flow Agent will generate per-persona navigation diagrams after SRD updates.
No comments yet. Be the first!