Giter Club home page Giter Club logo

budget-boss's Introduction

Budget-Boss

Description

Price tracking web application that helps you save money on online e-commerce purchases. It allows you to monitor product prices and receive notifications via email when the price drops. It also provides a simple web interface to stay updated with trending deals.

Currently supported E-commerce websites : Amazon, Flipkart, Myntra, Boat.

It is built using Python, HTML, CSS, Flask, Jinja, Telethon and Beautiful Soup. Currently using MongoDB as primary Database and deployed using Microsoft Azure App Service.

Apache Airflow and cronjobs are setup on personal linux machine.

Check it out - https://budgetboss.adhirajpandey.me/

Working

User inputs the desired product link and email. This data along with Product Title and it's Current Price is added in the database.

The background listener.py file runs every hour and compares the current price of the product with the saved price. If the current price is less than the saved price, the bot sends a mail to the user with the required details as shown in the sample below. This listener script is scheduled using cronjob.

To facilitate Deals Functionality, extract_deals.py gets most recent deals messages from telegram channel and saves them in MongoDB collection and fetch_images.py extracts images from saved deals links. Both of these scripts are scheduled using Airflow in form of DAG.

Edit: To bypass 15 mins sleep timeout by Azure, wakewebsite.sh script is also scheduled using cron to ping webapp at regular intervals.

Installation and Usage

  1. Clone the project on your local system using: git clone https://github.com/adhirajpandey/Budget-Boss

  2. Install the dependencies: pip install -r requirements.txt

  3. Setup environment variables in .env file.

    Notes :

    1. Add 'MONGO_CLUSTER', 'MONGO_USER', 'MONGO_PASSWORD' after setting up MongoDB Atlas and configure it's db to be accessed from anywhere.
    2. Add 'SENDER_EMAIL_ID', 'SENDER_EMAIL_PASSWORD' after setting up app password from google 2 factor authentication settings.
    3. Add 'TG_API_ID', 'TG_API_HASH' after setting up Telegram API.
  4. Run the web app using python app.py

  5. Schedule the listener.py file using cron or github actions.

  6. Schedule extract_deals.py and fetch_images.py using cron to populate the deals DB.

Notes

  1. You would need to authenticate your telethon client using OTP and telgram password by following on-screen instruction after running extract_deals.py for first time usage.

    tg_config

  2. You can use deals_dag.py to setup schedule Airflow pipeline for latest deals and its images.

    airflow

Utilities

  • Functionality for Flipkart
  • Functionality for Myntra
  • Functionality for Boat
  • Notification via Whatsapp
  • Best Deals Section

Samples

index

tracker

deals

about

email

budget-boss's People

Contributors

adhirajpandey avatar muskansindhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

budget-boss's Issues

Invalid link

simply does not work. tried posting the link without including the ref part too. showing the same error

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.