Skip to content

feat: v2 complete rewrite — modern static web app#24

Open
UberKitten wants to merge 13 commits into
masterfrom
v2-rewrite
Open

feat: v2 complete rewrite — modern static web app#24
UberKitten wants to merge 13 commits into
masterfrom
v2-rewrite

Conversation

@UberKitten
Copy link
Copy Markdown
Owner

@UberKitten UberKitten commented Feb 21, 2026

barcOwned v2

Complete rewrite as a modern static web app. No server required!

What's New

Tech Stack

  • Vite + TypeScript + vanilla JS
  • bwip-js via npm (replaces vendored BWIPP blobs)
  • CodeMirror 6 for JSON editing
  • 100% client-side, deploys to GitHub Pages

Features

  • 🎯 Single-page app — Editor, Runner, Share all in one
  • 📱 Mobile-first runner — fullscreen barcode display, optimized for phone→scanner
  • 🔗 URL sharing — encode payload in URL hash, generate QR code to transfer to phone
  • 💾 LocalStorage — payloads persist locally, import/export JSON
  • Live preview — see barcodes update as you edit

Core Engine

  • Fully ported to TypeScript with JSDoc documentation
  • Symbol scanner model with all ADF capabilities preserved
  • Type definitions for payloads, rules, actions, criteria
  • Extensible model system for adding new scanners

Screenshots

Run it locally:

npm install
npm run dev

Still TODO

  • List mode (for printing)
  • C40 DataMatrix aggregation optimization
  • GitHub Pages deployment workflow
  • Comprehensive docs (concepts, ADF explainer, contributor guide)
  • Visual payload builder (stretch goal)

Migration

The payload JSON format is unchanged — existing payloads work as-is!

Complete rewrite of barcOwned as a static SPA:
- Vite + TypeScript + vanilla JS (no framework)
- Single-page app with Editor, Runner, and Share tabs
- LocalStorage for payload persistence
- URL hash sharing for QR-code-to-phone workflow
- Mobile-first barcode display with fullscreen support
- CodeMirror 6 for JSON editing with live preview
- bwip-js npm package for barcode rendering

Core engine ported to TypeScript with full documentation.
Symbol scanner model preserved with all ADF capabilities.

WIP - still needs:
- List mode for printing
- C40 DataMatrix aggregation
- More documentation
- GitHub Pages deployment config
The <dialog> element is hidden by default, but setting display:flex
overrode that behavior. Now only apply flex when [open] attribute is present.

Also added puppeteer-core dev dep for testing.
- Replace three-tab layout with sidebar + single scrollable view
- Left sidebar always visible with payload list (presets + user payloads)
- Main area shows selected payload with three sections:
  - Editor: collapsible, starts collapsed for presets, expanded for new/user payloads
  - Run: scanner controls, barcode display, progress, navigation
  - Share: local QR rendering via bwip-js (no external API)
- Remove top tab navigation (kept nav bar with logo + links)
- Mobile responsive: sidebar collapses to hamburger menu
- Fix QR codes: replaced external api.qrserver.com with bwip-js local rendering
- Restructured UI from runner-focused to editor-centric layout
- Three-column IDE: payload list | code editor | barcode preview
- Editor is now the main area with full-height CodeMirror
- Added VS Code-style toolbar with Save, Validate, Run, Share buttons
- Added status bar showing validation state and cursor position
- Right sidebar shows live barcode preview with setup/payload labels
- Run mode is now a temporary view, not a primary panel
- Share shows in a modal/popover instead of inline section
- Default selects 'Hello World' preset on load
- Preview labels show 'Setup 1/8', 'Payload 1/1' style annotations
- Setup barcodes have warning-colored border, payload barcodes green
…r location

- Replace all emoji icons with Lucide SVG icons (icons.ts module)
- Remove redundant Validate button (live validation on keystroke)
- Replace all alert() calls with inline UI feedback:
  - Import errors show below textarea
  - Runner 'no barcodes' shows as inline message
  - Export button disabled when no payloads
- Add error location highlighting in editor:
  - Parse JSON error line/col from browser error messages
  - Show diagnostic via CodeMirror lint gutter
  - Status bar clickable to jump to error
- Increase font sizes and spacing:
  - Base: 15px, CodeMirror: 14px
  - space-sm: 10px, space-md: 20px
  - Larger nav, toolbar, sidebar padding
  - More margin between preview items
- Install @codemirror/lint for diagnostics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant