bookbat Svelte Themes

Bookbat

scan book barcode / ISBN + export/import/merge lists to/from anywhere

BOOK BAT

no account. no cloud. no tracking. scan it. shelve it. own your data.

What This Repo Is

This monorepo contains two related clients:

  • BOOK BAT: the active Svelte app for scanning, organizing, annotating, importing, exporting, and sharing your library
  • BAOBAB: the Astro static site/client layer for presenting and publishing library data

The repo is fully client-side. No hosted app database. No user accounts. BOOK BAT stores your library in browser localStorage.

What BOOK BAT Does

  • scan ISBN barcodes with camera or type ISBN manually
  • fetch title, authors, publisher, cover, and other metadata
  • backfill synopsis from book APIs when available
  • organize books with status, rating, notes, tags, and language
  • search, filter, and sort your library
  • copy or share single-book info from the detail view
  • export library data as JSON, CSV, Goodreads CSV, LibraryThing TSV, or Google Sheets webhook payload
  • import library files and merge duplicate ISBNs safely
  • work offline as a PWA

Import Merge Rules

Imports do not replace your whole library.

When you import a file:

  • new ISBNs are appended as new books
  • duplicate ISBNs are merged into the existing book
  • personal fields are preserved and are not overwritten:
    • status
    • rating
    • notes
    • tags
    • date read
  • missing metadata can be filled from the imported file:
    • authors when the current author is just Unknown Author
    • ISBN-10
    • publisher
    • publish date
    • publish year
    • page count
    • language
    • subjects
    • synopsis
    • cover URL

Repo Structure

  • apps/webapp -> BOOK BAT Svelte 5 + Vite app
  • apps/astro-site -> BAOBAB Astro site
  • data/library.json -> canonical library dataset used for sync into app/site data

Stack

  • Svelte 5
  • Vite
  • Astro
  • Vitest
  • Biome
  • html5-qrcode

Run Locally

Install dependencies:

pnpm install

Run BOOK BAT:

pnpm dev:webapp

Run BAOBAB:

pnpm dev:astro

HTTPS Dev For Camera Testing

Generate local certificates:

pnpm certs:generate

Run the webapp over HTTPS:

pnpm dev:webapp:https

Then open:

  • https://localhost:5173
  • https://<your-lan-ip>:5173

Phone browsers may still require trusting the local certificate before camera APIs behave as a secure context.

Data Sync

The workspace syncs data/library.json into both apps.

Run manually:

pnpm data:sync
pnpm data:sync:dummy
pnpm data:apply ./my-export.json

Sync targets:

  • apps/webapp/src/public/library.json
  • apps/astro-site/src/data/library.json

Expected shape:

{
  "version": 1,
  "books": []
}

Build

Build BOOK BAT:

pnpm build:webapp

Build BAOBAB:

pnpm build:astro

Quality Gates

pnpm format
pnpm lint
pnpm test
pnpm build

For release preflight:

pnpm preflight

Netlify

Two Netlify sites are connected to this repo:

  1. bat.junglestar.org for BOOK BAT
  2. baobab.junglestar.org for BAOBAB

BOOK BAT

  • Base directory: repo root
  • Build command: pnpm build:webapp
  • Publish directory: dist/webapp
  • Config file: netlify.toml
  • Ignore/build gating: scripts/netlify-ignore-webapp.sh

BAOBAB

  • Base directory: apps/astro-site
  • Build command: pnpm -C ../.. build:astro
  • Publish directory: dist
  • Config file: apps/astro-site/netlify.toml
  • Ignore/build gating: scripts/netlify-ignore-astro.sh

Product URLs

License

CC BY-SA 4.0

Commercial

For SDK or commercial use, contact info@junglestar.org.

Top categories

Loading Svelte Themes