If not obvious, I'm letting you know this application was vibe-coded in 30 minutes, but it solves my problem and maybe yours too; feel free to improve it to meet your neds. I may look at PRs, but you'll likely just want to fork instead
A mobile-friendly web application for scanning ISBN barcodes and managing book collections. Built with TypeScript and HTML5, all data is stored locally using localStorage.
- ๐ Collection Management: Create, rename, and delete book collections
- ๐ท Barcode Scanning: Scan ISBN/EAN-13 barcodes using device camera
- ๐ Automatic Book Details: Fetches book information from Google Books API
- โ๏ธ Manual Entry: Add books manually if scanning isn't available
- ๐ฑ Mobile-First Design: Touch-friendly interface optimized for small screens
- ๐พ Local Storage: All data stored locally, no backend required
- ๐ Offline-Ready: Works without internet (except for fetching book details)
- TypeScript: Type-safe JavaScript
- HTML5 & CSS3: Modern web standards
- Html5Qrcode: Barcode/QR code scanning library
- Google Books API: Book information retrieval
- localStorage: Client-side data persistence
bookScan/
โโโ src/
โ โโโ app.ts # Main application logic
โ โโโ types.ts # TypeScript interfaces
โ โโโ storage.ts # localStorage management
โ โโโ scanner.ts # Barcode scanning service
โ โโโ booksAPI.ts # Google Books API integration
โ โโโ utils.ts # UI utilities
โโโ dist/ # Compiled JavaScript (generated)
โโโ index.html # Main HTML file
โโโ styles.css # Mobile-first CSS
โโโ package.json # Dependencies
โโโ tsconfig.json # TypeScript configuration
- Node.js (v18 or higher)
- npm or yarn
- Modern web browser with camera support
- Install dependencies:
npm install- Compile TypeScript:
npm run buildWatch for changes and recompile automatically:
npm run watchThen serve the application using a local web server:
npm run serveOpen your browser to http://localhost:8080
For production deployment, simply host the following files on any web server:
index.htmlstyles.cssdist/directory- The Html5Qrcode library (loaded via CDN in index.html)
Note: For camera access, your site must be served over HTTPS (except for localhost during development).
- Click "+ New Collection" button
- Enter a name for your collection
- Click "Create"
- Open a collection
- Click "๐ท Scan Book"
- Grant camera permissions if prompted
- Point camera at ISBN barcode
- Book details are fetched automatically from Google Books API
- Open a collection
- Click "โ๏ธ Add Manually"
- Fill in book details (title is required)
- Click "Add Book"
- Rename: Click menu icon (โฎ) โ "โ๏ธ Rename"
- Delete: Click menu icon (โฎ) โ "๐๏ธ Delete Collection"
- Delete: Click the ๐๏ธ icon on any book card
- ISBN-13 (EAN-13)
- ISBN-10
The scanner is specifically configured to recognize ISBN barcodes used on books.
The app uses the free Google Books API to fetch book details:
- Endpoint:
https://www.googleapis.com/books/v1/volumes - Query:
?q=isbn:{isbn_number} - No API key required for basic usage
- Rate limits: Standard Google API limits apply
- โ Chrome/Edge (Android/Desktop)
- โ Safari (iOS/macOS)
- โ Firefox (Android/Desktop)
โ ๏ธ Requires camera permissions for scanning
- Minimum tap target size: 48ร48px
- Large, easy-to-tap buttons
- Responsive grid layout
- Touch-friendly gestures
- No accidental text selection
- Optimized viewport for mobile devices
All data is stored in browser localStorage:
- Key:
bookScan_collections - Format: JSON array of collections
- Persistence: Data persists until explicitly cleared by user
- Capacity: Typically 5-10MB per domain (browser-dependent)
See TODO.md for detailed implementation tasks and future enhancements.
- Storage: Limited by browser localStorage capacity
- Offline: Cannot fetch book details without internet connection
- Camera: Requires device with camera and HTTPS connection
- Export: No data export/import functionality yet (planned)
- API Limits: Google Books API has usage limits
- Export/import collections to JSON or CSV
- Barcode scanning from image files
- Book cover upload for manual entries
- Search within collections
- Sort and filter options
- Statistics and reading progress tracking
- Dark mode support
- PWA support for offline functionality
- Bulk operations (delete multiple books)
- Ensure you're accessing via HTTPS (or localhost)
- Grant camera permissions in browser settings
- Check if other apps can access the camera
- Try a different browser
- Verify the ISBN is correct
- Try entering manually
- Check internet connection
- Some books may not be in Google Books database
- Clear browser cache and data
- Export collections (when feature is available)
- Delete unused collections
MIT License - Feel free to use and modify for your projects.
Contributions welcome! Please feel free to submit issues or pull requests.
- Html5Qrcode by Minhaz
- Google Books API