The repository contains code for building realtime and historical charts by leveraging Google Pub/Sub and SocketIO for realtime and Bigquery and Flask for historical.
- Create/Setup your GCP environment (we'll need pub/sub and bigquery for this project)
- create the json secret as seen starting at minute 1:34 in this video https://www.youtube.com/watch?v=xOtrCmPjal8]
- place the json secret in your backend folder
- create a pubsub topic and a subscriber to that topic
- create a bigquery table and subscribe to the created pubsub topic
- create a settings.ini file and place it in your backend folder
it should be of the form
[DEFAULT]
credentials_path = xxxx-123.json
topic_path = projects/example-project/topics/pub-sub-topic-name-path
subscription_path = projects/example-project/topics/pub-sub-subscription-path
- create the json secret as seen starting at minute 1:34 in this video https://www.youtube.com/watch?v=xOtrCmPjal8]
- install the requirements using requirements.txt
- npm install all requirements in the frontend folder
- Run the stream_in.py server first (it is listening for dummy price data from stream_out)
- Then run bigquery_server.py (it is serving bigquery directly to the frontend)
- Then run the frontend (npm run dev)
- Then run stream_out.py (it is creating mock prices 1<random_float<100)


