Browse by type
![]()
本地优先的 Pixiv 下载、索引、图库与智能检索工作台,支持 Web 工作台、Windows 桌面端与 macOS 桌面端源码路径。
.exe 安装包,内嵌启动现有 Rust 后端,v1.2.0 已手动验证。.app / ad-hoc signed .dmg 源码路径保留,历史 v1.1.1 构建已验证。


src/backend/ Rust 后端、API、任务队列、Pixiv/DeepSeek 客户端、SQLite 仓储
src/backend/src/api/ Axum routes、DTO/envelope、handlers、runtime settings 和 queue worker glue
src/frontend/ Next.js 前端工作台
tauri-app/ Tauri 桌面壳与打包配置,当前默认本地构建目标为 Windows NSIS
docs/ 产品、架构、接口、测试和交付文档
docs/design/ 视觉主题参考与设计归档
tests/ 单元、集成、阶段、smoke 和 opt-in live 测试脚本
static/ README 图片和展示素材
.dmg 需要在 macOS 上执行,并使用 macOS 构建配置PHPSESSID cookie,真实下载时需要小范围使用已打包桌面安装包的用户不需要安装 Rust、Cargo、Node、npm 或 TypeScript。
cd src/frontend
npm install
Windows PowerShell 如遇到 npm.ps1 执行策略限制,使用 npm.cmd install。
后端默认监听 127.0.0.1:3000。Web / 后端独立运行和桌面端默认共享同一套本地目录:
~/Downloads/Pixiv Platform/
~/Downloads/Pixiv Platform/pixiv_platform.sqlite3
cd src/backend
cargo run --bin server
Windows 本地快速启动:
powershell -ExecutionPolicy Bypass -File .\tools\dev_backend_windows.ps1
可选环境变量:
PIXIV_PLATFORM_BIND=127.0.0.1:3000
PIXIV_DOWNLOAD_ROOT=/absolute/path/to/output
PIXIV_PLATFORM_DB_PATH=/absolute/path/to/pixiv_platform.sqlite3
PIXIV_PHPSESSID=your_pixiv_cookie
DEEPSEEK_API_KEY=your_deepseek_key
也可以在前端 Settings 页面保存 pixiv_cookie、deepseek_api_key 和
download_base_path。secret 会被后端遮罩返回,不会在 API 响应中明文回显。
前端默认监听 127.0.0.1:3001。
cd src/frontend
npm run dev
Windows 本地快速启动:
powershell -ExecutionPolicy Bypass -File .\tools\dev_frontend_windows.ps1
前端 API 代理默认指向 http://127.0.0.1:3000。如果后端使用了其它端口:
PIXIV_BACKEND_URL=http://127.0.0.1:3002 npm run dev
打开:
http://127.0.0.1:3001
~/Downloads/Pixiv Platform。cd src/backend
cargo build --release
构建产物:
src/backend/target/release/server
src/backend/target/release/live_single
运行 release 后端:
PIXIV_PLATFORM_BIND=127.0.0.1:3000 \
PIXIV_DOWNLOAD_ROOT=/absolute/path/to/output \
PIXIV_PLATFORM_DB_PATH=/absolute/path/to/pixiv_platform.sqlite3 \
src/backend/target/release/server
cd src/frontend
npm run build
当前仓库默认 Tauri 构建目标为 Windows NSIS 安装包。Tauri 桌面端复用现有
src/frontend 和 src/backend,不会复制业务代码。Tauri 启动时会在进程内启动 Axum
后端,并为前端注入运行时 API 地址。
cd tauri-app
npm.cmd install
npm.cmd run build
构建产物:
tauri-app/src-tauri/target/release/pixiv_platform_tauri_app.exe
tauri-app/src-tauri/target/release/bundle/nsis/Pixiv Platform_1.2.0_x64-setup.exe
最新 Windows 本地锚点(2026-05-27):用户手动确认 Web 正常、Windows Tauri App 正常;
Settings -> Pixiv 连接 -> Refresh 可正常弹出 Pixiv 登录窗口并完成刷新;npm.cmd run build
成功生成 v1.2.0 NSIS 安装包。
v1.1.1 已作为成熟交付第一版本发布。Tauri macOS 桌面端复用现有 src/frontend 和 src/backend,
不会复制业务代码。Tauri 启动时会在进程内启动 Axum 后端,并为前端注入运行时 API 地址。
注意:当前 tauri-app/src-tauri/tauri.conf.json 的默认构建命令和 bundle target 已切到
Windows / NSIS。macOS 代码分支仍保留,但要重新构建 .app / .dmg,需要在 macOS 上把
前端导出命令切回 NEXT_OUTPUT_EXPORT=1 npm --prefix ../src/frontend run build,并把
bundle.targets 切回 ["app", "dmg"],或使用后续新增的 macOS 专用 Tauri 配置。
cd tauri-app
npm install
npm run build
构建产物:
tauri-app/src-tauri/target/release/bundle/macos/Pixiv Platform.app
tauri-app/src-tauri/target/release/bundle/dmg/Pixiv Platform_1.1.0_aarch64.dmg
说明:当前 Tauri 配置默认面向 Windows,并已把 Windows 包版本同步为 1.2.0;macOS 历史
release 锚点仍为 v1.1.1。
当前 .dmg 为 ad-hoc signed、未 Developer ID 签名、未公证版本,可用于 GitHub Release
小范围分发。首次打开时,macOS Gatekeeper 可能拦截,需要用户在系统安全设置中手动允许。
本机验证命令:
codesign --verify --deep --strict --verbose=2 "tauri-app/src-tauri/target/release/bundle/macos/Pixiv Platform.app"
hdiutil verify "tauri-app/src-tauri/target/release/bundle/dmg/Pixiv Platform_1.1.0_aarch64.dmg"
最新本地验证:./tests/run_local.sh 通过,Tauri .app codesign 校验通过,.dmg checksum 校验通过。
Windows .exe / NSIS installer 与 macOS .app / .dmg 不是两套应用源码。
src/frontend/ 唯一前端源码,Next.js 静态导出后进入 Tauri bundle
src/backend/ 唯一 Rust 后端源码,被 tauri-app 通过 Cargo path dependency 复用
tauri-app/src-tauri/src/ 唯一 Tauri 桌面壳源码,少量代码用 cfg(target_os) 分支适配系统差异
tauri-app/src-tauri/target/ 本地构建产物目录,不是源码
平台差异主要存在于打包目标、系统文件夹选择器、日志路径和安装包格式:
bundle/nsis/Pixiv Platform_1.2.0_x64-setup.exebundle/dmg/Pixiv Platform_1.1.0_aarch64.dmg默认本地质量门:
./tests/run_local.sh
该脚本会运行后端单测、SQLite 集成、API smoke、阶段脚本和前端 typecheck/build。 当前基线为 86 个后端单测通过,完整本地质量门通过。
真实 Pixiv E2E 是 opt-in 测试,需要运行时提供 cookie:
PIXIV_PHPSESSID=your_pixiv_cookie ./tests/e2e/live_single_download.sh
最近一次发布验证 shell 未设置 PIXIV_PHPSESSID,因此未运行 live Pixiv E2E。
不要把 Pixiv cookie、DeepSeek API key 或其它 secret 写入仓库文件。
常用端点:
POST /api/download/singlePOST /api/downloads/authorPOST /api/downloads/bookmarksPOST /api/smart/parsePOST /api/smart/downloadGET /api/tasksGET /api/tasks/{task_id}GET /api/imagesGET /api/images/{image_id}GET /api/images/{image_id}/fileDELETE /api/images/{image_id}POST /api/images/delete-batchGET /api/settingsPUT /api/settings/{key}POST /api/settings/test/pixivPOST /api/settings/test/deepseek完整接口说明见 docs/specs/api-contract.md。
v1.2.0 已完成稳定的本地下载、索引、Web 工作台和 Windows Tauri 桌面端交付闭环;macOS 历史成熟交付锚点为 v1.1.1。 以下能力仍属于后续 v1.x / v2 演进方向:
docs/CONTEXT_HANDOFF.md:新会话恢复项目上下文docs/progress.md:当前阶段、完成项和验证基线docs/DOCUMENT_MAP.md:文档地图docs/releases/v1.2.0.md:v1.2.0 Release notesdocs/specs/architecture.md:架构说明docs/specs/api-contract.md:API 合约docs/specs/testing-strategy.md:测试策略tauri-app/docs/progress.md:桌面端进度与验证记录tauri-app/docs/next-session-prompt.md:下一轮新会话提示词~/Downloads/Pixiv Platform/。~/Downloads/Pixiv Platform/pixiv_platform.sqlite3。$ claude mcp add self_pixiv_downloader \
-- python -m otcore.mcp_server <graph>