这组 Prompts 适合谁
这篇只聚焦“在线预览”一类:让 AI 直接产出可运行的在线工具,用于把用户上传的真实文件(文档/表格/Markdown/日志等)安全地在线预览,并支持批注、评论、版本对比与导出。
每条 Prompt 都要求交付:完整项目源码、清晰文件树、可复制运行命令、Docker 部署说明,以及不少于 5 条测试用例或 QA checklist,便于落地到团队评审、客户阅稿、内部验收、远程协作等场景。
在线多格式文档预览与批注协作工作台
目标:做一个“上传即预览”的在线阅稿工具,支持权限控制、批注留痕、导出与审计。
English Prompt:
Build a production-ready web app named "PreviewHub" for secure online document preview + annotation collaboration.
Scope:
- Users upload files (PDF, DOCX, PPTX, XLSX, TXT/MD).
- Server stores originals (local disk + optional S3), generates preview artifacts (PDF rendering for Office, HTML preview for MD), and serves them via signed URLs.
- UI: file list, preview pane, page/section navigation, zoom, search, comments + highlights, mention @user, activity timeline.
- Export: annotated PDF (for PDFs) OR JSON annotation export for other types; also export an audit log CSV.
- Auth: email/password + JWT sessions; role: admin/editor/viewer; per-file ACL.
- Security: virus scan hook stub, file size limits, MIME sniffing, content-type validation, path traversal protection.
Technical requirements:
- Monorepo with "apps/web" (Next.js 14 + React + Type ) and "apps/api" (Node.js + Fastify + Type ).
- Data : Postgres via Prisma; migrations included.
- Storage: local filesystem by default; provide S3 adapter interface.
- Rendering: for Office -> PDF using LibreOffice in a Docker sidecar; for PDF preview use pdf.js; for MD use markdown-it + mermaid support (render in sandboxed iframe).
- Provide a complete file tree and all source code.
- Provide "npm s" to run dev, test, build.
- Provide Dockerfile(s) and docker-compose.yml for web+api+postgres+lo-renderer.
Testing / QA:
- Add unit tests for ACL checks, signed URL validation, and annotation schema validation.
- Add at least 5 QA checklist items covering upload, preview accuracy, permissions, export, and audit trail.
Output format:
1) File tree
2) Key architecture notes
3) Full code blocks for all files
4) Commands to run locally
5) Deployment instructions (Docker Compose + basic hardening notes)
中文释义: 让 AI 生成一个真正可部署的在线阅稿系统:上传真实文件后可在线预览,并能做批注/评论/权限控制/导出与审计,适合团队评审与客户验收。
DOCX/PPTX 预览与逐页评论工具
目标:专注 Office 文档预览,把评论锚定到“页/幻灯片/段落”,支持@提醒与导出。
English Prompt:
Create a web tool that converts DOCX and PPTX to a stable preview (PDF + per-page thumbnails) and provides threaded comments anchored to page number + bounding boxes.
Requirements:
- Backend: Node.js (Fastify) + Type ; queue conversion jobs; store conversion status; retry with backoff.
- Conversion: LibreOffice in Docker; generate preview PDF + PNG thumbnails.
- Frontend: React + Type ; show pages, click to place comment pin; list comment threads; resolve/unresolve.
- Data model: documents, pages, comments, users.
- Export: export comments to JSON and to a DOCX-like plain text review report.
Deliverables:
- Full repo code + file tree
- Docker compose (api + postgres + converter)
- Commands to run
- At least 5 tests or QA checks (conversion, page mapping, permissions, export, retry logic)
中文释义: 让 AI 产出一个 Office 在线预览 + 评论系统,重点是“锚定位置”和“可导出审阅报告”,用于跨团队远程审稿。
PDF 在线预览、检索与高亮批注导出
目标:把 PDF 预览做扎实:全文检索、跳页、批注高亮、导出 JSON 与可合并的批注数据。
English Prompt:
Build a PDF web viewer with search, outline navigation, and annotation (highlight/underline/note).
Constraints:
- Use pdf.js for rendering.
- Persist annotations in Postgres; schema includes page, rects, color, note, createdBy, createdAt, version.
- Provide endpoints to export/import annotations JSON, with validation and conflict resolution (last-write-wins + optional merge).
- Add a "review mode" that lists all annotations grouped by page and user.
Deliverables:
- Full code (web + api)
- Local run commands
- Docker compose
- At least 5 QA checklist items (large PDFs, search accuracy, annotation persistence, export/import, multi-user concurrency)
中文释义: 让 AI 做一个可部署的 PDF 在线阅稿器:预览+检索+批注+导出/导入,适合合同、标书、说明书等文档审阅。
Markdown/文本在线预览与版本对比阅稿台
目标:用于技术文档:Markdown 预览、差异对比、评论与一键生成审阅清单。
English Prompt:
Create a web app for Markdown preview + version diff review.
Features:
- Upload or paste Markdown; store versions; render preview with markdown-it; support code fences, tables, and Mermaid diagrams (render safely).
- Provide side-by-side diff between versions, and allow inline comments anchored to diff hunks.
- Export a review checklist (markdown + JSON).
Tech:
- Frontend: Vite + React + Type
- Backend: Node.js + Fastify + SQLite (for easy self-host)
- Provide Dockerfile and docker-compose.yml
Testing:
- Add tests for diff anchoring stability, Mermaid sandboxing, export format validity, and permissions. Include 5+ QA checks.
中文释义: 让 AI 生成一个技术文档在线阅稿台:Markdown 预览 + 版本对比 + 评论锚定 + 导出审阅清单,适合 PRD/README/接口文档评审。
表格/CSV 在线预览、筛选与列级标注工具
目标:让业务同学能在线看表、筛选、标注列含义与异常行,导出标注结果。
English Prompt:
Build an online spreadsheet preview tool for CSV/XLSX with filtering, sorting, column de ion annotations, and row-level issue tagging.
Requirements:
- Parse XLSX server-side, normalize to columnar JSON, stream large files.
- UI shows virtualized table, filters, and a "Data dictionary" panel per column.
- Allow tagging rows (e.g., "missing value", "outlier") and exporting tags + column notes to JSON/CSV.
- Add access control and audit logs.
Deliverables:
- Full code + file tree
- Run commands
- Docker compose
- 5+ QA checks (large file performance, encoding, export correctness, permission, audit)
中文释义: 让 AI 产出一个在线表格预览与标注工具:既能看数据也能沉淀数据字典/异常标注,适合数据交付与验收。
日志文件在线预览、搜索与脱敏审阅台
目标:把日志以“安全可分享”的方式在线预览,支持搜索与敏感信息脱敏规则。
English Prompt:
Create a web app to preview large log files (plain text) with fast search and masking rules.
Features:
- Upload .log/.txt; store; build an index for fast search (simple trigram index or ripgrep-like scanning).
- Define masking rules (regex presets for emails, phone numbers, tokens) applied on-the-fly; never modify the original.
- Share read-only s with expiration; show audit of accesses and searches.
Deliverables:
- Full code + file tree
- Local run + Docker
- 5+ tests/QA checks (masking correctness, performance, expiry, audit, upload limits)
中文释义: 让 AI 生成一个“可控分享”的日志在线预览工具:检索快、可脱敏、可审计,适合排障协作与对外提供复现材料。
预览链接签名与权限网关(可嵌入到现有系统)
目标:只做一个小而强的“预览网关”,通过签名 URL 给任何文件提供临时预览能力。
English Prompt:
Implement a standalone "Preview Gateway" service that issues signed preview URLs for stored documents and enforces per-user permissions.
Requirements:
- REST API: createFile, getFile , createSignedPreviewUrl(expiry, scopes), revokeUrl.
- Validate signatures (HMAC), expiry, and scopes; rate-limit; log access.
- Provide a minimal web UI to test preview s (PDF + text).
- Provide integration guide: how to call from an existing app.
Deliverables:
- Full source code + file tree
- Docker deployment
- Tests for signature validation, expiry, scope checks, revocation. Provide 5+ QA checks.
中文释义: 让 AI 生成一个可复用的预览权限网关:通过签名链接把预览能力安全地嵌入到你现有系统里。
预览系统运维后台:存储清理、版本归档与审计报表
目标:让预览系统“能长期跑”:有存储策略、归档、清理、审计报表与告警。
English Prompt:
Add an admin dashboard for a document preview system.
Features:
- Storage overview (count, size by type), retention policies, scheduled cleanup job (dry-run + apply).
- Versioning/archiving: keep N versions per file; export archive bundle.
- Audit reports: per user access, per file access, export as CSV; filters by date range.
- Health page: DB connectivity, converter availability, disk usage threshold warnings.
Deliverables:
- Full code + file tree
- Docker compose
- 5+ QA checks (cleanup safety, permissions, report correctness, health checks, retention)
中文释义: 让 AI 生成一套预览系统的运维后台:能看存储、做归档清理、导出审计报表,避免工具上线后无人维护。