Giter Club home page Giter Club logo

telegram-react's Introduction

Telegram Web App

Interface

Sample screenshot

Technical details

The app is based on the ReactJS JavaScript framework and TDLib (Telegram Database library) compiled to WebAssembly. Try it here.

Running locally

  1. Obtaining Telegram api keys.

Please visit this page for details.

  1. Setup .env file.

Manually copy Telegram api keys from previous step into REACT_TELEGRAM_API_ID and REACT_TELEGRAM_API_HASH at .env file.

  1. Install node.js & npm. Probably, you should use nvm.

  2. Install dependencies.

npm ci

All TDLib files will be installed into node_modules/tdweb/dist/ folder.

  1. Manually copy TDLib files into the public folder.
cp node_modules/tdweb/dist/* public/
  1. Run the app in development mode.
npm run start

Open http://localhost:3000 to view it in the browser.

Deploying to GitHub Pages

  1. Obtaining Telegram api keys.

Please visit this page for details.

  1. Setup .env file.

Manually copy Telegram api keys from previous step into REACT_TELEGRAM_API_ID and REACT_TELEGRAM_API_HASH at .env file.

  1. Update homepage property at the app's package.json file.

Define its value to be the string https://{username}.github.io/{repo-name}, where {username} is your GitHub username, and {repo-name} is the name of the GitHub repository. Since my GitHub username is evgeny-nadymov and the name of my GitHub repository is telegram-react, I added the following property:

//...
"homepage": "https://evgeny-nadymov.github.io/telegram-react"
  1. Generate a production build of your app and deploy it to GitHub Pages.
npm run deploy

Running in a Docker container

  1. Obtaining Telegram api keys.

Please visit this page for details.

  1. Provide your Telegram api keys as build arguments.
docker build . --build-arg TELEGRAM_API_ID=0000000 --build-arg TELEGRAM_API_HASH=00000000000000000

The Docker build will perform all the necessary steps to get a working build of Telegram-React.

References

  1. Deploying a React App (created using create-react-app) to GitHub Pages
  2. Facebook's tutorial on deploying a React app to GitHub Pages

telegram-react's People

Contributors

a-x- avatar arseny30 avatar dependabot[bot] avatar erayrafet avatar evgeny-nadymov avatar jasonkhew96 avatar leekeifuture avatar linqlover avatar robinj1995 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.