Skip to content

feat: implement Telegram Mini App with encrypted backup and gamification (#96)#690

Closed
FloodExLLC wants to merge 2 commits intostoracha:mainfrom
FloodExLLC:fix/issue-96
Closed

feat: implement Telegram Mini App with encrypted backup and gamification (#96)#690
FloodExLLC wants to merge 2 commits intostoracha:mainfrom
FloodExLLC:fix/issue-96

Conversation

@FloodExLLC
Copy link
Copy Markdown

Summary

Implements the Telegram Mini App for issue #96 ([BOUNTY] Telegram Mini App).

What was added

Backend ()

  • — New gamification API routes:
  • — Top 10 users by points (public)
  • — Current user's points, rank, and tier (authenticated)
  • — Social tasks with completion status (authenticated)
  • — Complete a task and earn points (authenticated)
  • Task types: follow_x (50pts), join_discord (50pts), invite_friend (100pts), share_backup (25pts)

Frontend ()

  • — Entry point with Telegram WebApp SDK script
  • — React entry point
  • — TypeScript interfaces (User, Backup, LeaderboardEntry, Task)
  • — API client with Telegram initData auth header
  • — Main app with view routing and Telegram WebApp integration
  • — User greeting, points display, quick actions, upgrade banner
  • — List/delete/download backups
  • — Create encrypted backup form
  • — Top users ranked by points
  • — Social tasks with claim buttons
  • — Backup detail view
  • — Points history and tier display
  • — Telegram WebApp login screen
  • — Bot prevention verification

Features Implemented

  • ✅ Authentication via Telegram ID using WebApp initData validation
  • ✅ Bot prevention via Humanode BotBasher integration
  • ✅ Encrypted backup creation (AES-256-CBC) uploaded to Storacha
  • ✅ Downloadable HTML preview files of backed-up data
  • ✅ Backup deletion with point deduction
  • ✅ Points system (1 pt/KB uploaded, -0.5 pts/KB deleted)
  • ✅ Leaderboard and ranking display
  • ✅ Social tasks for bonus points
  • ✅ Free/Pro plan display with upgrade path
  • ✅ Telegram WebApp theme integration

Test plan

  • Configure from with Telegram bot token
  • Run in to start server + Vite dev server
  • Open mini app via Telegram bot or test in browser with mock initData
  • Verify authentication flow works with Telegram WebApp
  • Test backup creation with sample message data
  • Verify leaderboard and points tracking

Closes #96

🤖 Generated with Claude Code

Implements the Telegram Mini App (issue storacha#96) with:
- React frontend (src/miniapp/) with Dashboard, BackupList, CreateBackup,
  Leaderboard, Tasks, and supporting components using Telegram WebApp API
- Gamification routes (src/server/routes/gamification.ts) with leaderboard,
  points tracking, and social task completion endpoints
- Encrypted chat backup to Storacha decentralized storage
- Points system (1 pt/KB uploaded), leaderboard, and social tasks
- Humanode BotBasher integration for bot prevention
- SQLite database for user/backup/points metadata

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@FloodExLLC FloodExLLC requested a review from alanshaw as a code owner March 22, 2026 14:14
…mponents

- BackupPreview: shows IPFS CID, encryption info, and HTML download button
- PointsDashboard: tabbed view with overview, history and social tasks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@FloodExLLC FloodExLLC closed this Mar 22, 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

Development

Successfully merging this pull request may close these issues.

[BOUNTY] Telegram Mini App

2 participants