feat(badges): add awards, mentorship, and contribution badges
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript
调研方向
Start with computeBadges, the event_attendances schema for foreign-key and cascade conventions, and HexStamp.tsx for fallback glyphs. Review how the three tables should support the listed award, mentorship, and contribution badges, including the public/discoverable partner condition. Done means the migrations, seed entries, badge computation, tooltips, and fallback visuals cover the stated requirements.
由索引模型根据 Issue 内容生成。
描述
Summary
Phase 3 of the badge expansion. Adds three new tables — `awards`, `mentorship_pairings`, `community_contributions` — and wires `computeBadges` to surface ~15 new badges spanning recognition, paired mentorship, and sustained contribution to community resources.
Requirements
Schema
- `awards` table: id, name, slug, description, tier (e.g., 'lifetime' | 'annual' | 'special'), visual accent. Plus `user_awards` (user_id, award_id, awarded_at, citation, awarding_event_id?).
- `mentorship_pairings` table: id, mentor_id, mentee_id, program_slug, started_at, ended_at?, notes?. Both sides earn a paired badge with the partner's name in the tooltip.
- `community_contributions` table: id, contributor_id, kind ('newsletter' | 'tutorial' | 'guide' | 'translation' | 'comm-call-host' | ...), title, url?, published_at. One row per attributed contribution.
Badges
- USRSE Award (parameterized — one badge kind, accent + label vary by award tier).
- Rising Star, Mentor of the Year, Excellence in Service, Lifetime Achievement (named awards, derive from `user_awards` joined to `awards`).
- Mentor / Mentee badges from `mentorship_pairings`.
- Newsletter Contributor, Resource Author, Tutorial Author, Translator, Community Call Host from `community_contributions` filtered by kind.
- First Contribution milestone (one per user, on first `community_contributions` row).
- Sustained Contributor — 5+ contributions across any kind.
Visual
- Premium awards (Lifetime Achievement, Excellence) are good R2 artwork candidates — see # for the storage strategy.
- Default fallback glyphs in `HexStamp.tsx` for awards without commissioned artwork.
Context
Phases 1 and 2 (#1951, #1952) widen `computeBadges` to accept richer existing data without schema changes. This phase introduces the tables that don't exist yet. Each table is small and additive — none of them couple to existing tables in a way that risks the rest of the data model.
Implementation Notes
- Generate the migration via `drizzle-kit generate` for the three new tables. Mirror the FK and cascade rules from `event_attendances` (cascade on user delete, set null on awarding_event delete).
- Awards seed: start with the actual USRSE community awards as approved entries (Service Award, etc.) — admin tooling to grant them comes later.
- Mentorship pairing badge tooltip should include the partner's display name, surfaced via a join in `computeBadges`. That's a privacy-tinted decision — only show the partner if both are public/discoverable.
- Contribution-attribution should accept a free-text `title` plus optional `url` so we can backfill historical contributions before building any admin UI.
- 主要语言
- HTML
- 星标
- 33
- 派生
- 107
- 平均合并
- 14 小时 6 分钟
- 30 天内合并 PR
- 19
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
USRSE/usrse.github.io 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
USRSE/usrse.github.io#2117 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 63/100
USRSE/usrse.github.io#2115 · 1 条评论 ·
维护者通常 1 天内回复
-
broken-links
难度 2/5 1-3 小时 新手友好度 88/100
USRSE/usrse.github.io#2099 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
USRSE/usrse.github.io#2085 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
USRSE/usrse.github.io#2001 ·
维护者通常 1 天内回复
查看 USRSE/usrse.github.io 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
genfeedai/genfeed.ai#11828 ·
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 1/5 1 小时以内 新手友好度 83/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
ExpressionEngine/ExpressionEngine#5493 ·
维护者通常 5 天内回复
-
难度 1/5 1 小时以内 新手友好度 95/100
-
integration: llama_cpp
难度 2/5 1-3 小时 新手友好度 78/100
home-assistant/core#195670 · 2 条评论 ·
维护者通常 1 天内回复