This is a basic and straightforward Telegram Mini App(TMA) implemented using plain React (Vite). This project aims to provide a minimalistic example of how to create a simple TWA, location access and launch it within Telegram without relying on complex build tools or bleeding-edge libraries.
- App is available via direct link: https://t.me/weatherminiappbot?startapp
- Or you can launch app with a bot menu button: https://t.me/weatherminiappbot
- Deployment URL: https://twa-weather-app.vercel.app/
- Minimalistic user interface.
- No external libraries or frameworks used.
- Easy to understand and modify.
To run this example, you'll need a modern web browser with JavaScript enabled.
-
Clone this repository to your local machine:
git clone https://github.com/asqarbekolimov/twa-weather-app.git
-
Navigate to the project directory:
cd twa-weather-app
Open App.jsx in your preferred code editor or IDE.
VITE_WEATHER_API_KEY= your Open Weather Map api key
<script src="https://telegram.org/js/telegram-web-app.js?56"></script>
add to head tag in index.html
<script src="https://cdn.jsdelivr.net/npm/eruda"></script>
Added script to run dev tools
<script>eruda.init();</script>
Feel free to customize this web app to suit your needs. You can modify the React JS and Tailwind CSS files as required.
If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive messages.
- Push your branch to your fork.
- Create a pull request to the main repository's main branch.
This project is licensed under the MIT License - see the LICENSE file for details.