James Dial, Mike McKinnon, Ethan Kenny, Nathan Pelt, kris valdez
For this project we're building a finance website that helps the user have a better understanding in investing in crypto and stocks. This project will be created from HTML, CSS, Flask, and SQL Alchemy. Yahoo Finance API, CoinMarketCap API, and Bezinga API will be external websites used to implent a stock list, a crpto list and the latest news in the stock market for this finance website called U-FI. This website will have a simple login/signup page and when there done with it they will have to complete a questionnaire of 5 questions. When the user has completed the questionnaire they will be given a stock and a crytocurrency watchlist based on the answers they gave. The dashboard will have a regualr watchlist that the user will be able to add cryptocurrencies and stocks they want to watch and a stock and crypto watchlist based on the answers they gave from the questionnaire. The dashboard will also display the latest news articles from the stock market and crypto market. The user will also be able to search crypto and stocks they want to watch from the search bar and clicking on if they want to search for stocks or cryptocurriences.
- First, use PyCharm professional. You get this for free with a .edu email address.
- Right click the
app
folder 'Mark Directory As' -> 'Sources Root' - Right click the
templates
folder -> Mark Directory As -> Template Folder - Create a new virtual environment
- If you have an existing
venv
or.venv
folder, delete it. - File -> Settings -> Project: team-project-team6 -> Python interpreter
- Click the Gear icon -> Add.
- Check the New Environment radio button. PyCharm should suggest a
venv
or.venv
folder in the project directory -- this is fine. Make sure that the "Base Interpreter" is a Python 3 interpreter. - Click 'OK' and allow PyCharm to create the virtual environment and configure the interpreter.
- If you have an existing
- Open a new Terminal window in PyCharm. Type the commands
cd src
pip install -r requirements.txt
- Create a new Run Configuration from dropdown next to the run buttons:
- In the Run/Debug Configurations window, click the + icon.
- Select Flask Server
- Next to target type click "Script path". Select the folder icon below it and select the ufi.py file in the file picker dialog.
- Check the FLASK_DEBUG checkbox.
- In the "Working Directory" box, click the folder icon, and then select the src/app/ folder.
- You should now be able to run the Flask ufi.py configuration to start the server.
- If at any time you change the Database models in
models.py
, you will need to run the following from the Terminal for the database to update with the new structure
flask db stamp head
flask db migrate
flask db upgrade
HeroKu Requirements
install in requirements.txt
newsapi==0.1.1
newsapi-python==0.2.6
gunicorn
psycopg2-binary
Deploying to heroku steps
-
Creating a Heroku account,
-
Installing the Heroku CLI,
-
Setting Up Git,
-
Creating a Heroku Application,
-
Working with a Heroku Postgres Database,
-
Updates to Requirements,
-
The Procfile,
-
Deploying the Application,
-
Deploying Application Updates
From the Welcome Page, click the link "Reset database" link at the bottom to purge and initialize the database with some new users
To pre-load some Stock or Crypto data into the database, add it to the reset
method in ufi_database.py
and click the "Reset Database" link.