Add Open Heart Protocol for anonymous emoji reactions
Created by: jedmund
Summary
- Add self-hosted Open Heart Protocol API endpoint using Redis
INCRfor atomic emoji counters, with per-IP rate limiting - Add reusable
HeartButtoncomponent with SVG heart icon, localStorage persistence, and accessible markup - Place heart buttons on universe posts, individual photos (inside the metadata card), and album pages
Test plan
-
Click heart on a universe post — fills red, stays filled on refresh -
Click heart on a photo — same behavior, button appears inside metadata card -
Click heart on an album — same behavior -
Heart stays filled after page navigation and return -
Multiple rapid clicks don't send multiple requests (disabled after first click) -
curl -X POST /api/heart/universe/test -d '❤️'→200 "recorded" -
curl /api/heart/universe/test→{"❤️": 1}