/telegram-shop

Demo can be found at @teleshop_beta_bot on Telegram

Primary LanguageJavaScript

TeleShop

TeleShop is an e-commerce application that has an integration built between Telegram and web app. It uses Telegram as a client to serve customers, while the web app acts as a CRM system for shop owners to manage their shop.

Table of Contents

Demo

Demo can be found on Telegram via @teleshop_beta_bot. A dummy visa card can be used for testing of the payment - 4242 4242 4242 4242 in Telegram.

Note that the responses might be slow due to Heroku's web dyno sleeping, do wait for a couple of seconds for the bot to respond!

Features

Feature Description Released
Message Cleanup Messages that are sent between the user and bot are cleared upon each transition in scenes ✔️
Live Stock Count Users are able to capture updated stock counts and reserve the items in their cart ✔️
Payment Integration with Stripe has been provided for users to transact with shops ✔️
Voucher Codes Users are able to enter voucher code provided by the shop owners ✔️
Order Message Users are able to leave a note on their order for the shop owners ✔️
Order Hogging Cron job will be run daily midnight to prevent users from hogging the items for too long ✔️
Order Date Users are able to select their delivery date (if applicable) ✔️
Order Limit Each order is limited to $13,725.35 which is supported by Telegram ✔️
Web Dashboard Shop owners are able to upload their products via the dashboard

Improvements

  • Develop a full fledged dashboard using Next.js.
  • Currently, the bot is being deployed via a hacky way using Express.js while running Telegraf in the background. For production usage, optimise by changing to webhooks.

Deployment

Database design and UX flow can be found here.

Environment Variables

Name Description
BOT_TOKEN Telegram bot token from BotFather
DATABASE_URL Postgres database URL
PGSSLMODE Requires a SSL TCP/IP connection with the database (set to 'require', only required if hosting on Heroku)
PROVIDER_TOKEN Stripe provider token provided by Telegram
MODE Sets the mode of the environment (set to 'demo' to allow seeding of data upon using commands)