Skip to content

Book Scanner

Ilyes BEN BRIK edited this page Jul 18, 2026 · 1 revision

Book Scanner

The book scanner uses your phone's camera and AI to extract book information automatically.

Requirements

  • Google Gemini API Key (free) β€” set GEMINI_API_KEY in .env
  • Get your key at https://aistudio.google.com/apikey (no credit card needed)
  • Without the key, falls back to Tesseract OCR (lower accuracy for Arabic)

How to Scan

Scanning the Front Cover

  1. Go to πŸ“š Books β†’ πŸ“· Scan Book
  2. Select Front Cover mode
  3. Tap πŸ“· Take Photo β€” your phone camera opens
  4. Photograph the book's front cover (hold steady, good lighting)
  5. Tap πŸ” Analyze
  6. The AI extracts: Title and Author

Scanning the Back Page

  1. Select Back Page mode
  2. Photograph the back cover or last page (where ISBN usually is)
  3. Tap πŸ” Analyze
  4. The AI extracts: ISBN, Publisher, Publication Year

After Scanning

The results appear in editable fields:

  1. Review the extracted text β€” correct if needed
  2. Tap πŸ” Search in Library to check if you already own it
  3. If found β†’ tap to view the book
  4. If not found β†’ tap βž• Add this Book (pre-fills the form)

Tips for Better Results

Tip Why
Use good lighting Shadows confuse text recognition
Hold the phone parallel to the book Avoid perspective distortion
Capture the full cover Don't crop out author/title
Avoid glare Glossy covers reflect light
Clean background Place book on a solid surface

Supported Languages

The AI scanner reads:

  • πŸ‡ΈπŸ‡¦ Arabic (including calligraphic/decorative fonts)
  • πŸ‡¬πŸ‡§ English
  • πŸ‡«πŸ‡· French

Rate Limits (Free Tier)

Google Gemini free tier allows:

  • 15 requests per minute
  • 1,500 requests per day
  • Images are compressed to 800px before sending (saves quota)

If you hit the limit, wait 1 minute and try again.

Fallback: Tesseract OCR

If no GEMINI_API_KEY is configured, the app uses Tesseract OCR (installed in the container). OCR quality is lower, especially for:

  • Decorative/calligraphic Arabic fonts
  • Book covers with ornamental backgrounds
  • Low contrast text

The editable fields still let you correct OCR errors before searching.

Access Requirements

The scanner is available to Admin and User roles only (not Viewer).


Next: Managing Locations

Clone this wiki locally