0xMarsRover / vanilla-js-boilerplate

This is a basic and straightforward Telegram Mini App(TMA) implemented using plain JavaScript, HTML, and CSS. This project aims to provide a minimalistic example of how to create a simple TWA and launch it within Telegram without relying on complex build tools or bleeding-edge libraries.

Home Page:https://telegram-mini-apps-dev.github.io/vanilla-js-boilerplate/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default {
  // other rules...
  parserOptions: {
    ecmaVersion: "latest",
    sourceType: "module",
    project: ["./tsconfig.json", "./tsconfig.node.json"],
    tsconfigRootDir: __dirname,
  },
};
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list


logo of telegram web apps

Telegram Mini Apps Basic Example

This is a basic and straightforward Telegram Mini App(TMA) implemented using plain JavaScript, HTML, and CSS. This project aims to provide a minimalistic example of how to create a simple TWA and launch it within Telegram without relying on complex build tools or bleeding-edge libraries.

Features

  • Minimalistic user interface.
  • No external libraries or frameworks used.
  • Easy to understand and modify.

Getting Started

Prerequisites

To run this example, you'll need a modern web browser with JavaScript enabled.

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/Telegram-Mini-Apps-Dev/vanilla-js-boilerplate
    
  2. Navigate to the project directory:

    cd vanilla-js-boilerplate

Open index.html in your preferred code editor or IDE.

Usage

  1. Open index.html in your preferred code editor or IDE.
  2. Make your changes
  3. Create your own GitHub repository, commit and push your updates.
  4. Go to your repository GitHub page and open Settings. Check the Pages tab and Build and deployment section. If GitHub Actions option was selected, assets should be deployed to Pages and there will be an URL like https://<username>.github.io/simple-telegram-mini-app/. You can copy this URL and use it with BotFather bot to create your very own TWA.

Customization

Feel free to customize this web app to suit your needs. You can modify the HTML, CSS, and JavaScript files as required.

Contributing

If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them with descriptive messages.
  4. Push your branch to your fork.
  5. Create a pull request to the main repository's main branch.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This is a basic and straightforward Telegram Mini App(TMA) implemented using plain JavaScript, HTML, and CSS. This project aims to provide a minimalistic example of how to create a simple TWA and launch it within Telegram without relying on complex build tools or bleeding-edge libraries.

https://telegram-mini-apps-dev.github.io/vanilla-js-boilerplate/

License:MIT License


Languages

Language:TypeScript 56.7%Language:CSS 29.8%Language:JavaScript 7.4%Language:HTML 6.2%