Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Book Bot

A web app that scans book covers with AI and catalogs them into a Notion database. Built for the Berlin Chinese Books Community Library (柏林精神卫生中心).

Upload a photo of a book cover, and the app will extract the title, author, publisher, category, and language — then save it directly to your Notion library database.

Stack

  • Frontend: Static HTML/CSS/JS
  • Backend: Cloudflare Pages Functions
  • AI: Google Gemini 3.1 Flash (vision)
  • Database: Notion API

Setup

1. Install dependencies

npm install

2. Configure environment

Copy the example file and fill in your keys:

cp .dev.vars.example .dev.vars

You need:

  • Google Gemini API key(s) from Google AI Studio
  • Notion integration token from notion.so/my-integrations
  • Notion database ID — the database must have these properties:
    • 书名 (title)
    • 书籍拥有者 (rich_text)
    • 作者 (rich_text)
    • 借阅状态 (status: 可借 / 已借出)
    • 出借周期 (rich_text)
    • 出版信息 (rich_text)
    • 分类 (select)
    • 联系方式 (rich_text)
    • 语言 (select)

3. Run locally

npm run dev

Opens at http://localhost:8788.

4. Deploy to Cloudflare Pages

npx wrangler pages project create book-bot

Set secrets:

npx wrangler pages secret put GOOGLE_API_KEY --project-name book-bot
npx wrangler pages secret put NOTION_TOKEN --project-name book-bot

Also set NOTION_DB_ID in wrangler.toml.

Deploy:

npm run deploy

License

MIT

About

A web app that scans book covers with AI and catalogs them into a Notion database. Built for the Berlin Chinese Books Community Library (柏林精神卫生中心). Upload a photo of a book cover, and the app will extract the title, author, publisher, category, and language — then save it directly to your Notion library database.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages