Privacy-first conversion and utility tools for documents, images, data, media, and measurement workflows.
This repository powers the ConvertPrivately product: a React frontend with a Flask API for OCR and file conversion, plus supporting Cloudflare workers for payments and YouTube-related flows.
- PDF and image to
DOCX,TXT,XLSX, andMarkdown - Client-side file, image, data, text, and unit-conversion tools
- OCR-based extraction using Tesseract
- Website-to-document utilities
- Stripe-backed credit flows
- YouTube AI tooling backed by Gemini
- Programmatic SEO pages and prerendered static frontend output
- Privacy-first by default
- Client-side processing whenever possible
- Minimal upload surface for tasks that require backend processing
- Fast, utility-oriented UX
- SEO-friendly static delivery for the frontend
- Location: api/frontend
- Stack: React 19, TypeScript, Vite, React Router, Tailwind
- Deployment target: Cloudflare Pages
- Output: prerendered static pages plus lazy-loaded tool routes
- Location: api
- Stack: Flask, Gunicorn, Tesseract OCR, Poppler, Playwright
- Deployment target: containerized service such as Cloud Run
- Purpose: OCR, document conversion, webpage fetch/render fallback, payments, contact handling, AI proxying
- Location: worker
- Purpose: payment and YouTube transcript supporting flows
- Convert PDFs and supported images through convert.py
- Supported inputs:
.pdf,.jpg,.jpeg,.png,.webp,.tiff,.tif,.bmp - Supported outputs:
docx,txt,xlsx,md - OCR language support includes English, Italian, German, French, Spanish, Portuguese, Dutch, and Polish
- Document tools
- Image tools
- Audio and media tools
- Validators and diff tools
- Text and developer utilities
- Large unit-conversion suite with shared conversion logic
- Public URL fetch endpoint in webpage.py
- Playwright fallback for JS-heavy pages when enabled
.
├── api/
│ ├── app/ # Flask app, routes, services, utilities
│ ├── config/ # Runtime settings
│ ├── frontend/ # React/Vite frontend
│ ├── tests/ # API tests
│ └── Dockerfile # API container image
├── worker/ # Cloudflare Workers
├── UNIT_CONVERSION_ROADMAP.md
├── LEGAL_CHANGELOG.md
└── README.md
Requirements:
- Node.js 20+
- npm
Install and run:
cd api/frontend
npm install
npm run devUseful commands:
npm test
npm run buildThe Vite dev server proxies /api requests to http://localhost:8080.
Requirements:
- Python 3.11+
- Tesseract OCR
- Poppler
- Chromium dependencies if using Playwright locally
Create an environment and install dependencies:
cd api
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtRun locally:
python app/main.pyDefault local API address:
http://localhost:8080
Health check:
GET /api/health
The API image is defined in api/Dockerfile.
Build:
cd api
docker build -t convertprivately-api .Run:
docker run --rm -p 8080:8080 convertprivately-apiThe image installs:
- Tesseract OCR with multiple language packs
- Poppler utilities
- Playwright Chromium
Runtime configuration is defined in settings.py.
Important environment variables:
PORTDEBUGMAX_FILE_SIZE_MBDEFAULT_DPIDEFAULT_LANGUAGERATE_LIMIT_PER_MINUTEALLOWED_ORIGINENABLE_WEBPAGE_JS_RENDERWEBPAGE_JS_TIMEOUT_SECONDSWEBPAGE_JS_SETTLE_MSJWT_SECRETPAYMENT_WORKER_URLGOOGLE_CLOUD_API_KEYGEMINI_MODELCONTACT_RECIPIENT_EMAILSMTP_HOSTSMTP_PORTSMTP_USERNAMESMTP_PASSWORDSMTP_FROM_EMAILSMTP_FROM_NAME
Batch Pro now uses the Cloudflare payment worker plus D1 as the source of truth for remaining batch balances.
Required worker-side setup:
- create the D1 database referenced by worker/payment/wrangler.toml
- replace the placeholder
database_id - apply the migration in worker/payment/migrations/0001_batch_entitlements.sql
- set worker secrets and vars:
STRIPE_SECRET_KEYSTRIPE_PRICE_IDJWT_SECRETFRONTEND_URLCREDIT_PACK_SIZEFRONTEND_BATCH_ITEM_LIMIT
Required API-side setup:
- set
PAYMENT_WORKER_URLso the Flask backend can consume and refund backend batch usage against the worker-managed D1 ledger
POST /api/convertPOST /api/batch-convertPOST /api/convert/info
POST /api/webpage/fetch
- health
- payment
- contact
- AI proxy
See api/app/routes for the full route set.
cd api/frontend
npm testThere are API tests under api/tests. Run them with your preferred Python test runner after installing backend dependencies.
- Frontend: Cloudflare Pages
- API: separate containerized deployment
- Workers: Cloudflare Workers
This split keeps the static frontend fast and cacheable while reserving backend compute for OCR, document conversion, payments, and AI-assisted flows.
- The frontend contains a large number of utility pages and lazy-loaded routes.
- Many tools are fully client-side and do not send user files to the backend.
- Backend-heavy flows are isolated to the API and protected with rate limiting or credit gating where needed.
No license file is currently present in this repository. Add one before publishing or accepting external contributions.