seehiong/pdfusion
seehiong/pdfusion has 69 GitHub stars and 0 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-16 20:11 UTC. Last push 2026-11-12.
What you can do
- GitHub Pages Ready: Build (npm run build) and host the compiled static assets anywhere as a serverless SPA.
- Zero Data Leakage: All files are parsed inside your browser's sandbox and stored privately in your browser's IndexedDB. No files are uploaded to third-party servers except for OCR requests sent directly to your configured AI provider.
- Premium Light/Dark Mode: Dynamic aesthetic styles with glassmorphic cards, typography configurations (prose and prose-invert for high-contrast reading), and a fullscreen image zoom viewport.
- History Tracking: All previously analyzed documents are saved in your local database so you never lose your progress, and can be deleted individually at any time.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
A privacy-first PDF processing engine that runs entirely in your browser—deconstructing documents into text, images, and tables, then reconstructing them into pristine, structured Markdown. Static React SPA with client-side AI vision via Ollama, OpenRouter, or Gemini. Your files never leave your machine.
Web & AppsREADME.md
OriginalPDFusion: Browser-Based PDF Analyzer & Markdown Converter 🚀
PDFusion is a complete PDF analysis application that runs entirely in your web browser. It extracts text and page layouts from uploaded PDFs and outputs everything in clean, structured Markdown format. Because it is fully serverless, no server installation is required.
🔗 Live Demo: seehiong.github.io/pdfusion
🏔️ Technical Architecture
Core Stack
- Frontend: React 19 with TypeScript (Vite 7) & Tailwind CSS
- Routing: React Router 8 (declarative SPA routing)
- PDF Extraction: Mozilla's PDF.js (
pdfjs-dist) compiled to WebAssembly/JavaScript - Database: Browser-native IndexedDB for fast, local, and private storage of documents and page assets
- AI/LLM OCR: Direct client-side integration with Ollama (local), OpenRouter (cloud), Google Gemini (AI Studio), or any OpenAI-compatible custom endpoint
- Theme Engine: Localized dark/light mode toggle with local storage persistence
System Architecture
┌────────────────────────────────────────────────────────┐
│ Web Browser Sandbox │
│ │
│ ┌─────────────────┐ ┌──────────────────────┐ │
│ │ React UI │◀─────▶│ IndexedDB Database │ │
│ │ (Dark/Light) │ └──────────────────────┘ │
│ └────────┬────────┘ │
│ │ (PDF text & images) │
│ ▼ │
│ ┌─────────────────┐ │
│ │ PDF.js Parser │ │
│ └────────┬────────┘ │
│ │ │
└────────────┼───────────────────────────────────────────┘
│ (Page data URLs)
▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Local Ollama │or │ OpenRouter │or │ Google Gem. │or │ Custom │
│ (localhost) │ │ Cloud API │ │ (AI Studio) │ │ (OpenAI API) │
└──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
🚀 Getting Started
PDFusion runs entirely in the browser. There is no backend to configure and no environment variables to set — AI credentials are entered in the app's settings panel and stored in your browser.
Prerequisites: Node.js 22.22+
1. Installation
Install the project dependencies:
npm install
2. Start the Application
Run the Vite development server locally:
npm run dev
Open the URL printed in the terminal (http://localhost:5173 by default, or the next free port).
3. Build for Production
npm run build # outputs static assets to dist/
npm run preview # serve the production build locally
📦 Deployment
Pushing to main triggers the GitHub Actions workflow in .github/workflows/deploy.yml, which builds the app and publishes dist/ to GitHub Pages.
The site is served from a subpath (/pdfusion/), so two things are wired up for it:
vite.config.tssetsbaseto/pdfusion/for production builds, and React Router picks the same value up viaimport.meta.env.BASE_URLas itsbasename.- The workflow copies
index.htmlto404.html, so refreshing or deep-linking a client-side route is handled by the router instead of returning a Pages 404.
[!IMPORTANT] In the repository settings under Pages, the build source must be set to GitHub Actions. If you fork this project under a different repository name, update
REPO_BASEinvite.config.tsto match.
⚙️ AI Configuration (BYOK)
To run page layout reconstruction and visual OCR, configure your credentials in the Configure AI settings panel (accessible from the navbar).
[!TIP] PDFusion uses Isolated Profiles, meaning your API Keys, Base URLs, and Model IDs are saved independently for Ollama, OpenRouter, Google, and Custom endpoints. Switching between them preserves your settings for each provider without overwriting them.
Option A: Local Ollama (Offline)
- Ensure Ollama is running on your machine.
- Pull your favorite vision model (e.g.,
gemma4). - Set your provider to Ollama and Base URL to
http://localhost:11434. - Important CORS Step: Because browser security restricts client-side requests, you must run Ollama with CORS enabled:
- Windows (PowerShell):
$env:OLLAMA_ORIGINS="*" ollama serve - macOS / Linux (Terminal):
OLLAMA_ORIGINS="*" ollama serve
- Windows (PowerShell):
Option B: OpenRouter (Cloud API)
- Select OpenRouter in the Settings panel.
- Enter your OpenRouter API Key (use the Show/Hide toggle to confirm characters).
- Choose a vision-capable model ID (e.g.,
google/gemini-2.5-flashormeta-llama/llama-3.2-11b-vision-instruct:free).
Option C: Google Gemini (AI Studio Direct)
- Select Google Gemini in the Settings panel.
- Get a free API Key from Google AI Studio.
- Paste the key in the API Key input and click Save Settings (uses
gemini-2.5-flashmodel by default).
Option D: Custom (OpenAI-Compatible)
- Select Custom in the Settings panel.
- Enter the Base URL of any OpenAI-compatible
/chat/completionsendpoint. - Supply the API Key and vision-capable Model ID for that endpoint.
[!NOTE] Any self-hosted endpoint must send permissive CORS headers, since requests are made directly from the browser.
🎨 Key Features
- GitHub Pages Ready: Build (
npm run build) and host the compiled static assets anywhere as a serverless SPA. - Zero Data Leakage: All files are parsed inside your browser's sandbox and stored privately in your browser's IndexedDB. No files are uploaded to third-party servers except for OCR requests sent directly to your configured AI provider.
- Premium Light/Dark Mode: Dynamic aesthetic styles with glassmorphic cards, typography configurations (
proseandprose-invertfor high-contrast reading), and a fullscreen image zoom viewport. - Metadata Timestamps & Badges: Marks files in the dashboard grid with status indicators, formatted timestamp labels, and processing method badges (
AI VISIONvsFAST TEXT). - History Tracking: All previously analyzed documents are saved in your local database so you never lose your progress, and can be deleted individually at any time.
- Modes of Analysis:
- Fast Extraction: Direct text layout parsing using PDF.js. Free and instant.
- Vision Layout: Render pages to high-resolution canvases and perform visual OCR using local/cloud LLMs to reconstruct tables, math, headings, and formatting.
⚖️ License
This project is licensed under the MIT License.