Skip to content

feat(growth): Discord/Telegram bot commands, ROI Calculator, and Streak Celebration Modal - #1504

Merged
joelpeace48-cell merged 3 commits into
FinesseStudioLab:mainfrom
KidDev88:feat/growth-bots-roi-streak-1349-1352
Oct 21, 2026
Merged

joelpeace48-cell merged 3 commits into
FinesseStudioLab:mainfrom
KidDev88:feat/growth-bots-roi-streak-1349-1352

Conversation

@KidDev88

Copy link
Copy Markdown
Contributor

Closes #1349, Closes #1350, Closes #1351, Closes #1352

Type of Change

  • New feature (non-breaking change that adds functionality)

Summary

This PR adds four growth-engine features: a Discord /trivela-stats slash command for real-time campaign metrics (#1349), a Telegram /claim command for checking claimable reward balances (#1350), an interactive Campaign ROI Calculator for marketing partners (#1351), and an animated streak celebration modal for 7-day/30-day milestones (#1352).

Motivation / Context

Closes #1349, Closes #1350, Closes #1351, Closes #1352 — all four features drive user acquisition, viral loops, sponsor engagement, and user retention across the Trivela platform.


Changes

Issue Change Files
#1349 Discord bot /trivela-stats service + webhook route backend/src/services/discordBotService.js, backend/src/routes/discordBot.js
#1350 Telegram bot /claim service + webhook route backend/src/services/telegramBotService.js, backend/src/routes/telegramBot.js
#1351 Campaign ROI Calculator component frontend/src/components/CampaignRoiCalculator.jsx + .css
#1352 Streak celebration modal frontend/src/components/StreakCelebrationModal.jsx + .css, frontend/src/utils/streakMilestone.js
All Route registration backend/src/index.js

Testing

  • Backend: 10 unit tests (node --test) covering Discord PING/pong, stats aggregation, active-campaign detection, Telegram claim summary, command routing, and edge cases — all pass.
  • Frontend: 11 unit tests (vitest) covering ROI calculation branches, invalid input handling, milestone detection, modal rendering, keyboard dismiss, and click dismiss — all pass.
  • Lint: ESLint clean on all new and modified files (0 errors).
# Backend
node --test backend/src/services/discordBotService.test.js backend/src/services/telegramBotService.test.js
# Frontend
npx vitest run src/components/CampaignRoiCalculator.test.jsx src/components/StreakCelebrationModal.test.jsx

Tradeoffs

  • Bot services are framework-agnostic handler functions — no Discord.js/telegraf dependency added. Integration with actual bot frameworks can wrap these services.
  • ROI calculator uses a simplified revenue model (3x cost-per-participant for converted users) — suitable for estimation; can be refined with historical data later.
  • Streak modal triggers on exact milestones (7, 30) only; the isStreakMilestone utility is exported for reuse.

Out of scope

  • Actual Discord/Telegram bot process registration and webhook secret verification (left as optional middleware hooks).
  • Wiring the streak modal into the UserDashboard (component is self-contained and ready to integrate).
  • Backend API contract/OpenAPI documentation for the new bot routes.

…mands

Adds Discord slash-command handler for real-time campaign metrics (FinesseStudioLab#1349)
and Telegram /claim command for claimable reward balances (FinesseStudioLab#1350).
Both expose webhook routes mounted under /api/v1 with validation and
error boundaries. Includes unit tests for all command branches.
…oLab#1351)

Provides marketing partners a tool to estimate engagement and retention
ROI from budget, reward-per-action, participant count, and conversion rate.
Includes responsive layout and unit tests for calculation branches.
…ab#1352)

Shows a celebration modal when users hit 7-day or 30-day activity streak
milestones. Includes pop/bounce animations, keyboard dismiss support,
and a reusable isStreakMilestone utility. Unit tests cover milestone
detection and modal interaction.
@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@KidDev88 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@joelpeace48-cell
joelpeace48-cell merged commit 11727da into FinesseStudioLab:main Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants