实现站内通知与邮件通知

Open
#16 0 comments 0 reactions 0 assignees View on GitHub

@linuxsuren-fs is already working on this.

Since Nov 14, 2026.

  • #22 by @linuxsuren-fs — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
api, backend, frontend

Research direction

Read #7 for the event contract and recipient rules, #13 for the event publishing points, and #5 for the polling agreement. Then trace the existing API, database, SMTP, and frontend entry points to see how this feature fits. Done means event recipients and self-notification behavior pass integration tests, notification APIs and email handling work, and the bell, unread count, list, read action, and workbench integration are usable.

Written by the indexing model from the issue text.

Description

help wanted P0

Background

通知让工单流转触达到人。事件契约与接收人规则见 #7,本 issue 实现站内通知与邮件两个订阅者,以及前端通知组件。

Technical requirement

  • 订阅 internal/events(#13 已接入发布点):按 #7 的接收人规则表计算收件人;
  • 站内通知:写 notifications 表(title / body 由服务端按事件组装为数据内容,非界面固定文案);GET /api/notifications 分页、POST /api/notifications/read 标记已读(ids 或全部);未读数端点或并入 me;
  • 邮件:SMTP 配置存在时发送;模板 P0 用简单文本模板(Go text/template);发送失败仅记 error 日志,不重试不阻断;
  • 订阅者 panic 隔离(recover),单个订阅者异常不影响其他订阅者与业务事务;
  • 前端部分:顶栏通知铃铛 + 未读数(30s 轮询,#5 约定)+ 通知下拉列表 + 标记已读;点击跳转对应工单详情。

Expect

  • 集成测试:每类事件的接收人正确、操作者本人不收到自己操作的通知;
  • 前端通知组件挂入 #18 工作台布局后可用。

Potential TODO list

  • notifications 迁移与 repository
  • 事件订阅 + 接收人规则
  • 站内通知端点
  • SMTP 发送与文本模板
  • 前端铃铛 / 列表 / 已读

依赖

#7 契约冻结;#13(事件已发布)。

Dominant language
No language data
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LinuxSuRen/tick-flow

All issues in LinuxSuRen/tick-flow

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.