[SO-279] Engagement Tracking, Airdrop Points & Leaderboard MVP (Twitter Mentions + Discord Bot) - #281
Open
ewitulsk wants to merge 2 commits into
Open
Conversation
Engagement→airdrop pipeline (design doc: docs/engagement-airdrop-plan.md):
- twitter-service: signed read endpoints GET /mentions (recent search for
tweets mentioning an account) and GET /tweets/metrics (refresh counters
for up to 100 tweets), sharing the existing OAuth 1.0a signer.
- engagement-service (new, internal :9017): polls twitter-service for
mentions, persists per-tweet like/retweet/reply/quote counters in
Postgres (diesel + embedded migrations), derives engagement/airdrop
points from config weights (ambassador multiplier), serves
GET /leaderboard and GET /points/{handle}.
- airdrop-bot (new, public :9018): Discord slash-command bot — a separate
Discord application + deployment from social-bot — with read-only
/leaderboard and /points commands served from engagement-service.
- Deployment wiring (staging-only, like twitter-service/social-bot):
Dockerfiles, bake.hcl targets, affected.py, deploy.sh, render-secrets.sh
(options/<env>/airdrop-bot), compose entries, nginx route, terraform
secret placeholder.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CacZTy2eX51YUrMNcnpKm7
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CacZTy2eX51YUrMNcnpKm7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SO-279
Engagement→airdrop pipeline MVP — fleshed-out plan in
docs/engagement-airdrop-plan.md.GET /mentions?account=…[&since_id=…](recent search: original tweets mentioning@account, withpublic_metrics+ author expansion) andGET /tweets/metrics?account=…&ids=…(refresh counters for up to 100 known tweets). ExistingPOST /tweetspath untouched.engagement_<env>DB). Points are derived at read time from[points]config weights (engagement_points = likes*1 + replies*2 + retweets*3 + quotes*4,airdrop_points = engagement*10 * 1.5x for ambassadors), so tuning weights/the ambassador roster is a config deploy with no backfill. ServesGET /leaderboard?limit=NandGET /points/{handle}./staging/airdrop-bot/): Discord slash-command bot — deliberately a separate Discord application + deployment from social-bot — with read-only/leaderboard [count]and/points <handle>commands (Ed25519-verified webhooks, defer + follow-up, no allow list needed).options/staging/airdrop-bot), docker-compose.staging.yml, nginx route, terraform secret placeholder.Notes
engagement-service/src/points.rs) rather than a fourth service — it has no state of its own yet; split it out when the airdrop program grows claims/epochs/on-chain distribution (rationale in the design doc)./pointsis case-insensitive (404 when untracked); airdrop-bot answers a signed Discord PING, rejects unsigned requests (401), and defers + follows up on a signed/leaderboardcommand. Unit tests cover points math, ranking/ties, OAuth signature vector, Discord signature verify, and message formatting.engagement_stagingDB + role, terraform apply for the new secret, fill the new Discord app's public key, register slash commands (seeservices/airdrop-bot/README.md).🤖 Generated with Claude Code
https://claude.ai/code/session_01CacZTy2eX51YUrMNcnpKm7
Generated by Claude Code