Shelf is a local-first web app for cataloging physical books at home.
It is optimized for rapid ingestion and large personal collections, and works fully offline using IndexedDB + PWA caching.
- React + TypeScript + Vite
- Dexie.js (IndexedDB)
- TailwindCSS
- TanStack Table + TanStack Virtual
- Zustand
- React Hook Form
- Framer Motion
- Vite PWA plugin
pnpm install
pnpm devBuild and preview:
pnpm build
pnpm previewShelf uses one Dexie database named shelf-db with these tables:
books- schema:
id, title, author, isbn, *categories, *tags, readyToDonate, status, folderId, createdAt, updatedAt, deletedAt
- schema:
folders- schema:
id, name, sortOrder, createdAt, updatedAt
- schema:
categories- schema:
id, value, createdAt
- schema:
tags- schema:
id, value, createdAt
- schema:
settings- schema:
key, updatedAt
- schema:
drafts- schema:
key, updatedAt
- schema:
Books are soft-deleted using deletedAt to support undo/trash behavior.
- Instant add mode (title + author + Enter)
- Duplicate detection (fuzzy title/author)
- Draft autosave for form state
- Image upload options:
- camera capture
- drag/drop
- clipboard paste
- multi-image input
- Client-side image optimization/compression
- Gallery view (virtualized)
- Table view (TanStack Table + virtualized rows)
- Quick filters and global fuzzy search
- Bulk actions on selected books
- JSON export/import backup
- Storage usage indicator
- Soft-delete + undo toast
- Book detail drawer
- Keyboard shortcuts
- Persistent preferences (view/filter/theme/columns)
- PWA installability + offline behavior
- Light, dark, and system theme modes
src/
components/
features/books/
db/
hooks/
stores/
utils/
pages//focus searchnfocus new book input / open drawer on mobileggallery viewttable viewDeletemove selected books to trash
- Data stays local in the browser.
- No authentication is required.
- JSON backup/restore is available from the sidebar.