Commit Graph

101 Commits

Author SHA1 Message Date
35cb741845 fix: upgrade builder to golang:1.23-alpine for go-fitz/x/sys compatibility 2026-03-31 21:39:59 +08:00
d667d1272e fix: remove redundant apk gcc install, golang:1.20-alpine already has gcc 2026-03-31 21:38:45 +08:00
84ce6f6b92 refactor: replace pdftoppm with go-fitz for in-process PDF rendering
Switch PDF page rendering from external pdftoppm/pdftocairo subprocess calls
to github.com/gen2brain/go-fitz (MuPDF wrapper), eliminating the poppler-utils
runtime dependency. Enable CGO in Dockerfile builder stage and install gcc/musl-dev
for the static MuPDF link; runtime image remains unchanged.
2026-03-31 21:21:17 +08:00
86dacb61a6 fix: add pdf content type support in GetPolicyURL 2026-03-31 19:45:54 +08:00
3e07c29376 fix: downgrade dependencies for go 1.20 compatibility 2026-03-31 19:37:51 +08:00
a02156591d fix go version to 1.20 2026-03-31 19:36:24 +08:00
c7592e72af update go to 1.23 for build compatibility 2026-03-31 19:34:09 +08:00
fb78c4052b Merge branch 'feature/pdf-recognition' into test 2026-03-31 19:30:35 +08:00
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
876e64366b feat: upgrade verification code email with bilingual HTML template
- Chinese domains (qq.com, 163.com, etc.) receive a Chinese email
- All other domains receive an English email
- Prominent code display: 40px monospace with wide letter-spacing
- Clean OpenAI-inspired layout with dark header and card design

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 14:44:17 +08:00
87bee98049 feat: add email_send_log table to track email sends and registration status
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 14:29:30 +08:00
a07e08a761 fix: change register verify_code field to code to match frontend
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 10:05:51 +08:00
f6ccadbcd3 refactor: move deploy scripts into .claude/skills/deploy/
- Added deploy skill (SKILL.md) with dev/prod instructions
- Moved deploy_prod.sh, deploy_dev.sh, dev_deploy.sh, speed_take.sh
- Updated settings.local.json: new script paths, git merge/push permissions, auto-deploy hook on merge to master
- Removed dev_deploy.sh and speed_take.sh from .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 10:04:41 +08:00
fa1fbfc0f5 fix: set resend api key in prod config
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 09:55:13 +08:00
4f468caedf Merge branch 'feature/email_service_optimize' into master 2026-03-27 09:50:32 +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
e538553045 fix: remove unused time import in task.go
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 02:41:40 +08:00
135a8151e4 feat: rm binary file 2026-03-27 02:29:28 +08:00
057681561a feat: update pwd dev env 2026-03-27 02:27:48 +08:00
ea3f3fd482 fix: remove unused time import in task.go and fix deploy script
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 01:48:14 +08:00
a29936f31c feat: add email verification code for registration and optimize email service
- Add POST /user/email/code endpoint to send 6-digit verification code
- Require email code verification before completing registration
- Add email code cache with 10min TTL and 5/day send rate limit
- Fix nil client guard, TLS conn leak, domain parsing, and Resend error body in email pkg
- Deploy via ssh inline command using current branch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 01:47:06 +08:00
9876169c84 refactor: optimize email 2026-03-27 01:23:01 +08:00
5371b1d1c6 feat: add dual-engine email service with aliyun smtp and resend routing
Route Chinese domains (edu.cn, qq.com, 163.com, etc.) via Aliyun SMTP
and international addresses via Resend API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 18:33:17 +08:00
fcd9816b0b refact: add log for export 2026-03-25 18:28:12 +08:00
liuyuanchuang
18597ba7fa feat: add log for export error 2026-03-12 11:43:26 +08:00
2fafcb9bfd Merge pull request 'feature/google_oath' (#5) from feature/google_oath into master
Reviewed-on: #5
2026-03-06 14:07:42 +08:00
liuyuanchuang
b5d177910c feat: add email in userinfo 2026-03-06 14:02:04 +08:00
liuyuanchuang
7df6587fd6 chore: update docker compose 2026-03-06 11:22:41 +08:00
liuyuanchuang
94988790f8 feat: update callback url 2026-03-06 11:10:44 +08:00
liuyuanchuang
45dcef5702 feat: add proxy 2026-03-06 11:03:41 +08:00
liuyuanchuang
ed7232e5c0 feat google oauth 2026-03-06 10:28:56 +08:00
liuyuanchuang
8852ee5a3a Merge branch 'test' 2026-02-13 18:04:26 +08:00
liuyuanchuang
a7b73b0928 Merge branch 'master' of https://code.texpixel.com/YogeLiu/doc_ai_backed 2026-02-13 18:04:21 +08:00
liuyuanchuang
e35f3ed684 fix: update bucket 2026-02-12 19:45:29 +08:00
liuyuanchuang
aed09d4341 feat: update bucket 2026-02-12 19:41:53 +08:00
liuyuanchuang
a0cf063ff9 Merge branch 'master' into test 2026-02-12 19:40:51 +08:00
liuyuanchuang
323b712c18 fix: rm skd file 2026-02-12 19:40:23 +08:00
6786d174a6 Merge pull request 'feat: add mml' (#4) from test into master
Reviewed-on: #4
2026-02-05 13:48:14 +08:00
liuyuanchuang
de6b5d3960 Merge branch 'master' into test 2026-02-05 10:44:39 +08:00
liuyuanchuang
81c2767423 feat: add mml from backend 2026-02-05 10:44:11 +08:00
liuyuanchuang
a59fbd0edd refact: update script 2026-01-27 23:46:52 +08:00
liuyuanchuang
d1a56a2ab3 fix: panic 2026-01-27 23:23:42 +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
9e01ee79f1 Merge branch 'master' into test 2026-01-27 22:22:48 +08:00
liuyuanchuang
52c9e48a0f fix: rm router db 2026-01-27 22:22:06 +08:00
liuyuanchuang
9b7657cd73 Merge branch 'master' into test 2026-01-27 22:20:27 +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