Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ton-community/twa-template
Boilerplate starter template for a new Telegram Web App (TWA) interacting with the TON blockchain
https://github.com/ton-community/twa-template
hacktoberfest
Last synced: 19 days ago
JSON representation
Boilerplate starter template for a new Telegram Web App (TWA) interacting with the TON blockchain
- Host: GitHub
- URL: https://github.com/ton-community/twa-template
- Owner: ton-community
- License: mit
- Created: 2022-09-21T17:16:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-20T13:13:23.000Z (about 1 year ago)
- Last Synced: 2024-07-31T20:39:36.119Z (5 months ago)
- Topics: hacktoberfest
- Language: TypeScript
- Homepage:
- Size: 3.79 MB
- Stars: 160
- Watchers: 10
- Forks: 80
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ton - ton-community/twa-template - Template for a new TWA interacting with the TON. (🧑💻 Get Coding / Dev Tools)
README
# twa-template
> Starter template for a new TWA interacting with the TON blockchain
# Overview
The project is highly-opinionated, and there are many other alternate routes it could have taken. Some examples:
- Supports Ton Connect 2 wallets
- Uses vite with react (alternative to create-react-app)
- Uses the `ton` npm package# Prerequesities
- Node.js v16 (other versions may work, needs more testing)
- A TON Connect compatible wallet (e.g. [Tonkeeper](https://tonkeeper.com/))# What does this repo contain?
- A react-based TWA-ready app, interacting with TON
- Github actions set to deploy app to github pages
- A script to connect a telegram bot to the deployed app# How to use
1. Create a template from this repo with the "Use this template" button
1. Choose a name for your repo
2. `**IMPORTANT!!**` mark "Include all branches", otherwise github pages deployment will not work.
![image](https://user-images.githubusercontent.com/5641469/191731317-14e742fd-accb-47d4-a794-fad01148a377.png)2. Clone this repo and run `yarn`
3. Create a new bot with [botfather](https://t.me/botfather)
1. Type `/newbot`
2. Choose a name for your bot, e.g. `My Ton TWA`
3. Choose a username for your bot, e.g. `my_ton_twa_482765_bot`
4. Take note of the access token, e.g. `5712441624:AAHmiHvwrrju1F3h29rlVOZLRLnv-B8ZZZ`
5. Run `yarn configbot` to link your bot to the webapp# Development
1. Run `npm run dev` and edit the code as needed
2. On push to the `main` branch, the app will be automatically deployed via github actions.# Roadmap
- [ ] Jetton transfer support
# License
MIT