A Vue.js web application for scanning GS1 barcodes and generating CSV files for DSCSA compliance import.
- GS1 Barcode Parsing: Parse GS1 barcodes in both formatted
(AI)and raw formats - Product Management: Store and manage product information (GTIN, NDC, descriptions, etc.)
- Partner Management: Manage trading partners with GLN information
- Interactive Scanning Workflow:
- Collect transaction metadata (PO number, dates, etc.)
- Select trading partners (Sold By, Sold To, Ship From, Ship To)
- Scan items with automatic product detection
- Duplicate Serial Detection: Warns when scanning duplicate serial numbers
- CSV Export: Generate DSCSA-compliant CSV files for import into Odoo or other systems
- Local Storage: All data persists in browser localStorage
- Vue 3: Frontend framework with Composition API
- Vite: Build tool and dev server
- Tailwind CSS: Utility-first CSS framework
- localStorage: Client-side data persistence
-
Navigate to the project directory:
cd dscsa-web-scanner -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to the URL shown (usually
http://localhost:5173)
Before scanning, add your frequently scanned products:
- Click on "Manage Products" tab
- Click "Add Product"
- Enter product information (all fields required):
- GTIN
- NDC
- Proprietary Name
- Strength
- Dosage Form
- Container Size
- Manufacturer
- The Product Description will be automatically generated from: Proprietary Name + Strength + Dosage Form + Container Size
- Click "Add Product"
Products are stored in localStorage and will be automatically detected when scanning.
Add your trading partners (all four types are required for scanning):
- Click on "Manage Partners" tab
- Click "Add Partner"
- Select partner role:
- Sold By
- Sold To
- Ship From
- Ship To
- Enter partner name and GLN
- Click "Add Partner"
- Click on "Scan Items" tab
- Enter transaction details:
- PO Number (required)
- Delivery Document Number (optional)
- Transaction Date (defaults to today)
- Shipment Date (defaults to today)
- Direct Purchase (Yes/No)
- Click "Next: Select Partners"
- All partner fields are required: Sold By, Sold To, Ship From, Ship To
- Select partners from your saved list
- If you don't have partners saved, you must add them first in the "Manage Partners" tab
- Click "Start Scanning"
- Focus on the barcode input field
- Scan barcode or paste barcode data
- Press Enter or click "Add Item"
For Known Products:
- Product info is automatically filled from your saved products
- Item is added to the list immediately
For New Products:
- A form appears to enter product information
- All fields are required: NDC, Proprietary Name, Strength, Dosage Form, Container Size, Manufacturer
- Product Description is automatically generated from: Proprietary Name + Strength + Dosage Form + Container Size
- Click "Save & Add Item"
- Product is saved for future scans
Duplicate Serial Detection:
- If you scan the same serial number twice, you'll get a warning
- Choose whether to proceed or skip
- Review your scanned items list
- Remove any items if needed
- Click "Export CSV" to download the file
- The filename will be based on your PO number (e.g.,
PO12345_dscsa.csv)
Click "Reset" to start a new scanning session (all scanned items will be cleared).
The scanner supports GS1 barcodes in multiple formats:
(01)00312345678901(17)251231(10)LOT123(21)SN789
01003123456789011725123110LOT12321SN789
- 01: GTIN (14 digits)
- 10: Lot Number (variable length)
- 17: Expiration Date (YYMMDD format)
- 21: Serial Number (variable length)
The exported CSV includes these columns:
- Transaction Date
- Shipment Date
- PO Number
- Del Document Number
- Direct Purchase
- NDC
- GTIN
- Serial Number
- Lot
- Lot Expiry Date
- Product Description
- Proprietary Name
- Dosage Form
- Strength
- Container Size
- Manufacturer Name
- Sold By Name / GLN
- Sold To Name / GLN
- Ship From Name / GLN
- Ship To Name / GLN
All data is stored in browser localStorage:
- Partners:
dscsa_partners - Products:
dscsa_products
Data persists across browser sessions and page refreshes. To clear all data, use your browser's developer tools to clear localStorage.
To build the application for production:
npm run buildThe built files will be in the dist/ directory. You can deploy these to any static hosting service.
To preview the production build:
npm run previewThis application works in all modern browsers that support:
- ES6+ JavaScript
- localStorage
- CSS Grid and Flexbox
Recommended browsers:
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Enter in barcode input: Add scanned item
- Focus automatically returns to barcode input after each scan for quick scanning workflow
- Pre-configure Products: Add commonly scanned products beforehand to speed up scanning
- Pre-configure Partners: Set up your trading partners once to reuse them
- Use Barcode Scanner: Physical barcode scanners work best (simulate keyboard input)
- Keep Browser Tab Active: Ensure the scanner tab is active when scanning for best performance
Barcode not parsing:
- Ensure the barcode contains valid GS1 Application Identifiers
- Check that GTIN (AI 01) is present in the barcode
- Try copying and pasting the barcode data to verify format
Data not persisting:
- Check that your browser allows localStorage
- Ensure you're not in private/incognito mode
- Check browser localStorage quota (typically 5-10MB)
CSV not downloading:
- Check browser download settings
- Ensure pop-ups are not blocked
- Try a different browser
This application is provided as-is for DSCSA compliance purposes.