Barcode generation
Barcode generation is a must-have for apparel POS because it powers: fast checkout receiving transfers physical counts label printing returns lookup If FlowPOS does barcode well, operations get much faster. Here’s what to add for Product & Catalog → Barcode generation. What “Barcode generation” means (business meaning) You need to support two barcode modes: External barcode (UPC/EAN from manufacturer) Internal barcode (FlowPOS-generated for your client) Apparel often needs internal barcodes because: boutique brands don’t have UPC/EAN variants are created in-store price tags must be printed Core concept (very important) Barcode belongs to the variant (SKU), not the product. ✅ product_variant.barcode Everything else scans variant. Barcode types you should support For retail, the practical ones: EAN-13 (common globally) UPC-A (common US) Code128 (excellent for internal barcodes, flexible) QR (optional: can encode more data like variant id) Recommendation for MVP internal barcodes: Code128 It’s easy, supports many chars, prints well. What you must track Variant-level fields barcode value (string) barcode type (EAN13/UPC/Code128/QR) barcode source (external | internal) status (active | retired) Optional but useful last printed date print count label template used Database additions (recommended)
- Add to product_variant barcode (nullable, unique per business) barcode_type barcode_source Add unique constraint: (business_id, barcode) unique where barcode is not null This prevents duplicates (critical).
- Optional: barcode history table (Phase 2) If you ever change barcodes: barcode_assignment id business_id variant_id barcode barcode_type assigned_at assigned_by retired_at (nullable) MVP can skip and keep barcode immutable. Backend functionality you need Core endpoints generate barcode(s) for variants assign barcode manually validate uniqueness bulk generate for product matrix Barcode generation rules (internal) You need a deterministic strategy: Good MVP approach prefix by business (short code) include variant id (or SKU) include check digit (optional) Example internal barcode formats: FP-{BUS}-{VARIANT_SHORT} numeric-only if you want simpler scanners Best practice: keep it short, printable, unique. Frontend screens (PWA) Variant matrix editor (perfect place) Add actions: “Generate barcodes for selected variants” “Set barcode manually” “Print labels” Show: barcode value type/source icon
Label printing (barcode is useless without this) You need a label template system (even simple): Label contents typically: product name variant (Size/Color) price (optional) barcode (scannable) SKU MVP: 1–2 templates is enough. Operational flows that depend on barcode When you implement barcode, you unlock: Scan in POS (checkout) Scan in receiving Scan in transfer picking Scan in physical count Scan in returns/exchange So barcode should be usable everywhere with the same scanner behavior. Reports (Metabase) Barcode itself isn’t a report, but you’ll want: variants missing barcode duplicate barcode attempt logs label printing activity (optional) MVP vs Phase 2 ✅ MVP barcode generation barcode fields on product_variant unique constraint bulk generation tool manual override label printing basic 🚀 Phase 2 barcode history multiple barcodes per variant (rare but possible) QR encoding for fast lookup mobile camera scanning optimization template designer for labels per-location label price formatting Biggest edge cases (important) duplicate barcode collisions (must block) changing barcode after stock exists (avoid) barcode differs per supplier packaging barcode printed with old price then markdown happens (policy) scan speed (search must be indexed) Key recommendation for FlowPOS (apparel positioning) If you want FlowPOS to scream “built for apparel”: ✅ Variant matrix editor + barcode generation + label printing is one of your strongest product demos. If you share: how you currently represent product and variant (or your current schema), I can propose the cleanest barcode format + how to generate it safely (no collisions, multi-tenant safe, human-friendly).