English | 日本語
Docutor converts messy enterprise documents into clean, agent-readable Markdown.
The target users are traditional Japanese companies with important specifications, workflows, and business rules trapped in PowerPoint, Word, PDF, and diagram-heavy documents.
Docutor is not intended to be a simple OCR or file conversion tool. The goal is to transform unstructured business documents into structured knowledge assets that both humans and AI agents can inspect, correct, and use.
Watch with sound and full resolution
-
Node.js >= 22.13 — the repo pins
22.22.0in.nvmrc; runnvm useif you use nvm. -
pnpm 11.7.0, managed via Corepack (bundled with Node). Run
corepack enableonce ifpnpmisn't resolving to the pinned version. -
Python 3 with
pdfplumberandPillowfor document extraction:pip install pdfplumber Pillow
-
Poppler utilities (
pdftoppm,pdfinfo,pdftotext) for PDF text and page-image extraction:brew install poppler # macOS -
LibreOffice (
sofficeon yourPATH) for rendering DOCX/PPTX pages to images:brew install --cask libreoffice # macOS -
An OpenAI API key if you want real conversions — the
mockprovider works without one.
git clone https://github.com/EitaroY/Docutor.git
cd Docutor
nvm use # optional, matches the Node version pinned in .nvmrc
pnpm install
cp sample.env.local .env.localOpen .env.local and set OPENAI_API_KEY (or leave DOCUTOR_LLM_PROVIDER=mock to run without one).
pnpm devThen open http://localhost:3000.
pnpm dev— start the Next.js dev serverpnpm build— production buildpnpm lint— run ESLintpnpm test— run the Vitest unit test suite
- Upload a PowerPoint, Word, PDF, or diagram-heavy business document.
- Extract text, images, tables, and diagram candidates.
- Convert extracted content into structured Markdown sections.
- Review each generated section.
- Compare original diagram captures with generated Mermaid or draw.io output.
- Edit diagram code when needed and preview the result.
- Accept reviewed sections.
- Complete the review.
- Export the final Markdown file and related assets.
The MVP prioritizes the review experience over perfect document parsing.
Required capabilities:
- File upload
- Mock conversion pipeline
- Review screen
- Reviewable section list
- Markdown editor and preview
- Diagram comparison UI
- Mermaid code editing and preview
- Complete action
- Markdown export
- ZIP export with related assets
Office and PDF parsing can initially be partial or mocked, but the architecture must allow real parsers and LLM/VLM providers to be added later.
Diagram conversion should be human-in-the-loop by design.
LLM/VLM output will often be imperfect, especially for arrows, grouping, layout, branching, and ambiguous relationships. The key workflow is therefore:
- Show the original diagram image.
- Show the generated Mermaid or draw.io representation.
- Allow users to edit the generated code.
- Preview the updated diagram.
- Accept, reject, or regenerate the section.
For diagrams, Docutor prioritizes semantic correctness over pixel-perfect layout:
- Node labels
- Arrow direction
- Relationships
- Branching conditions
- Grouping
- Hierarchy
- Workflow order
- TypeScript
- Next.js
- React
- Tailwind CSS
- shadcn/ui where useful
- Mermaid.js
- Node.js / Next.js API routes
draw.io support may start as a placeholder, but the diagram interface should be designed so a diagrams.net viewer or editor can be integrated later.
Documents are made of reviewable sections.
type SectionType =
| "heading"
| "paragraph"
| "table"
| "diagram"
| "image"
| "requirement"
| "note";
type ReviewStatus = "pending" | "accepted" | "rejected" | "regenerating";
type ReviewSection = {
id: string;
type: SectionType;
title: string;
sourcePage: number;
originalText?: string;
sourceImage?: string;
generatedMarkdown: string;
reviewStatus: ReviewStatus;
};
type DiagramSection = ReviewSection & {
type: "diagram";
sourceImage: string;
format: "mermaid" | "drawio";
generatedCode: string;
};Docutor supports two conversion modes:
mock: Works without API keys and returns a sample converted document.real: Uses a provider interface so OpenAI, Anthropic, Gemini, or another provider can be swapped in later.
The app should not be hard-coded around one LLM provider.
When converting documents:
- Preserve the original meaning.
- Do not invent missing rules.
- Do not silently fill gaps.
- Mark unclear content as
TODO:orUnclear:. - Structure content for AI agents.
- Separate business rules, requirements, constraints, exceptions, and workflows.
- Convert tables into Markdown tables.
- Convert simple diagrams into Mermaid.
- Use draw.io-compatible structures for diagrams that Mermaid cannot represent well.
- Upload screen
- Review screen
- Diagram review component
- Complete / export screen
The UI should feel like a calm enterprise SaaS tool: quiet, structured, and easy to scan during repeated review work.
The MVP is complete when a user can:
- Upload a file.
- Get a converted mock document.
- Review generated sections.
- Compare an original diagram image with a generated Mermaid diagram.
- Edit the Mermaid code.
- Preview the updated diagram.
- Accept the section.
- Click Complete.
- Download the final Markdown.

