Building Telegram Mini App based on existing frontend app

I have a web application (frontend+backend) complete and running. I'd like to implement Telegram Mini app that should interact with my backend the same way as my frontend (React) does. Currently I've just linked my mini app to my app's website and it works exactly as I want except some functionality like file download (which for example works only on desktop version of Telegram). I'm considering two solutions: Add Telegram SDK to my existing frontend app and call different components/functions depending on who's calling - browser or Telegram. Seems to be easier because I don't need many Telegram features (like native buttons) only essentials. Create separate React app for Telegram frontend, move common components into library (npm package?). Seems more complex on implementation, but also more architerally clean. Which solution is usually used in such cases?

Apr 26, 2025 - 23:38
 0
Building Telegram Mini App based on existing frontend app

I have a web application (frontend+backend) complete and running. I'd like to implement Telegram Mini app that should interact with my backend the same way as my frontend (React) does. Currently I've just linked my mini app to my app's website and it works exactly as I want except some functionality like file download (which for example works only on desktop version of Telegram). I'm considering two solutions:

  1. Add Telegram SDK to my existing frontend app and call different components/functions depending on who's calling - browser or Telegram. Seems to be easier because I don't need many Telegram features (like native buttons) only essentials.
  2. Create separate React app for Telegram frontend, move common components into library (npm package?). Seems more complex on implementation, but also more architerally clean. Which solution is usually used in such cases?