nomadro/apps/notify/README.md
Eric ffa456afdf Ship social join profile + SeaweedFS avatars, notify/coffee, and .com audience stack.
Pay-then-profile join desk with live card, S3 upload fallback, hydration-safe drafts; document on test9 README.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-04 02:25:05 +08:00

37 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Notify — Novu-domain secondary-dev (Next + FastAPI)
读开源 **Novu** 域模型后自研,模块化进 Nomadro(Fair Use;非 iframe / 非原样塞 upstream UI):
| 能力 | 参考源码 | UI | API |
|------|----------|----|-----|
| Inbox | Novu Inbox / messages | `/social/notifications`(分类 · 已读 · 删除) | FastAPI `notify_svc` `/api/notify/v1` |
| Settings | Preferences / channels | `/social/notifications/settings` | 免打扰 · 邮件 · 浏览器推送 |
| Workflows | Workflow + steps (in_app / email / sms / push / chat / delay / digest) | `/social/notify/workflows` | 同上 |
| Subscribers / Topics | Subscriber · Topic | `/social/notify/subscribers` · `/topics` | 同上 |
| Trigger / Activity | Event · Notification · Jobs | `/social/notify/activity` | `POST /events/trigger` |
## 本地
```bash
pnpm notify:fetch # 可选:对照源码 → apps/notify/upstream/novu
pnpm dev:notify-api # uvicorn notify_main:app :8023
pnpm dev # http://localhost:3000/notifications
```
门户经 `src/app/api/notify/v1/[[...path]]` 同源代理到 `NOTIFY_API_URL`(默认 `http://127.0.0.1:8023`)。顶部铃铛在 `SiteShell`。
## 首期范围
- **用户收件箱**:分类(社交/搭子/项目/系统)、点击跳转、全部/单条已读、删除
- **偏好**:免打扰、邮件订阅、浏览器推送授权
- **In-App**:即时写入收件箱;编排台仍在 `/social/notify`
- **Workflow 编辑与触发**:订阅者或 Topic fan-out
- **外发通道**(email / sms / push / chat):记录 `queued_stub` 投递意图,不接真实供应商
- **Delay / Digest / Throttle**:步骤可编排,执行记 `skipped_recorded`
## 数据与反模式
- SQLite:`data/notify/notify.sqlite3`(或 `NOTIFY_DATA_DIR`)
- Upstream 仅参考:`apps/notify/upstream/*`(`pnpm notify:fetch`)
- **禁止** iframe / 二级域 / 跑官方 Novu Docker UI 当产品页