### Build from source: npm install and dev/build commands Source: https://github.com/ademking/betterviewer/blob/master/README.md Setup commands for developing and building the project. Run npm install first, then use npm run dev to start the web app locally, npm run build to build the web app, and npm run build:ext to build the browser extension. ```bash npm install npm run dev # web app at http://localhost:5173 npm run build # web app → dist/ npm run build:ext # extension → build/chrome, build/firefox (+ store .zip files) ``` -------------------------------- ### Project structure: directory layout and component roles Source: https://github.com/ademking/betterviewer/blob/master/README.md Project structure overview showing the main directories and their purposes. Includes components for UI, viewer, tools, and panels; hooks for interactions; state management; lib for core logic; extension files; and build scripts. ```text src/ components/ ui/ Shark UI components (registry source, a few small fixes) viewer/ ImageViewer, ViewerCanvas (Konva stage), ImageNode, annotation nodes, overlays (measure, rulers, spotlight), toolbar, info bar tools/ crop, straighten, draw, shapes, text, emoji, blur, spotlight, measure, adjustments, color picker, OCR, QR… panels/ floating panels and dialogs (settings, layers, histogram, command palette, upload, compress, resize, about…) hooks/ canvas interactions, keyboard shortcuts, image loading state/ document (undoable history), ui, settings, measure, draft lib/ viewport, actions, develop pipeline (+ worker), straighten warp (+ worker), background removal (+ worker), OCR, QR (+ worker), mipmaps, uploads, platform (web vs. extension), openUrl… extension/ content.js, background.js, icons scripts/ build-extension.mjs (manifests + zips), build-emoji-data.mjs ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.