Commit Graph

20 Commits

Author SHA1 Message Date
ac078a16bc fix: pin go directive to 1.20, add user ownership check on GetPDFTask
- Downgrade go directive in go.mod from 1.23.0 back to 1.20 to match
  Docker builder image (golang:1.20-alpine); re-run go mod tidy with
  go1.20 (via gvm) to keep go.sum consistent
- GetPDFTask now verifies callerUserID matches task.UserID to prevent
  cross-user data exposure of PDF page content

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 14:52:20 +08:00
9d712c921a feat: add PDF document recognition with 10-page pre-hook
- Migrate recognition_results table to JSON schema (meta_data + content),
  replacing flat latex/markdown/mathml/mml columns
- Add TaskTypePDF constant and update all formula read/write paths
- Add PDFRecognitionService using pdftoppm (Poppler) for CGO-free page
  rendering; limits processing to first 10 pages (pre-hook)
- Reuse existing downstream OCR endpoint (cloud.texpixel.com) for each
  page image; stores results as [{page_number, markdown}] JSON array
- Add Redis queue + distributed lock for PDF worker goroutine
- Add REST endpoints: POST /v1/pdf/recognition, GET /v1/pdf/recognition/:task_no
- Add .pdf to OSS upload file type whitelist
- Add migrations/pdf_recognition.sql for safe data migration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 14:17:44 +08:00
f594a3e9fb feat: add email verify code endpoint and require code on register
- POST /v1/user/email/code sends a 6-digit verify code via email (rate-limited, 10min TTL)
- RegisterByEmail now validates verify_code before creating the account
- Added email code cache helpers mirroring SMS pattern
- Added error codes 1007 (email code error) and 1008 (send limit)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 09:50:23 +08:00
liuyuanchuang
b5d177910c feat: add email in userinfo 2026-03-06 14:02:04 +08:00
liuyuanchuang
ed7232e5c0 feat google oauth 2026-03-06 10:28:56 +08:00
liuyuanchuang
41df42dea4 feat: decode uid 2026-01-27 22:28:13 +08:00
liuyuanchuang
be3e82fc2e feat: decode user_id 2026-01-27 22:26:25 +08:00
liuyuanchuang
a04eedc423 feat: add track point 2026-01-27 22:20:07 +08:00
liuyuanchuang
a5f1ad153e refactor: update package path 2026-01-27 21:56:21 +08:00
930d782f18 feat: add api for export 2025-12-26 16:24:34 +08:00
0aaafdbaa3 feat: add file export 2025-12-26 15:48:14 +08:00
770c334083 fix: update app key 2025-12-20 22:48:02 +08:00
be00a91637 feat: check login for list 2025-12-19 13:59:47 +08:00
5a1983f08b feat: update oss download url 2025-12-18 15:14:42 +08:00
8a6da5b627 feat: add list api 2025-12-18 12:39:50 +08:00
f0449bab25 feat: add user register 2025-12-17 20:43:08 +08:00
liuyuanchuang
696919611c feat: use siliconflow model 2025-12-11 19:39:35 +08:00
0bc77f61e2 feat: update dockerfile 2025-12-10 23:17:24 +08:00
liuyuanchuang
4bd8cef372 refact: modify db config 2025-12-10 20:01:56 +08:00
liuyuanchuang
48e63894eb init repo 2025-12-10 18:33:37 +08:00