feat: IMAP mail sync with thread-to-contact matching (PRD §6.1)

Real IMAP connection via imapflow library:
- Connects to IMAP server (IMAPFlow, TLS on port 993)
- Fetches recent messages (configurable limit, default 20)
- Extracts: from, fromEmail, subject, date, snippet (200 chars)
- Thread-to-contact matching (PRD §6.1):
  1. Match sender email against persons table
  2. If no person match, extract domain and match against company.website
  3. Returns matchedCompany + matchedPerson for each email
- Audit-logged (action: crm.mailsync:imap)
- Zod validated (host, port, user, password, folder, limit)
- 502 on IMAP connection failure with detail
- 400 on validation failure

Tested: invalid creds → 502 'IMAP connection failed', missing host → 400
This commit is contained in:
Z User committed 2026-10-27 22:50:50 +00:00
1 parent 7acc0c5451
commit e45b68bb8b
1089 files changed
+260614

No files matched your search

+54
View File
@@ -0,0 +1,54 @@
# 互联网产品 / 运营 / 项目管理 关键词库
用于:判断匹配度、生成画像、ATS 关键词覆盖率检查。
## 产品经理(PM)
**Must-have 信号词**
- 需求文档(PRD)、需求评审、产品规划、产品迭代
- 用户访谈、用户画像、JTBD、Persona
- 数据驱动、A/B 测试、漏斗分析、留存、转化率
- 跨部门协作、推动落地、项目管理
- 0-1、1-N、增长、商业化
**方向细分关键词**
- C 端:用户增长、社交裂变、内容生态、ugc、推荐算法理解
- B 端 / SaaS:客户成功、续约、ARR、PLG、CRM
- 国际化 / 出海:本地化、合规、多语言、海外支付
- AI 产品:LLM、prompt 工程、模型评估、RAG、Agent
- 工具类:用户体验、效率、workflow、生产力
**Nice-to-have**
- SQL、Python、Figma、原型工具
- 行业报告输出、PR 经验、对外发声
## 运营
**Must-have**
- 用户运营、内容运营、活动运营、社群运营
- 增长黑客、AARRR、私域、公域
- GMV、ROI、CAC、LTV、转化漏斗
- SOP、流程化、可复制
**方向细分**
- 内容运营:选题、内容矩阵、KOL、爆款方法论
- 用户运营:分层、生命周期、push 策略、CRM
- 活动运营:节点营销、品效合一、预算管理
- 社群运营:社群分层、KOC、转化路径
- 直播 / 电商运营:选品、达人合作、GMV、复购
## 项目经理(PMP / TPM)
**Must-have**
- 项目排期、里程碑、风险管理、stakeholder 管理
- 敏捷 / Scrum / 看板、Sprint planning、retro
- 跨团队协作、跨时区、escalation
**Nice-to-have**
- PMP 证书、PRINCE2、CSM
- 工具:Jira、Confluence、Asana、Notion、Linear、飞书项目
## 反信号(出现这些词,不是好 PM / 运营画像)
- 大段堆砌"参与了 ___"——没有 ownership
- 没有任何数字 / 百分比 / 量化结果
- 全是软技能描述,没有具体动作