feat(soldados): Nostr social (zaps, follows, ranking) + newsletter CRM proxy#35
feat(soldados): Nostr social (zaps, follows, ranking) + newsletter CRM proxy#35agustinkassis wants to merge 3 commits into
Conversation
Add POST /api/events-subscribe as a server-only proxy to La Crypta's CRM subscribe endpoint, configurable via EVENTS_SUBSCRIBE_URL / EVENTS_SUBSCRIBE_LISTS. Rework NewsletterCTA to use it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nking Add to the soldiers pages: - Zap button (NIP-57) with amount/message, WebLN auto-pay, QR + LNURL-pay fallback to any valid lightning address (not only NIP-57-advertised ones). - Live "Zaps recibidos" wall: real-time kind-9735 subscription, sender + text. - Follow/unfollow (NIP-02) button with status (Siguiendo / Te sigue / Se siguen), hover "Dejar de seguir", and a styled confirm dialog with the user's avatar. Added to the profile, grid and table views via a batched follows provider. - Grid cards: social-style Nostr banner cover behind the avatar; incomplete profiles (no name/avatar) sort to the end. - Admin "Recrear ranking": recompute the ranking from all sources (curated + Nostr), publish it as a server-signed (LACRYPTA_NSEC) kind-30078 replaceable snapshot, server-cache it, and render snapshot + newer Nostr submissions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 23 minutes and 43 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (22)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The ranking sourced curated data only from lib/projects.ts PROJECTS, a hand-maintained subset that had drifted out of sync with the authoritative per-hackathon files (data/hackathons/projects-<id>.json). Whole hackathons (all of commerce) and several identity projects — plus their jury positions — were therefore uncounted. - Ingest allProjects() (foundations/identity/commerce, with reports.position) as a curated source in computeRanking, matching team members by the same multi-identity heuristic as the Nostr pass; the existing dedupe collapses overlaps with the PROJECTS pass. - Populate wapubot's empty team in projects-commerce.json. Now e.g. Fred is credited Cursats (commerce, 1st → +10): 2 → 12 pts, and landaverdend's 3rd hackathon (wapubot, commerce) shows. Closes #34 Closes #33 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Adds a set of Nostr-native social features to the soldiers pages, plus a newsletter signup proxy. Built across this session.
Soldados — Nostr social
Siguiendo/Te sigue/Se siguen), hover → redDejar de seguir, and a styled confirm dialog with the user's avatar. Available on the profile, grid and table views via a batched follows provider (one relay round-trip for all rows).PROJECTS+reports.json+ Nostr submissions), publishes it as a server-signed (LACRYPTA_NSEC) kind-30078 replaceable snapshot, server-caches it, and renders snapshot + newer Nostr submissions merged on top. Button is admin-gated (NEXT_PUBLIC_LACRYPTA_ADMIN_NPUB).Newsletter
POST /api/events-subscribe— server-only proxy to La Crypta's CRM subscribe endpoint (EVENTS_SUBSCRIBE_URL/EVENTS_SUBSCRIBE_LISTS); reworkedNewsletterCTAto use it.Architecture notes
LACRYPTA_NSEC→ publishes →revalidateTag. Read vialib/nostrSoldiersCache.ts("use cache", static-null fallback to live compute).LACRYPTA_NSEC,NEXT_PUBLIC_LACRYPTA_ADMIN_NPUB,REVALIDATE_SECRET).Verification
pnpm exec tsc --noEmitclean./soldadosrenders 200 via the snapshot → live-fallback pipeline (no snapshot published yet)./api/soldiers/rankingrejects unauthorized requests (400 missing request, 401 bad signature); admin/publisher pubkeys configured and distinct.🤖 Generated with Claude Code