This repo is now a small monorepo:
backend/: Flask + Tesseract OCR API (Cloud Run-friendly)frontend/: original React (Vite) UI (single image →/extract)frontend-v2/: “Book OCR (no login)” workflow UI (PDF/images → per-page OCR → proofread → export)
For production deployment, the recommended approach is decoupled:
frontend-v2/on Firebase Hostingbackend/on Cloud Run
See:
cd backend
export PORT=8080
export DISABLE_QUOTA=1
./venv/bin/python app.pycd frontend
npm install
npm run devOpen http://localhost:5173/.
frontend/vite.config.js proxies /extract to http://localhost:8080 during development.
cd backend
./venv/bin/python -m pytest -q- Recommended: docs/DEPLOYMENT.md
- Deep-dive / rationale: docs/DEPLOYMENT_APPROACH_1_STATIC_FRONTEND_CLOUDRUN_BACKEND.md
- Archived options (single-service Cloud Run, Vercel rewrites): docs/ARCHIVED_DEPLOYMENT_OPTIONS.md
Recommended runtime env vars:
DAILY_LIMIT: daily request limitOCR_LANGUAGE: default OCR languageFIRESTORE_DATABASE: Firestore DB nameDISABLE_QUOTA: set to0in production
- Upload:
multipart/form-datawithimage - Optional:
langquery param (tel,kan,hin,eng)
Response:
{ "status": "success", "text": "..." }