10 Commits

Author SHA1 Message Date
0be8b0b0f0 fix: resolve 422 from Replicate + add local Cog Docker mode
- replicate-translate: parse owner/model:hash correctly — extract only
  the hash portion for the version field, and use the model endpoint
  (POST /v1/models/{owner}/{model}/predictions) which avoids 422
  'Invalid version' errors when sending the full owner/model:hash string.

- Add local Cog mode: when replicateMode="local", calls the local Docker
  container directly (no Replicate API key needed), default endpoint
  http://localhost:5030/predictions (host port 5030 → container port 5000).

- settings-store: add replicateMode ("cloud"|"local") and localEndpoint
  fields with env var fallbacks REPLICATE_MODE and LOCAL_MODEL_ENDPOINT.

- admin panel: Radio selector for Cloud vs Local mode; shows docker run
  command snippet and local endpoint URL field when local is selected;
  hides Replicate API token field in local mode (not needed).

Local model startup:
  docker run -d -p 5030:5000 \
    r8.im/jigsawstack/text-translate@sha256:454df4c...

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 08:50:40 +01:00
0799101da3 feat: add admin panel, Replicate AI translation, and document translation
- Admin panel (/admin) with JWT auth: configure Replicate API token,
  JigsawStack API key, model version, enable/disable AI translation,
  change admin password. Settings persisted in data/settings.json.

- Replicate AI translation: POST /api/translate/replicate uses
  JigsawStack text-translate model via Replicate API. Main page
  switches to client-side AI translation when enabled.

- Document translation tab: supports PDF, DOCX, XLSX, XLS, CSV.
  Excel/Word formatting fully preserved (SheetJS + JSZip XML manipulation).
  PDF uses pdf-parse extraction + pdf-lib reconstruction.
  Column selector UI for tabular data (per-sheet, All/None toggles).

- Updated README with full implementation documentation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 07:43:54 +01:00
David
274e7f1a4b Refactor to external scraper and update dependencies (#113) 2022-06-15 23:37:15 +02:00
David
16ab855ccc Updated to new dependencies (#95) 2022-02-24 21:33:17 +01:00
David
5856776785 Default languages with env & langcodes typed (#94) 2022-02-24 19:53:31 +01:00
David
870ec2db64 Add language endpoint to developer APIs (#41)
* Added languages endpoint and its tests
2021-08-30 21:35:22 +02:00
David
bdaced0457 Dependencies updated & small enhancements (#27)
* Dependencies updated and imports shortened

* Head tags refactored

* Final tweaks
2021-06-12 22:44:56 +02:00
David
2938f780aa APIs (#3)
* Initial RESTful API

* RESTful API tests

* Scrapping error handling refactored

* Initial GraphQL API

* GraphQL API tests
2021-03-28 23:17:47 +02:00
David
5a512c3d7f Project setup 2021-03-09 20:34:34 +01:00
David
d39f0ccd51 Initial commit from Create Next App 2021-03-09 20:02:40 +01:00