DeepSeek-OCR-WebUI / frontend
CLAUDE.md447 starsChanged 10 months agoMITView on GitHub
This file contains the shared rules and context for all AI Agents working on this project. Do not edit the synced sections in individual Agent files; edit .agent/rules/common.md instead. The tool converts scanned images/multi-page PDFs into: - Markdown - DOCX - Text+Image PDF All processing except OCR API calls must run entirely in the browser. src/ ├─ main.ts ├─ App.vue ├─ stores/ │ └─ pages.ts ├─ db/ │ └─ index.ts ├─ components/ │ ├─ page-list/ │ ├─ page-viewer/ │ ├─…
We split this CLAUDE.md into the rules it gives an agent
15 rules. About 0 are common, 14 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
No backend services are allowed except third-party OCR APIs.
- Distinctive: line 22
All processing except OCR API calls must run entirely in the browser.
- Distinctive: line 32
No database except browser storage
- Very specific: line 35
Use IndexedDB (via Dexie.js)
- Distinctive: line 36
All intermediate results must survive page refreshes
- Distinctive: line 42
Avoid loading all images into memory at once
- Distinctive: line 84
Never implicit or hidden states
- Distinctive: line 87
Prefer clarity over cleverness
- Distinctive: line 122
Use Composition API only
- Distinctive: line 124
All side effects must be explicit
- Distinctive: line 125
Every long-running operation must:
- Distinctive: line 129
All log information must use consola, do not use console
- Distinctive: line 136
Use Naive UI components whenever possible for common UI patterns
- Distinctive: line 138
Only create custom components when Naive UI doesn't provide the needed functionality
- Distinctive: line 154
Always use TypeScript for new features.
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project: Browser-only Image/PDF OCR & Converter - Claude Code Rules
<!-- RULES_START -->trigger: always_on
Common Coding Standards & Project Context
This file contains the shared rules and context for all AI Agents working on this project. Do not edit the synced sections in individual Agent files; edit .agent/rules/common.md instead.
Overview
This is a pure frontend, browser-only document processing tool. No backend services are allowed except third-party OCR APIs.
The tool converts scanned images/multi-page PDFs into:
- Markdown
- DOCX
- Text+Image PDF
All processing except OCR API calls must run entirely in the browser.
Core Constraints (VERY IMPORTANT)
- Frontend only
- Vue 3 + Vite
- No Node.js backend
- No server-side rendering
- No database except browser storage
- Persistence
- Use IndexedDB (via Dexie.js)
- All intermediate results must survive page refreshes
- Support resume / recovery
- Large documents
- PDFs may have hundreds of pages
- Use virtual lists
- Avoid loading all images into memory at once
- Long-running tasks
- OCR may take hours
- UI must always remain responsive
- Tasks must be resumable
Technology Stack
- Framework: Vue 3 (Composition API)
- Bundler: Vite
- UI Library: Naive UI
- State Management: Pinia
- Local Storage: Dexie.js
- PDF Rendering: pdfjs-dist
- PDF Generation: pdf-lib
- Markdown: markdown-it
- DOCX: docx
- Drag & Drop: vue-draggable-next
- Virtual List: vue-virtual-scroller
- Task Queue: p-queue
- Utilities: @vueuse/core
- Unit Testing: Vitest
- E2E Testing: Playwright
- Logging: Consola
Architecture Principles
- Page-centric design
- Each image/PDF page is an independent unit
- Each page has its own status, logs, and outputs
- State-driven UI
- UI reflects state
- Avoid DOM-driven logic
- Explicit task states
- idle / processing / success / error
- Never implicit or hidden states
- Readable, maintainable code
- Prefer clarity over cleverness
- Avoid premature optimization
Folder Structure (Target)
src/ ├─ main.ts ├─ App.vue ├─ stores/ │ └─ pages.ts ├─ db/ │ └─ index.ts ├─ components/ │ ├─ page-list/ │ ├─ page-viewer/ │ ├─ preview/ │ └─ ... ├─ services/ │ ├─ add/ │ ├─ pdf/ │ ├─ ocr/ │ ├─ export/ │ └─ ... ├─ workers/ │ └─ pdf.worker.ts └─ types/
Coding Rules
- Use TypeScript
- Use
<script setup> - Use Composition API only
- Prefer async/await
- All side effects must be explicit
- Every long-running operation must:
- report progress
- be cancellable if possible
- log status updates
- All log information must use consola, do not use console
UI Component Guidelines
- Use existing UI components and avoid reinventing the wheel
- Use Naive UI components whenever possible for common UI patterns
- Leverage existing Naive UI message/notification system instead of custom implementations
- Only create custom components when Naive UI doesn't provide the needed functionality
Language Requirements
- IMPORTANT: All thinking processes, plans, execution processes, and final summaries of the Agent must be output in Chinese.
- IMPORTANT: All code and documentation generated by the Agent must be in English.
- IMPORTANT: All Implementation Plan, Task and Walkthrough documents generated by the Agent must be in Chinese.
<!-- RULES_END -->Claude Specifics
- Claude should focus on providing efficient, modern Vue 3 code.
- Always use TypeScript for new features.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

