A Telegram Mini App (TMA) that rewards active community participation through AI-powered analysis and blockchain rewards, powered by Dynamic wallet integration.
This project combines Telegram's Mini App functionality with AI-driven community engagement tracking and blockchain rewards. It:
- Analyzes and scores user interactions in Telegram communities
- Distributes ERC20 token rewards across Starknet and EVM chains
- Provides seamless wallet integration through Dynamic
- Ensures secure data handling with Phala Network and Nillion
-
Create a Telegram Bot:
- Use BotFather to create your bot
- Save the Bot TOKEN for later use
-
Setup the project:
git clone <repository-url> cp .env.sample .env
Update
.env
with:- Your Dynamic environment ID (
NEXT_PUBLIC_DYNAMIC_ENV_ID
) - Bot TOKEN from Telegram
- Website URL as LOGIN_URL
- Your Dynamic environment ID (
-
Deploy the website:
- Follow Vercel deployment guide
- Or use your preferred hosting solution
-
Configure Telegram Mini App:
- Use BotFather to set up your Mini App
- Add your deployed website URL
-
Run the Telegram bot:
# Install ts-node if you haven't already npm -g i ts-node # Run the bot ts-node scripts/bot.ts
-
Test the integration:
- Go to your Telegram Bot
- Type
/start
The system leverages several key technologies:
-
AI Processing & Security
- Phala Network for Remote Attestation
- Red Pill API for conversation analysis
-
Data Privacy
- Nillion for encrypted storage
- Secure API endpoints for data access
-
Blockchain Integration
- Dynamic for embedded wallets
- Multi-chain support (Starknet & EVM)
BOT_TOKEN=your_telegram_bot_token LOGIN_URL=your_deployed_website_url
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.