Skip to content

Fix: [BOUNTY] Telegram Mini App#691

Open
jrhous wants to merge 4 commits intostoracha:mainfrom
jrhous:fix/issue-96
Open

Fix: [BOUNTY] Telegram Mini App#691
jrhous wants to merge 4 commits intostoracha:mainfrom
jrhous:fix/issue-96

Conversation

@jrhous
Copy link
Copy Markdown

@jrhous jrhous commented Mar 22, 2026

Fixes #96


Submitted by automated bounty agent

jrhous and others added 2 commits March 22, 2026 10:13
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>
…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>
@jrhous jrhous requested a review from alanshaw as a code owner March 22, 2026 17:13
jrhous and others added 2 commits March 22, 2026 13:31
- Remove non-existent grammy-types dependency (types bundled in grammy)
- Fix TS2742 inferred type errors on express app/router declarations
- Add skipLibCheck and lib options to tsconfig.server.json
- Add vitest.config.ts for server-side test discovery
- Add 9 passing tests for encrypt/decrypt and points calculation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- auth.test.ts: 13 tests covering validateTelegramWebAppData (valid
  requests, tampered hashes, wrong bot token, expired auth_date,
  boundary conditions, missing hash, malformed input)
- db.test.ts: 23 tests covering all db.ts exports using an in-memory
  mock of better-sqlite3 (works without native binaries):
  getOrCreateUser, getUserByTelegramId, updateUserStoracha,
  createBackup, getUserBackups, updateBackup, deleteBackup,
  addPoints, getLeaderboard

All 45 tests pass (9 existing storacha.test.ts + 13 auth + 23 db)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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

1 participant