Commit graph

121 commits

Author SHA1 Message Date
Pier-Jean Malandrino
d42c97160d Format backend codebase with ruff 2026-04-02 12:33:07 +02:00
Pier-Jean Malandrino
29d36b9fc2
Merge pull request #31 from scub-france/feature/feature-flipping
Add feature flipping mechanism
2026-04-02 11:29:57 +02:00
Pier-Jean Malandrino
2e086cc4f3 Add feature flipping mechanism
Introduce a feature-flags module in the frontend that detects
the backend conversion engine via /health and exposes typed
feature flags. Chunking is enabled only in local engine mode.
2026-04-02 11:25:23 +02:00
Pier-Jean Malandrino
0e302c30ea
Merge pull request #30 from scub-france/fix/move-vitest-mocker-to-devdeps
Fix/move vitest mocker to devdeps
2026-04-02 10:56:16 +02:00
Pier-Jean Malandrino
8319b45f25 Add excalidraw folder to gitignore 2026-04-02 10:55:25 +02:00
Pier-Jean Malandrino
c5afe5ad88 Add CLAUDE.md to gitignore
Local Claude Code configuration files should not be committed.
2026-04-01 14:55:53 +02:00
Pier-Jean Malandrino
b93cf43c2a Move @vitest/mocker from dependencies to devDependencies
Test utility was incorrectly listed as a production dependency,
adding unnecessary weight to the production Docker image.
2026-04-01 14:55:31 +02:00
Pier-Jean Malandrino
f190b39bec
Merge pull request #28 from scub-france/fix/zombie-jobs-and-json-parse
Add Docling - serve
2026-04-01 14:36:22 +02:00
Pier-Jean Malandrino
2b991108f7 Rebase sync 2026-03-31 16:55:17 +02:00
Pier-Jean Malandrino
1b8cfe0a6b Fix Serve API contract: send to_formats as repeated form fields
Docling Serve expects array fields (to_formats) as repeated multipart
keys (to_formats=md&to_formats=html&to_formats=json), not a JSON
string. Changed _build_form_data to return list[tuple] so httpx sends
repeated keys correctly. Fixes 422 Unprocessable Entity on convert.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 16:52:36 +02:00
Pier-Jean Malandrino
001cf6807c Fix audit findings: security, robustness, and dead code
- Remove dead get_analysis_service() function in main.py
- Scope file deletion to UPLOAD_DIR to prevent path traversal
- Parse datetime strings back to datetime objects in repos
- Add 10-minute polling timeout in frontend analysis store
- Accept .pdf extension (not just MIME type) on drag-and-drop
- Guard localStorage access for private browsing compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 16:52:36 +02:00
Pier-Jean Malandrino
6b0fc45e5d Fix upload error not displayed in DocumentUpload component
Wrap store.upload() calls in try-catch in both onFileSelect and onDrop
so thrown errors (e.g. file too large) don't bubble up unhandled.
Display store.error inline below the upload hint so users see why
their upload was rejected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 16:52:36 +02:00
Pier-Jean Malandrino
0af3b81b8f Fix zombie jobs and unprotected JSON parse
Bug #1: _on_task_done now receives job_id via functools.partial and
calls _mark_failed when the background task raises or is cancelled,
preventing jobs from being stuck in RUNNING state forever.

Bug #5: _parse_response wraps json.loads in try/except JSONDecodeError
so malformed json_content strings fall back gracefully instead of crashing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 16:52:36 +02:00
Pier-Jean Malandrino
a63af61b73 Fix lint ans test errors 2026-03-31 16:35:48 +02:00
Pier-Jean Malandrino
fe4e792885 Fix audit findings: remove domain→infra violation, align Serve API, fix DI
- Delete domain/parsing.py (broke hexagonal layering by importing infra)
- Migrate all tests to import directly from domain.value_objects and
  infra.local_converter
- Rewrite ServeConverter to match real Docling Serve v1 API contract:
  options sent as individual form fields (not JSON blob), response
  parsed from document.json_content (DoclingDocument), proper bbox
  coord_origin handling (TOPLEFT/BOTTOMLEFT)
- Transmit all conversion options including generate_picture_images
- Replace fragile lazy import circular dep with FastAPI Depends() +
  app.state for AnalysisService injection
