Skip to content

Commit 0bb4b5c

Browse files
committed
Rebrand app to DeepSeek-OCR-2 Client and rewrite README with user-first guide
1 parent 84e6a1e commit 0bb4b5c

8 files changed

Lines changed: 121 additions & 157 deletions

README.md

Lines changed: 116 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -1,215 +1,179 @@
1-
# DeepSeek OCR Client (Fork)
1+
# DeepSeek-OCR-2 Client
22

3-
Desktop Electron client for [DeepSeek-OCR](https://github.com/deepseek-ai/DeepSeek-OCR), with cross-platform packaging, queue workflows, GPU-aware setup, and first-run managed Python runtime.
3+
**A desktop OCR workspace for [DeepSeek-OCR-2](https://github.com/deepseek-ai/DeepSeek-OCR-2) with live overlay preview, queue processing, and automatic hardware-aware setup.**
44

55
This project is unaffiliated with DeepSeek.
66

7-
## What This Fork Adds
7+
![DeepSeek-OCR-2 Client result overlay](docs/images/ui-ocr-result-overlay.png)
88

9-
- Managed first-run runtime via bundled `uv` (packaged builds)
10-
- Hardware-aware setup path (Apple Silicon MLX, NVIDIA CUDA, CPU)
11-
- Dual inference backends:
12-
- Apple Silicon: `mlx` + `mlx-vlm` with `mlx-community/DeepSeek-OCR-2-8bit`
13-
- Windows/Linux/Intel macOS: PyTorch backend (`torch` + `transformers`) with `deepseek-ai/DeepSeek-OCR-2`
14-
- Queue processing for mixed image + PDF inputs
15-
- Queue controls: pause, resume, cancel, retry failed
16-
- PDF page-range support (`1-3,5`) for single OCR and queue OCR
17-
- Startup/setup progress UI
18-
- Preflight estimator (disk + download/time estimates)
19-
- Diagnostics bundle export (for debugging/support)
20-
- Retention policy UI (outputs/cache cleanup)
21-
- Security hardening: preload-based API with `contextIsolation: true`
22-
- Cross-platform E2E and packaging test coverage
9+
## Why This Client
2310

24-
## Platform Support
11+
If you want OCR that is:
12+
- local-first
13+
- fast on your available hardware
14+
- easy for non-technical users
15+
- still scriptable for advanced users
2516

26-
- macOS: source mode + DMG packaging
27-
- Windows: source mode + NSIS packaging
28-
- Linux: source mode + AppImage/deb packaging
17+
this app is designed for that exact flow.
2918

30-
## Requirements
19+
It gives you one desktop surface for:
20+
- image and PDF OCR
21+
- queue/batch processing
22+
- live detection overlays
23+
- setup diagnostics and retention controls
24+
- optional MCP control from Codex/CLI tooling
3125

32-
### End users (installer builds)
26+
## Install (Simple Path)
3327

34-
- No preinstalled Python required
35-
- Internet access on first run (runtime + dependencies + model)
28+
1. Open the [Releases page](https://github.com/jmoore2333/deepseek-ocr-client/releases).
29+
2. Download the installer for your platform.
30+
3. Launch the app.
31+
4. On first run, let setup finish (runtime + dependencies + model preparation).
3632

37-
### Source/development mode
33+
## 3-Minute First OCR
3834

39-
- Node.js 18+
40-
- Python 3.10-3.12
41-
- Optional: NVIDIA driver/CUDA-capable GPU for CUDA acceleration
42-
43-
## Quick Start
44-
45-
### 1. Clone and install Node deps
46-
47-
```bash
48-
npm ci
49-
```
35+
1. Start the app.
36+
2. Click `Load Model`.
37+
3. Drag in an image or PDF (or click `Select File`).
38+
4. Keep `Type = Document` unless you need a different mode.
39+
5. Click `Run OCR`.
40+
6. Review output in `Output Inspector`.
41+
7. Use `Copy to Clipboard` or `Download ZIP`.
5042

51-
### 2. Run in source mode
43+
![Quick start panel](docs/images/ui-quickstart-basic.png)
5244

53-
macOS/Linux:
45+
## Queue / Batch Workflow
5446

55-
```bash
56-
./start-client.sh
57-
```
47+
1. Use `Add Files` or `Add Folder`.
48+
2. Optional: set PDF page ranges (for example `1-3,5`).
49+
3. Click `Process Queue`.
50+
4. While running, you can `Pause`, `Cancel`, or `Retry Failed`.
5851

59-
Windows:
52+
![Queue active state](docs/images/ui-queue-active.png)
6053

61-
```bat
62-
start-client.bat
63-
```
54+
## Basic vs Advanced Mode
6455

65-
### 3. In the app
56+
- `Basic`: minimal controls for fast OCR.
57+
- `Advanced`: full tuning, preflight checks, diagnostics export, retention policy.
6658

67-
1. Click `Load Model` (first time downloads model)
68-
2. Drop/select an image or PDF
69-
3. Click `Run OCR`
59+
![Dashboard (Basic)](docs/images/ui-dashboard-basic.png)
60+
![Dashboard (Advanced)](docs/images/ui-dashboard-advanced.png)
7061

71-
### Default model routing
62+
## Hardware Backends and Models
7263

73-
- Apple Silicon (MLX backend): `mlx-community/DeepSeek-OCR-2-8bit`
74-
- CUDA + CPU (PyTorch backend): `deepseek-ai/DeepSeek-OCR-2`
75-
- Override on any platform via `MODEL_NAME`
64+
The app routes by platform automatically:
7665

77-
## Queue Workflow
66+
| Platform / Device | Runtime Backend | Default Model |
67+
|---|---|---|
68+
| Apple Silicon (macOS arm64) | MLX (`mlx`, `mlx-vlm`) | [`mlx-community/DeepSeek-OCR-2-8bit`](https://huggingface.co/mlx-community/DeepSeek-OCR-2-8bit) |
69+
| NVIDIA CUDA (Windows/Linux) | PyTorch | [`deepseek-ai/DeepSeek-OCR-2`](https://huggingface.co/deepseek-ai/DeepSeek-OCR-2) |
70+
| CPU fallback (Windows/Linux/Intel macOS) | PyTorch | [`deepseek-ai/DeepSeek-OCR-2`](https://huggingface.co/deepseek-ai/DeepSeek-OCR-2) |
7871

79-
- Add files or add a folder
80-
- Optional PDF page range: `1-3,5`
81-
- Click `Process Queue`
82-
- Use queue controls while running:
83-
- `Pause`
84-
- `Resume`
85-
- `Cancel`
86-
- `Retry Failed`
72+
You can override the model with `MODEL_NAME` if needed.
8773

88-
Queue outputs are written under timestamped folders in the app cache output directory.
74+
## Reliability Features
8975

90-
## Basic vs Advanced Mode
76+
- First-run managed runtime setup with bundled `uv`
77+
- Hardware-aware environment provisioning
78+
- Startup status and preflight estimator
79+
- Diagnostics export (`ZIP`)
80+
- Retention policies for outputs/cache
81+
- Queue controls: pause/resume/cancel/retry
9182

92-
- `Basic`: simplified UI for common OCR flow
93-
- `Advanced`: exposes tuning + diagnostics + retention controls
83+
## MCP Server (Codex / CLI / Other MCP Clients)
9484

95-
Mode is persisted locally.
85+
MCP server is included at `backend/mcp_server.py`.
9686

97-
## Preflight, Diagnostics, and Retention
87+
It supports:
88+
- model load
89+
- single OCR
90+
- queue add/status/process/pause/resume/cancel/retry
91+
- diagnostics export
92+
- retention policy operations
9893

99-
- `Run Preflight`: estimates required disk/download and expected setup time
100-
- `Export Diagnostics`: writes a ZIP with app/backend diagnostics and log tails
101-
- Retention policy panel:
102-
- Output retention days
103-
- Max queue run folders
104-
- Download-cache retention days
105-
- Optional cleanup on startup
94+
Quick reference and configs:
95+
- [`docs/mcp-server.md`](docs/mcp-server.md)
10696

107-
## Build Installers / Distributions
97+
## Build From Source
10898

109-
### Windows (NSIS)
99+
### Prerequisites
110100

111-
```powershell
112-
powershell -ExecutionPolicy Bypass -File .\scripts\build-release.ps1
113-
```
101+
- Node.js 18+
102+
- Python 3.10-3.12
103+
- Optional CUDA-capable NVIDIA GPU for CUDA acceleration
114104

115-
### macOS/Linux
105+
### Run in development
116106

117107
```bash
118-
bash ./scripts/build-release.sh
108+
npm ci
109+
./start-client.sh
119110
```
120111

121-
### Manual dist commands
112+
Windows:
122113

123-
```bash
124-
npm run dist:win
125-
npm run dist:mac
126-
npm run dist:linux
114+
```bat
115+
npm ci
116+
start-client.bat
127117
```
128118

129-
## Testing
130-
131-
### Electron E2E (mock backend)
119+
### Tests
132120

133121
```bash
134122
npm run test:e2e
135-
```
136-
137-
### Host build smoke
138-
139-
```bash
140123
npm run test:build:smoke
141-
```
142-
143-
### Host dist packaging
144-
145-
```bash
146124
npm run test:dist:host
147125
```
148126

149-
## CI
150-
151-
- `.github/workflows/ci-e2e.yml`
152-
- E2E + build smoke on Linux/macOS/Windows
153-
- `.github/workflows/dist-matrix.yml`
154-
- Full host distribution packaging matrix (manual dispatch)
127+
### Build installers
155128

156-
## Security Model
157-
158-
Renderer access is exposed through a restricted preload API:
159-
160-
- `contextIsolation: true`
161-
- `nodeIntegration: false`
162-
- IPC channels wrapped by explicit preload methods
163-
164-
## MCP Server (Codex/Claude/Any MCP Client)
129+
Windows:
165130

166-
This project includes an MCP (Model Context Protocol) server at `backend/mcp_server.py` that can drive the same OCR flows as the UI: single-file OCR, queue control, model loading, diagnostics, and retention management.
131+
```powershell
132+
powershell -ExecutionPolicy Bypass -File .\scripts\build-release.ps1
133+
```
167134

168-
**Codex App / Codex CLI quick start**
135+
macOS/Linux:
169136

170137
```bash
171-
cd /absolute/path/to/deepseek-ocr-client
172-
codex mcp add deepseek-ocr --env DEEPSEEK_OCR_URL=http://127.0.0.1:5000 -- \
173-
"$(pwd)/venv/bin/python3" "$(pwd)/backend/mcp_server.py"
174-
codex mcp list
138+
bash ./scripts/build-release.sh
175139
```
176140

177-
**Claude Code quick start**
178-
179-
- Project config: `.claude/mcp_servers.json`
180-
- Optional plugin: `claude plugin install --path ./mcp-plugin`
181-
182-
See [`docs/mcp-server.md`](docs/mcp-server.md) for full setup details, including Codex config snippets and troubleshooting.
183-
184-
## Project Layout
141+
Manual distro commands:
185142

186-
- `main.js`: Electron main process, runtime bootstrap, IPC, setup flow
187-
- `preload.js`: secure renderer bridge
188-
- `renderer.js`: UI logic
189-
- `backend/ocr_server.py`: Flask OCR backend + queue processing
190-
- `backend/mcp_server.py`: MCP server for LLM integration
191-
- `mcp-plugin/`: Claude Code plugin package
192-
- `runtime/`: bundled `uv` binaries
193-
- `scripts/`: release/test helpers
194-
- `tests/e2e/`: Playwright E2E suite + mock backend
195-
- `docs/`: analysis, testing strategy, and MCP documentation
143+
```bash
144+
npm run dist:win
145+
npm run dist:mac
146+
npm run dist:linux
147+
```
196148

197149
## Troubleshooting
198150

199-
- Model/setup issues:
200-
- Run `Run Preflight` first, confirm disk/network are sufficient
201-
- Runtime/setup anomalies:
202-
- Export diagnostics and inspect `diagnostics.json`
203-
- Queue stalls:
204-
- Check queue state in UI (`paused`, `cancel requested`, failed items)
205-
206-
## Upstream and Fork Context
207-
208-
Original project:
209-
151+
- Setup stuck or failing:
152+
- Run `Run Preflight`
153+
- Check internet/disk availability
154+
- Model/runtime issues:
155+
- Use `Export Diagnostics`
156+
- Inspect `diagnostics.json` and log tails
157+
- Queue appears stalled:
158+
- Verify pause/cancel state
159+
- Retry failed items
160+
161+
## Technical Notes
162+
163+
- Electron main process: `main.js`
164+
- Secure renderer bridge: `preload.js`
165+
- UI logic: `renderer.js`
166+
- OCR backend: `backend/ocr_server.py`
167+
- MCP server: `backend/mcp_server.py`
168+
- E2E tests: `tests/e2e/`
169+
- CI workflows: `.github/workflows/`
170+
171+
## Upstream/Fork Context
172+
173+
Original upstream:
210174
- [ihatecsv/deepseek-ocr-client](https://github.com/ihatecsv/deepseek-ocr-client)
211175

212-
This repository is an actively maintained fork focused on installer/runtime reliability and multi-platform operation.
176+
This repository is an actively maintained fork focused on production desktop workflows, hardware-aware runtime setup, and DeepSeek-OCR-2 integration.
213177

214178
## License
215179

1.9 MB
Loading

docs/images/ui-dashboard-basic.png

1.84 MB
Loading
2.37 MB
Loading

docs/images/ui-queue-active.png

513 KB
Loading
698 KB
Loading

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>DeepSeek-OCR Client</title>
6+
<title>DeepSeek-OCR-2 Client</title>
77
<link rel="stylesheet" href="styles.css">
88
</head>
99
<body data-ui-mode="advanced">
1010
<div class="app-shell">
1111
<header class="status-rail">
1212
<div class="brand-cluster">
1313
<p class="brand-kicker">Operator Desk</p>
14-
<h1>DeepSeek-OCR Client</h1>
14+
<h1>DeepSeek-OCR-2 Client</h1>
1515
<p class="disclaimer">Unaffiliated with DeepSeek</p>
1616
</div>
1717

@@ -49,7 +49,7 @@ <h1>DeepSeek-OCR Client</h1>
4949
<span class="link-divider"></span>
5050
<a href="https://deepseek.ai/blog/deepseek-ocr-context-compression" target="_blank">Model Blog</a>
5151
<span class="link-divider"></span>
52-
<a href="https://github.com/deepseek-ai/DeepSeek-OCR" target="_blank">Model GitHub</a>
52+
<a href="https://github.com/deepseek-ai/DeepSeek-OCR-2" target="_blank">Model GitHub</a>
5353
<span class="link-divider"></span>
5454
<a href="https://github.com/jmoore2333/deepseek-ocr-client/" target="_blank">Client GitHub</a>
5555
</div>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "deepseek-ocr-client",
33
"version": "1.0.0",
4-
"description": "Electron GUI for DeepSeek OCR",
4+
"description": "Electron GUI for DeepSeek-OCR-2",
55
"main": "main.js",
66
"scripts": {
77
"start": "electron .",
@@ -37,7 +37,7 @@
3737
},
3838
"build": {
3939
"appId": "com.jmoore.deepseekocrclient",
40-
"productName": "DeepSeek OCR Client",
40+
"productName": "DeepSeek-OCR-2 Client",
4141
"asar": true,
4242
"files": [
4343
"index.html",

0 commit comments

Comments
 (0)