This repository contains three main components:
- Mini App - A Telegram Mini App frontend.
- Telegram Bot - A backend node server for generating URLs to perform EVM transactions and handle bot interactions.
- Web3 Bridge UI - A frontend application where users can execute transactions via the links generated by the server.
- Overview
- Folder Structure
- Installation and Setup
- Mini App
- Telegram Bot
- Web3 Bridge UI
- Contribution
- License
The TG-Omnichain-Mini-App is a Telegram Mini App integrated with a backend server (Telegram bot) and a Web3 bridge. The mini-app allows users to interact with EVM blockchains directly from within Telegram, performing various operations like token transfers, approvals, and minting.
tg-omnichain-mini-app/
│
├── mini-app/ # Frontend for the Telegram Mini App
│
├── telegram-bot/ # Node server and bot for URL generation and backend services
│
└── web3-bridge-ui/ # Frontend UI for executing Web3 transactions
- Clone the repository:
git clone https://github.com/CJskii/tg-omnichain-mini-app.git cd tg-omnichain-mini-app
- Each component (
mini-app
,telegram-bot
,web3-bridge-ui
) has its own dependencies and setup. Navigate to the respective folders and follow the instructions below.
- User-friendly interface for initiating EVM transactions within Telegram.
- Allows users to connect their wallets and execute transactions like approve, mint and bridge NFTs.
- Integrated modals and components for a smooth user experience.
- Framework: Next.js
- Styling: Tailwind CSS
- Telegram SDK:
@telegram-apps/sdk-react
- Navigate to the
mini-app
directory:cd mini-app
- Install the dependencies:
npm install
- Create a
.env.local
file with the necessary environment variables:NEXT_PUBLIC_ENVIROMENT="local" # local | production NEXT_PUBLIC_PROD_API_URL="" # Production API URL NEXT_PUBLIC_LOCAL_API_URL="" # Local API URL
- Start the development server:
npm run dev
- Open the app in your browser: http://localhost:3000.
- Serves URL links for EVM transactions to the mini app.
- Listens to transactions of specified wallets using WebSockets.
- Supports multiple wallets and chains (e.g., Arbitrum, Base, BSC).
- Backend: Node.js, Express, Grammy (tg-bot)
-
Navigate to the
telegram-bot
directory:cd telegram-bot
-
Install the dependencies:
npm install
-
Create a
.env
file with the necessary environment variables:# Server variables NODE_ENV= # development | production PORT=3001 # Port to run the server BRIDGE_URL= # URL of the web3 bridge NODE_SERVER_URL= # URL of the server # Telegram bot variables TELEGRAM_BOT_API_KEY= # Telegram bot API key TELEGRAM_APP_EXTERNAL_URL= # your mini app's external URL TELEGRAM_GAME_URL= # generated from BotFather
-
Start the server:
npm run start
-
The server will be running at http://localhost:3001.
- Acts as a bridge to execute Web3 transactions based on links generated by the server.
- Allows users to sign transactions and interact with the blockchain directly from the mini app UI.
- Framework: Next.js
- Blockchain Interaction:
ethers, wagmi, viem, rainbowkit
- Styling: Tailwind CSS
- Navigate to the
web3-bridge-ui
directory:cd web3-bridge-ui
- Install the dependencies:
npm install
- Start the development server:
npm run dev
- Open the app in your browser: http://localhost:3002.
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Commit your changes and open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.