- Add frontend file size validation (50MB) before upload

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 10:58:58 +02:00
Pier-Jean Malandrino
a3486a8501 Add ServeConverter adapter for remote Docling Serve integration
Implement the HTTP client adapter that delegates document conversion
to a remote Docling Serve instance via its /v1/convert/file endpoint.
Switchable via CONVERSION_ENGINE=remote env var. Includes health check,
API key auth, response parsing, and 30 new tests covering parsing,
type mapping, HTTP calls, and DI wiring.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 10:36:35 +02:00
Pier-Jean Malandrino
3743ed4ca8 Refactor backend to hexagonal architecture for converter extensibility
Extract domain value objects and ports from parsing.py, move Docling-specific
code to infra/local_converter.py, and convert analysis_service to a class
with injected DocumentConverter. This prepares the codebase for plugging in
alternative conversion backends (e.g. Docling Serve) via the Protocol pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 10:34:07 +02:00
Pier-Jean Malandrino
31ccd076c9
Merge pull request #25 from scub-france/fix/security-dependabot
Fix/security dependabot
2026-03-29 21:12:37 +02:00
Pier-Jean Malandrino
c9de4bbd8a Fix esbuild vulnerability by upgrading Vite 5 → 6 and vitest
Update vite 5.4.21 → 6.4.1, @vitejs/plugin-vue and vitest to resolve
Dependabot alert #1 (esbuild dev server request forgery, now at 0.25.12)
2026-03-28 15:16:09 +01:00
Pier-Jean Malandrino
19125d4230 Fix picomatch vulnerability by updating typescript-eslint
Update typescript-eslint 8.57.1 → 8.57.2 to resolve Dependabot alert #3
(POSIX Character Classes method injection in picomatch, now at 4.0.4)
2026-03-28 15:15:01 +01:00
Pier-Jean Malandrino
c3e96b62cd
Merge pull request #24 from scub-france/bug-doc-upload
Fix evetn listening redirection on doc upload
2026-03-24 08:47:55 +01:00
Pier-Jean Malandrino
40cba0f036 Fix type in emit 2026-03-24 08:38:55 +01:00
Pier-Jean Malandrino
079595b57d Fix evetn listening redirection on doc upload 2026-03-23 10:59:52 +01:00
Pier-Jean Malandrino
d22f2e973e Add GIF in README 2026-03-23 10:55:54 +01:00
Pier-Jean Malandrino
f77579ea2c Add missing config for doc publication 2026-03-23 10:25:55 +01:00
Pier-Jean Malandrino
1edd0668d1 Fix Ruff errror, update node and fix buttton breakline 2026-03-23 10:13:24 +01:00
Pier-Jean Malandrino
f267f6c183 Just can't help myself with this.. 2026-03-23 10:04:39 +01:00
Pier-Jean Malandrino
41ee11f5c7
Merge pull request #22 from scub-france/live-documentaiton
Add live documentaiton and change architecture diagram
2026-03-23 09:51:57 +01:00
Pier-Jean Malandrino
c2aeec3092 Add live documentaiton and change architecture diagram 2026-03-23 09:51:03 +01:00
Pier-Jean Malandrino
765b3aa4b8
Merge pull request #21 from scub-france/build-doc
Build true detailed documentaiton
2026-03-22 08:56:50 +01:00
Pier-Jean Malandrino
e2fe935b63 Build true detailed documentaiton 2026-03-22 08:56:00 +01:00
pjmalandrino
b45bb87339 COnsolidation of bbox pipelin and add tests 2026-03-21 19:45:04 +01:00
Pier-Jean Malandrino
6cdd00ed1f
Merge pull request #20 from scub-france/typescipt-migraiton
Migrate frontend in typescript
2026-03-21 16:07:06 +01:00
pjmalandrino
8871c9162c Migrate frontend in typescript 2026-03-21 15:58:43 +01:00
Pier-Jean Malandrino
81076dd308
Merge pull request #19 from scub-france/quality-focus
Add qualityt check and contributing doc
2026-03-21 15:39:29 +01:00
pjmalandrino
577225d10e Add qualityt check and contributing doc 2026-03-21 15:34:54 +01:00
Pier-Jean Malandrino
411cf38a1a
Merge pull request #18 from scub-france/split-rendering
Refacto and add cp paste btn
2026-03-21 15:08:26 +01:00
pjmalandrino
2db251182f Refacto and add cp paste btn 2026-03-21 15:03:10 +01:00
Pier-Jean Malandrino
9fe05756e8
Merge pull request #17 from scub-france/split-rendering
Split the results of OCR
2026-03-20 21:49:06 +01:00
pjmalandrino
7bb4f8e298 Split the results of OCR 2026-03-20 21:45:26 +01:00
Pier-Jean Malandrino
d177dae842
Update README.md 2026-03-20 20:13:44 +01:00
pjmalandrino
c3c0149532 Add docker push
Some checks failed
Release Docker Image / Build & push Docker image (push) Has been cancelled
2026-03-20 18:26:20 +01:00
pjmalandrino
2e1518d26d Update documentation 2026-03-20 17:41:17 +01:00
Pier-Jean Malandrino
463f84a758
Merge pull request #16 from scub-france/add-ci
Add CI
2026-03-20 16:37:21 +01:00
pjmalandrino
c224f4933b Add CI 2026-03-20 16:32:52 +01:00
Pier-Jean Malandrino
58b6f925d2
Merge pull request #15 from scub-france/graphical-improvments
Add slide on side bar in Studio mode
2026-03-20 16:25:25 +01:00
pjmalandrino
d28dfd6d81 Add slide on side bar in Studio mode 2026-03-20 16:24:38 +01:00
Pier-Jean Malandrino
5a8b290758
Merge pull request #14 from scub-france/graphical-improvment
Change document tab place and add landing page
2026-03-20 14:01:35 +01:00
pjmalandrino
20e79f4361 Change document tab place and add landing page 2026-03-20 13:57:05 +01:00
Pier-Jean Malandrino
b06d5fdf95
Merge pull request #13 from scub-france/refact-fixes
Mke some fixes and refacto
2026-03-20 12:37:48 +01:00