// self-hosted
Your infrastructure, your data
Install it on your own server. Documents are processed and discarded on hardware you control — nothing is sent to a third-party extraction API.
$ open‑source · self‑hosted · MIT license
DocCompiler is a self-hosted REST API that turns PDFs, Word docs, spreadsheets and CSVs into normalized, token-efficient text — so you stop paying to ship raw files to your models, and stop trusting a third party with your documents.
// what it does
// self-hosted
Install it on your own server. Documents are processed and discarded on hardware you control — nothing is sent to a third-party extraction API.
// format coverage
One endpoint, every common document type. Legacy .doc and .xls are normalized automatically before extraction.
// ocr fallback
Each PDF page is checked for a real text layer. Pages without one are routed through OCR automatically — no flag to set, no job to babysit.
// queue-based
Built on Laravel Horizon. Large files, OCR jobs and spreadsheet parsing all run off the request/response cycle.
// mime verified
Every upload is checked against its real file signature before processing — the same defense-in-depth you'd want in your own code.
// production ready
Health checks, queue monitoring and metrics ship with the project — point your existing Grafana or Filament panel at it and go.
// the pipeline
Send any supported file to the REST API, with a bearer token issued from your own dashboard.
The real MIME type is sniffed from the file's contents and cross-checked against its extension.
The matching engine runs — native text extraction, spreadsheet parsing, or page-level OCR when needed.
Headings, tables and structure are rebuilt into clean, consistent Markdown — regardless of source format.
You get back plain, structured text — ready to drop straight into a prompt, no file handling on your side.
// quickstart
Clone the repo, bring up the stack, and issue yourself an API key from the included admin panel. No accounts, no external services, no per-page pricing.
git clone https://github.com/procodigo/doccompiler.git cd doccompiler cp .env.example .env docker compose up -d
curl -X POST http://localhost/api/v1/documents \ -H "Authorization: Bearer YOUR_TOKEN" \ -F "[email protected]"