Commercial-ready, multi-user bookshelf visualizer and spine cataloging platform. Designed specifically for smartphones with direct camera capture, Supabase Authentication & PostgreSQL, Supabase Storage, and an asynchronous Task Queue for AI Vision model inference (configured via .env to use Google Gemini or OpenAI).
- Mobile-First PWA: Native camera shutter button (
capture="environment"), pinch-to-zoom SVG spine overlays, and a swipe-up Bottom Sheet drawer for book editing. - Supabase Authentication: Secure user isolation with Row Level Security (RLS). Users only see and manage their own bookshelf collections.
- Supabase Storage: Direct cloud object storage in the
shelf-imagesbucket with user-isolated folder policies. - Asynchronous Task Queue: Background processing queue (
pipeline_jobs) running vision segmentation, structured OCR, fore-edge filtering, and Open Library canonical enrichment (3 req/s). Vision engine is controlled strictly via theMODEL_NAMEswitch in.env(gemini-3.8-flashby default, or OpenAI models likegpt-6.1-sol/gpt-4o). - One-Click Excel Export: Generates professional, styled
.xlsxspreadsheets with auto-fitted columns, frozen headers, and text-safe ISBNs. - Render Ready: Complete
render.yamlandProcfileconfigured for deployment on Render's free tier.
- Open your Supabase Dashboard: https://supabase.com/dashboard
- Go to SQL Editor
$\rightarrow$ New Query. - Copy and paste the contents of
supabase/schema.sqland click Run. - Go to Storage: Ensure the bucket
shelf-imagesis created and set to public read.
Create .env in shelf_scanner_app/:
SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key
GEMINI_API_KEY=your-gemini-api-key
MODEL_NAME=gemini-3.8-flash
# Optional if using OpenAI models (e.g. gpt-6.1-sol, gpt-4o):
OPENAI_API_KEY=sk-proj-...
PORT=8000# Install dependencies
pip install -r requirements.txt
# Start the FastAPI server with in-process worker
uvicorn backend.main:app --host 0.0.0.0 --port 8000 --reloadOpen http://localhost:8000 in your browser (or your phone's browser connected to the same local Wi-Fi).
- Push this repository to your GitHub account:
git add shelf_scanner_app/ git commit -m "Add ShelfScanner mobile app" git push origin main - Log in to Render.
- Click New +
$\rightarrow$ Blueprint (or Web Service). - Connect your GitHub repository. Render will automatically detect
render.yamlorProcfile. - Under Environment Variables, add:
SUPABASE_URLSUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYGEMINI_API_KEY-
MODEL_NAME(default:gemini-3.8-flash) -
OPENAI_API_KEY(optional, only needed if switchingMODEL_NAMEto an OpenAI model)
- Click Create Web Service. Your live mobile app URL will be available at
https://shelf-scanner-mobile.onrender.com!
shelf_scanner_app/
├── backend/
│ ├── main.py # FastAPI server, auth verification, and API routes
│ ├── worker.py # Asynchronous task queue worker
│ ├── pipeline.py # Vision model & Open Library enrichment pipeline
│ └── exporter.py # Styled OpenPyXL XLSX spreadsheet generator
├── frontend/
│ ├── index.html # Mobile-first PWA interface
│ ├── styles.css # Touch-optimized dark theme styling
│ └── app.js # Supabase Auth, camera shutter, and drawer interactions
├── supabase/
│ └── schema.sql # PostgreSQL schema, RLS policies, and storage setup
├── render.yaml # Render Blueprint deployment config
├── Procfile # Process definitions for cloud hosting
├── requirements.txt # Python dependencies
└── .env # Secret environment variables (ignored by git)