Skip to content

PalAditya/DBMSProject2019

Repository files navigation

DBMS Project for semester 6.

Inspired by Pset7, CS50-2018

The Flask app is configured to run on a CS50 IDE.
To run it locally, there are a few steps.

  • Use pip install -r requirements.txt
  • Use set FLASK_APP=application.py (Windows) and export FLASK_APP=application.py (Linux/MAC)
  • Change the line db = SQL("sqlite:///finance.db") to make it use your own local/online sqlite instance (Use sqlite_setup.py for a local instance, which can be downloaded from here)
  • Set your gmail settings to allow less secure apps (only if you want to test the email feature-Explained later)

Now, you're good to go 😄

The live demo is hosted at heroku 😀

The various features of the webapp are:

  • Profile creation
  • Querying the current price of some share
  • Buying and selling the shares directly
  • Seeing a graphical overview of the fluctuation in share prices over time
  • Predicted prices of shares held by the user
  • History of transactions
  • Tabular representation of current shares
  • Adding friends to maintain a trusted list and sending mails to them
  • Viewing the most trending shares on that particular day
  • Companies can place ads for their shares on the platform for a price
URL Function
login Allows user to log in
register User Registration
download Downloads history of transactions in PDF format
index Shows curren shares
addFriend, deleteFriend and messageFriend Adds, removes and messages a user to/from/on the friend list
quote See current price of a share
buy, sell Buy or sell n particular shares
live See updates of user's most important shares graphically
ads Allows companies to place ads
funds/add Allows users to add money to their account
change_password Password change facilitated

Here are a few images to explain the flow in more detail 😄

  • The user is greeted with a list of his/her available stocks on logging in

portfolio_1

  • Buying a stock

Buying

  • You can see that a share of NetFlix was bought on the updated interface

portfolio_2

  • Did I mention that we can get list of all transactions? The history tab supports it, alongside providing facility for downloading the report in PDF format

portfolio_with_pdf_download

  • The interface for companies to upload ads

interface

  • The share prices for a company over the past 10 minutes (can be configured) via Pygal.

live_updates

  • The share prices of companies the user holds most shares of over past 10 minutes (can be cofigured) via Bokeh. Can add AjaxDataSource to make it auto-updating

live_stream

  • Finlly, the error page (classic cat for the CS50 touch)

Error