- Notifications
You must be signed in to change notification settings - Fork26
Monolithic model-view-controller full-stack web application built with Python, Flask, SQL Alchemy, MySQL, Jinja, and Bootstrap. Application Server hosted on AWS EC2 with Ubuntu, Gunicorn, and Nginx. MySQL Database on AWS RDS. Redis hosted on AWS Elasticache. CI/CD with Jenkins and AWS CodeDeploy
JacobGrisham/Finance-Full-Stack-Web-App-using-Flask-and-SQL
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
- Ensure that
python3andpython3-pipare installed on your system - In your terminal, navigate to the root project directory and run the following commands
- Activate the virtual environment
$ pipenv shell- Install the dependencies
$ pipenv install -r requirements.txt- You'll need to register for an API key in order to be able to query IEX’s data
- Register for an account
- Enter your email address and a password, and click “Create account”
- On the next page, scroll down to choose the Start (free) plan
- Once you’ve confirmed your account via a confirmation email, sign in to iexcloud.io
- Click API Tokens
- Copy the key that appears under the Token column (it should begin with pk_) into the
<value>in the next step
- Create a .env file and paste the following into it:
API_KEY=<value> - To start the web server, execute (without debugging):
$ python application.py- Alternatively, execute (with debugging):
$ export FLASK_APP=application.py$ flask run- Lastly, create a SQL database named
finances.db - To initialize the SQL database within application.py, add
db.create_all()belowInitialize Schemas. Once the code runs and the you've verified the database exists, removedb.create_all() - To initialize the SQL database in the python shell, execute:
$ python$ from application import db$ db.create_all()- To initialize the database with SQL command-line arguemnts (using MySQL syntax) run each
CREATE TABLEcommand (one at a time):
CREATE TABLE users (id INTEGER PRIMARY KEY AUTO_INCREMENT,username VARCHAR(50) UNIQUE, hash VARCHAR(200) NOT NULL, cash INTEGER);CREATE TABLE portfolio (id INTEGER PRIMARY KEY AUTO_INCREMENT,user_id INTEGER, symbol VARCHAR(5), current_shares INTEGER);CREATE TABLE bought (id INTEGER PRIMARY KEY AUTO_INCREMENT,buyer_id INTEGER, time VARCHAR(100), symbol VARCHAR(5), shares_bought INTEGER, price_bought FLOAT);CREATE TABLE sold (id INTEGER PRIMARY KEY AUTO_INCREMENT,seller_id INTEGER, time VARCHAR(100), symbol VARCHAR(5), shares_sold INTEGER, price_sold FLOAT);- Stock prices pulled fromIEX Stock Quote API
- Hat icon made byAlice Noir fromthe Noun Project
- Feather icon made byJacopo Mencacci fromthe Noun Project
- Illustrations byFreepik Storyset
Copyright Notice and Statement: currently not offering any license. Permission only to view and download. Refer tochoose a license for more info.
About
Monolithic model-view-controller full-stack web application built with Python, Flask, SQL Alchemy, MySQL, Jinja, and Bootstrap. Application Server hosted on AWS EC2 with Ubuntu, Gunicorn, and Nginx. MySQL Database on AWS RDS. Redis hosted on AWS Elasticache. CI/CD with Jenkins and AWS CodeDeploy
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.