feat(badges): add awards, mentorship, and contribution badges

Abierto
#1,953 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
HTML
Estrellas
33
Forks
107
Merge medio
14 h 6 min
PR fusionados (30 d)
19

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de USRSE/usrse.github.io

Todos los issues de USRSE/usrse.github.io

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.