Skip to content

AstitvaSharma/Stock-Trading-WebApp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock Trading Web App

A stock trading web-app built on Flask with an aim to learn about backends.

  • Buy, sell, check price of stocks in realtime
  • View portfolio of your stocks
  • View history of purchase and sale of stocks

My Learning Objectives:

I'll be following Miguel Grinberg's Mega-Tutorial practices for structuring my app with my taste sprinkled in some places.

Topics I plan to master by the end of this project as I wander my dev journey:

  • web caching in detail
  • databases, ORMs
  • deployment to cloud
  • cookies, session management
  • authentication, authorization
  • WSGI servers and werkzeug (flask is based on werkzeug)
  • web security - eliminate OWASP top ten security risks from the app
  • REST APIs in detail - Read Roy Fielding's paper
  • client side validation via JavaScript, AJAX
  • scalability, testing, CI & CD
  • QA

Routes / controllers I need to implement:

  • /register to register users
  • /login to provide login mechanism
  • /logout logs out user
  • /quote to get a stock's latest price
  • /buy to buy stocks
  • /index shows the portfolio of stocks
  • /sell to sell stocks
  • /history to see the history of transactions
  • /api/check/<username> to allow username validation client side via AJAX

Quick Development Setup

Fork. Clone. Make sure you cd to stock-trading-app directory. Set upstream and origin.

Install or update to the latest version of Python if you haven't already.

Time to get started. Feel free to create an issue if you get stuck or if you need help :)

# Note: execute the below commands in `Bash` with administrative privileges

# Installs pipenv globally
pip install pipenv

# The below command installs dependencies in the pipenv's virtualenv
pipenv install --dev

# Activates virtualenv subshell
pipenv shell

# Copies `sample.env` to `.env`
# You can paste your API credentials in `.env`
cp sample.env .env

# Runs the app, served at http://127.0.0.1:5000 by default
flask run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 66.9%
  • HTML 29.8%
  • CSS 1.7%
  • Mako 1.5%
  • Procfile 0.1%