Hosted at: https://stockwatch.cloud/
This COE714 project focuses on the creation of a web scraper website that would offer customers real-time notifications on price variations for certain stocks set by the user. This service allows consumers to specify personalized price change thresholds and receive timely notifications through email, allowing them to make educated investing decisions.
This project's major purpose is to create and construct a comprehensive website capable of monitoring and analyzing stock pricing changes for specific stocks set by users. Users may use this tool to remain up to date on the pricing dynamics of Stocks they are interested in acquiring. The scraper will gather data in a systematic manner, process it, and inform users via email when prices fall below or surpass predefined limits. The Project's Scope The following important components are included in the project:
Allows easy interaction, setting preferences, and customizing email notifications. Also added feature of “Night Mode” for a darker theme.
Enables users to set personalized pricing alerts.
Sends timely notifications based on user-defined price thresholds.
Users can create an account by registering or logging in to view their custom/specific stock portfolios.
Frontend: React, HTML, CSS, MaterialUI
Backend: Python
Key Python Libraries: APScheduler, FastAPI, PyMongo, uvicorn
Database: MongoDB
API: YFinance API was primarily used for stock scraping
Hosting: Oracle Cloud VM, Docker, Nginx, Certbot for SSL, GitHub Actions for CI/CD
Rudimentary functioning, under optimization.✅
Pip libraries to install (use pip3 install -r requirements.txt to install them for you):
-pymongo
-fastapi
-yfinance
-uvicorn
To start fresh on a new machine without affecting your host machine's python setup: (Steps 1 to 5 are only required for the initial setup)
Experimental: setupRepo.sh (unix based) and setupRepo.cmd (windows) automates this setup (1-5) for you.
- In the backend directory
cd backend, Create a virtual environmentpython3 -m venv venv. - Activate the virtual environment (if unix based:
source ./venv/bin/activate, windows:venv\Scripts\activate) from within the backend folder. - Install required python libraries
pip3 install -r requirements.txt - Install node modules for React within the frontend folder
cd ../frontend, thennpm i. - Create an
.envfile in the root of the project with the Email Account credentials.
EMAIL="stockwatch714@gmail.com"
PASSWORD="gmailAppPasswordFromDiscord"
SYMMETRIC_KEY="Byte String Generated by Fernet.generate_key()"
To Run:
- Start flask backend server
uvicorn stockWatchAPI:app --reloadfrom the backend directory - On another terminal, assuming starting from the repo's root directory,
cd frontendand then Start React front-endnpm run start. - When done working with backend, deactivate virtual env when done with
deactivateor exit the terminal.
- Steps 2 and 6 to start the backend server. Step 7 to start the react dev frontend.
- Added containerization support. You can run the whole solution using
docker compose -f ./compose.yml upfrom the root project directory. To rebuild containersdocker compose -f ./compose.yml build. To specify a https server endpoint other than127.0.0.1for the container, before building, runexport RASP=stockwatch.cloudwherestockwatch-cloudis the desired endpoint. For Windows, replaceexportwithset.
The following are meant to be run from project/repo root:
rundev.sh/.cmd- Run the development server/react front end in one command from the root project directory.setupRepo.sh/.cmd- Sets up the repository when freshly cloned, adds main repo upstream, creates dummy .env file if not present (replace with actual password after creation), and installs dependencies for front/back end.





