适用于:用户上传一份可填写的 PDF 表单,系统自动列出字段,支持在线填写、预览并导出填好的 PDF。
英文 Prompt:
You are a senior full-stack engineer. Build a production-ready web app: "Online PDF Form Filler". Requirements: - Users upload a fillable PDF (AcroForm). - Server extracts form fields (name, type, default value, options, required if available) and returns JSON. - UI renders an editable field list and a PDF preview; user edits values and clicks "Export". - Exported PDF preserves original pages, fills the form values, and embeds a small audit footer (timestamp + masked session id). - Do NOT call external paid APIs. Tech stack (must follow): - Next.js (App Router) + Type - Node.js API routes - PDF library: pdf-lib - UI: Tailwind CSS Deliverables (must include all): 1) Complete source code. 2) File tree. 3) Local run commands (pnpm preferred) and a Dockerfile. 4) Deployment notes for Vercel and a self-hosted Node server. 5) Security checklist (upload limits, MIME sniffing, path traversal, SSRF avoidance). 6) Tests: at least 5 test cases (unit or integration). Include a QA checklist if some tests are manual. Output format: - Start with file tree. - Then provide the code for each file in separate fenced blocks. - End with run/deploy/test instructions.中文释义:
让 AI 直接产出一个可部署的在线 PDF 表单填写工具:从上传解析字段到前端表单渲染、填写导出、Docker 与部署说明,以及至少 5 条测试/QA,确保可运行可验收。
适用于:团队把 PDF 当成业务表单模板,需要在导出前做字段完整性校验,并对缺失/格式错误的字段给出清晰提示。
英文 Prompt:
Build a web app "PDF Form Validator". Features: - Upload a fillable PDF. - Extract fields and infer simple validation rules from field names (e.g., email, phone, id, date) plus an editable rule editor. - Client-side validation with immediate feedback. - Export filled PDF only when validation passes. - Provide an "Errors" panel and a "Field mapping" panel. Implementation constraints: - Next.js + Type - pdf-lib - No external services. Deliverables: - Full project code, file tree, commands. - Dockerfile. - Deploy guide. - At least 5 automated tests: include validation edge cases (empty, unicode, max length, invalid email, invalid date).中文释义:
让 AI 生成一个带校验规则编辑器的在线 PDF 表单工具:自动推断字段校验、实时高亮错误、校验通过才允许导出,并提供完整项目与测试用例。
适用于:同一份 PDF 模板需要按名单批量生成(例如合同/报名表/发票信息),要求批量导出并保留可追溯的生成日志。
英文 Prompt:
Create "Batch PDF Form Generator". Workflow: - User uploads a fillable PDF template. - User uploads a CSV file. - UI provides a mapping screen: CSV columns -> PDF fields. - Generate one filled PDF per CSV row. - Package results as a ZIP for download. - Provide a generation report: row count, success/fail, field mismatches. Tech: - Next.js + Type - pdf-lib - ZIP: use a JS zip library (e.g., jszip) on server side. Deliverables: - Full code + file tree. - Run commands. - Dockerfile. - Deployment notes. - Tests: at least 5, including CSV parsing edge cases, missing columns, non-ASCII names, large row count behavior (with limits).中文释义:
让 AI 产出一个“CSV 批量生成 PDF”的在线工具:包含字段映射界面、批量生成、ZIP 打包下载、生成报告与边界测试,适合批处理业务表单。
适用于:同一类 PDF 表单反复填写,想把常用字段值保存为“模板”,下次一键套用并导出。
英文 Prompt:
Build "PDF Form Template Manager". Must have: - Upload PDF and extract fields. - Allow users to create named templates (a set of field values) and reuse them. - Store templates locally (browser storage) by default; optional server persistence with SQLite. - Provide import/export templates as JSON. - Export filled PDF. Constraints: - Next.js + Type + Tailwind - pdf-lib - If server persistence is included, use SQLite via better-sqlite3 and provide migrations. Deliverables: - Full project. - File tree. - Local run + Docker. - Deployment notes. - Tests: at least 5, including template import/export validation and schema versioning.中文释义:
让 AI 生成一个“字段值模板”管理的在线 PDF 表单工具:默认本地存储,支持 JSON 导入导出,可选 SQLite 持久化,并包含迁移与测试,能直接跑起来。
适用于:填写完成后要把可编辑表单字段“扁平化”为普通内容,避免对方再次修改字段值。
英文 Prompt:
Create "PDF Form Flattener". Features: - Upload a filled PDF (with form fields). - Provide options: flatten all fields, flatten selected fields. - Output a non-editable PDF while preserving appearance. - Display a before/after difference summary (which fields were flattened). Stack: - Next.js + Type - pdf-lib Deliverables: - Full code + file tree. - Commands + Docker. - Deployment notes. - Tests: at least 5 (flatten selection, unicode values, checkbox/radio, dropdown options, empty fields).中文释义:
让 AI 产出一个可部署的 PDF 扁平化在线工具:支持全量或选择字段扁平化,输出不可编辑 PDF,并给出变更摘要与测试覆盖。
适用于:拿到第三方 PDF 模板时字段命名混乱,开发对接困难;需要把字段定位、重命名并导出字段清单。
英文 Prompt:
Build "PDF Field Mapper". Requirements: - Upload a fillable PDF. - Render a simple page preview with clickable field overlays (bounding boxes). - When selecting a field: show its current name/type and allow renaming. - Export a JSON schema of fields: name, type, page index, bounding box, options. - Allow downloading the updated PDF template with renamed fields. Tech: - Next.js + Type - pdf-lib - Rendering: use pdf.js in the browser for preview overlays. Deliverables: - Full project code and file tree. - Run commands. - Dockerfile. - Deploy guide. - Tests: at least 5, including schema export, rename collision handling, multi-page PDFs, non-ASCII field names.中文释义:
让 AI 生成一个“字段可视化 + 重命名”的在线 PDF 表单工具:支持字段覆盖层定位、重命名、字段 schema 导出与更新后的模板下载,并配套测试。
适用于:需要记录谁在什么时候填写了哪些字段(不记录敏感明文),用于流程追踪与合规审计。
英文 Prompt:
Create "PDF Form Audit Logger". Core: - Upload fillable PDF and fill values. - Maintain an audit log that records: field name, action type (edit/clear), timestamp, and a masked hash of the value. - Allow exporting audit log as JSON and CSV. - Provide a privacy mode: never store raw values on server; only store hashes and lengths. Stack: - Next.js + Type - pdf-lib Deliverables: - Full code + tree. - Commands, Docker, deploy. - Security notes for privacy mode. - Tests: at least 5, including hashing stability, masking rules, CSV export, large logs handling.中文释义:
让 AI 产出一个带“审计日志导出”的在线 PDF 表单工具:只记录哈希与长度等非明文信息,支持 JSON/CSV 导出,适合合规场景。
适用于:同一份表单需要不同角色分步填写(例如甲方填写基础信息、乙方填写补充项),要求字段级别权限与导出一致性。
英文 Prompt:
Build "Step-by-step PDF Form Workflow". Features: - Upload PDF template. - Define roles and field permissions (editable/readonly/hidden) via a simple UI. - Generate share s with a role token (stateless JWT) to open the form with permissions applied. - Each step exports a partially filled PDF and a JSON state blob; next role continues. - Provide a final export. Constraints: - Next.js + Type - pdf-lib - Auth: use signed JWT with a secret; include security notes. Deliverables: - Full project source + file tree. - Run commands. - Dockerfile. - Deploy guide. - Tests: at least 5, including JWT validation, permission enforcement, tamper detection, partial state import/export.中文释义:
让 AI 生成一个“分步流程 + 字段权限”的在线 PDF 表单工具:基于角色令牌控制可编辑字段,支持步骤间状态传递与最终导出,并提供安全说明与测试。