Starter template for a new TWA interacting with the Avalanche Fuji blockchain using the Thirdweb SDK
This project is forked from twa-template
The project is highly-opinionated, and there are many other alternate routes it could have taken. Some examples:
- A react-based TWA-ready app, interacting with Avalanche Fuji Network
- Uses vite with react (alternative to create-react-app)
- Uses the
thirdweb
npm package
- Node.js v16 (other versions may work, needs more testing)
- A ThirdWeb Client ID
- A react-based TWA-ready app, interacting with Avalanche Fuji Network
- Github actions set to deploy app to github pages
- A script to connect a telegram bot to the deployed app
-
Create a template from this repo with the "Use this template" button
- Choose a name for your repo
**IMPORTANT!!**
mark "Include all branches", otherwise github pages deployment will not work.
-
Clone this repo and run
yarn
to install packages -
Create a
.env
in the project root and setVITE_THIRDWEB_CLIENT_ID
with your own client ID from Thirdweb -
Create a new bot with botfather
- Type
/newbot
- Choose a name for your bot, e.g.
My Avalanche TWA
- Choose a username for your bot, e.g.
my_avalanche_twa_482765_bot
- Take note of the access token, e.g.
5712441624:AAHmiHvwrrju1F3h29rlVOZLRLnv-B8ZZZ
- Run
yarn configbot
to link your bot to the webapp
- Type
- Run
yarn run dev
and edit the code as needed - On push to the
main
branch, the app will be automatically deployed via github actions.
MIT