richardokonicha / tg_marketplace

A Telegram bot that allows you to buy and sell items in a marketplace.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues MIT License LinkedIn


commodity telegram blockchain

Telegram Bot Marketplace

A Telegram bot that allows you to buy and sell items in a marketplace.
View Demo · Report Bug · Request Feature


Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Product Name Screen Shot

This Bot is a telegram marketplace bot, It supports 3 kind of users,

  • Regular user privileges
    • Can view products and categories
    • Can Buy products using BTC or LTC
    • Can Credit wallet using BTC or LTC
    • Can Buy products from wallet balance
    • Can view purchase history
    • Can message Group Admin

  • Vendor user privileges

    • Can Create new products
    • Can Create new category
    • Can receive credit from product sales
    • Can request Funds withdrawal
    • Can view products and categories
    • Can Buy products using BTC or LTC
    • Can Credit wallet using BTC or LTC
    • Can Buy products from wallet balance
    • Can view purchase history
    • Can message Group Admin
  • Admin user privilege

    • All of the above
    • Can access dashboard to view all users, vendors, purchases, deposits, withdrawals
    • Can promote a user from regular user to vendor
    • Can demote a vendor to regular user
    • Can delete a product
    • Can delete a category
    • Can view all users, vendors, purchases, deposits, withdrawals
    • Can message all users

(back to top)

Built With

  • Python
  • Flask
  • MongoDB
  • BTCPay
  • Telegram API

(back to top)

Getting Started

To get this project copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • Python
    pip install -r requirements.txt

Installation

Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.

  1. Get a telegram bot API Key at telegram bot tutorial
  2. Clone the repo
    git clone https://github.com/richardokonicha/tg-marketplace.git
  3. Install NPM packages
    pip install -r requirements.txt
  4. Enter your environment in .env
     TOKEN=********:***********-Avkvvk7wA*****
     ADMIN=577180091
     CURRENCY=BTC
     FIAT_CURRENCY=USD
     DATABASE_URL=mongodb+srv://user:pass@cluster.mongodb.net/
     WEBHOOK_URL = https://your_server_url.app
     WEBHOOKMODE = True
     BTCPAY_STORE_ID=B5HeoVS****************************
     BTCPAY_TOKEN=2218e3892f***************************
     BTCPAY_SERVER=https://btcpay.your_btcpay_server.com
  5. Run the bot
    python main.py

Docker

  1. Clone the repo
    git clone https://github.com/richardokonicha/tg-marketplace.git
  2. Install docker
    sudo apt-get install docker.io
  3. Install docker-compose
    sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local
    compose
    sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
  4. Enter your Environment variables in .env
     TOKEN=********:***********-Avkvvk7wA*****
     ADMIN=577
     CURRENCY=BTC
     FIAT_CURRENCY=USD
     DATABASE_URL=mongodb+srv://user:pass@cluster.mongodb.net/
     WEBHOOK_URL = https://your_server_url.app
     WEBHOOKMODE = True
     BTCPAY_STORE_ID=B5HeoVS****************************
     BTCPAY_TOKEN=2218e3892f***************************
     BTCPAY_SERVER=https://btcpay.your_btcpay_server.com
  5. Run the bot
    docker-compose up -d
    

For addition configuration options, check config.js file

(back to top)

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

About

A Telegram bot that allows you to buy and sell items in a marketplace.


Languages

Language:Python 80.0%Language:HTML 19.5%Language:Dockerfile 0.4%Language:Procfile 0.0%