Deprecated/Unmaintained
Unfortunately this is a dead repo at this time, most of the services that were leveraged within this repo has either shut-down or went to pay-only and is no longer worth pursuing this.
This mono-repo contains various tools and apps all centered around stocks/equities/cryptos.
This is mono-repo is setup with an overall basic folder structure that will be explained below.
apps
- where all of the apps will be stored (crons, web-apps, clis', etc)lib
- where shared core data and services are to live (core-sdk
)services
- external outreach services and individual jobs.github
- where theGithub Actions
are stored
Currently this project requires bash for command line functionality. There are some commands used that are bash specific.
You'll need to install rush
globally first.
npm i -g rush
Install all the repo's dependencies.
rush install
Important Do NOT use npm
for installing or updating deps. Read Here
You'll need to create an .env
file with a few key-value pair to ensure all the services work correctly.
An example file, .env.example
, is available in the root directory and has all of the currently used ENV variables in all projects.
In ~/
create an .env
file, if one doesn't already exist. You'll need to follow the proceeding steps to finish setting up the external services and the .env
items
- IEX Cloud - Used for stock historical data and reference data, along with crypto
- Gmail - Used to send all email based reports and correspondence
- You'll need a Google account, if you don't have one or want a new one for this here is a link
- Add the following parameters to the
.env
fileEMAIL_USERNAME=GMAIL_EMAIL
EMAIL_PASSWORD=GMAIL_PASSWORD
- if any authentication issue refer to these common issues
- Polygon.io - Used for historic stock data and reference data
- Social Sentiment.io - Used for daily sentiment analysis data
- You can create an account here
- Once you do that you'll need to add a few
.env
file entries:SOCIAL_SENTIMENT_API
SOCIAL_SENTIMENT_API_VERSION
- Note: as of 03-11-21 this is not used and can really be skipped for now
- Reddit.com - Used to pull data from their subreddits
- You can create an account here
- Register a new application here
- Create a valid User-Agent string by the rules defined here
- Once all that is setup add the following entries to the
.env
file:REDDIT_USER_AGENT
REDDIT_CLIENT_ID
- found in the application registrationREDDIT_CLIENT_SECRET
- found in the application registrationREDDIT_USERNAME
REDDIT_PASSWORD
Eslint and Prettier are both used in the repo and will need to be installed for PRs to pass build checks,
Eslint will need to be installed globally, npm i -g eslint
and the eslint VS-Code extension can be useful, but is not required
Prettier will need to be installed globally also, npm i -g prettier
and the prettier VS-Code extension is highly recommended and to have it configured to format on save, which is described below.
To set Prettier to format on save you will need to go to your JSON settings in VS-Code and add one or all of the lines below:
// Default (format when you paste)
"editor.formatOnPaste": true,
// Default (format when you save)
"editor.formatOnSave": true,
//Language specific
"[javascript]": {
"editor.formatOnSave": true
},
Compile all of the repos Typescript files
rush compile
Clean Up all the compilation files
rush clean
Run all the Packages tests at once
rush test
Check all the packages for linting errors
rush lint
Check and fix any linting errors possible
rush lint:fix
Checks the packages for formatting violations
rush prettier
Checks and formats all the packages
rush prettier-format
For a complete list of available custom commands check here: common\config\rush\command-line.json:13
When submitting PRs always remember to run rush clean
before submitting a PR and merging it. We do NOT want auto generated files in the source code to reduce noise. If you forget to run this command, there is now an automated Action that will alert you when it finds any of the build files present on a PR branch.
To update the package versions you need to run a few commands.
To check to see what all has been changed and if its good to bump versions execute:
rush change
You might need to run another command if some issues come up, this command will list any of the issues rush found:
rush check
Once you're good to go with all the checks to bump versions:
# will bump the default version policy, usually the lockstep one
rush version --bump
# will bump a specific version policy
rush version --bump --version-policy={policyName}
To have your docker dev environment work you will need to update your hosts
file to accommodate the services urls.
A PowerShell script is available in the scripts
folder that will automatically set these up or you can manually navigate to your systems hosts file location C:\System32\drivers\etc\hosts
or /etc/hosts
and add all of the entries listed in the PowerShell script mentioned above.
A docker dev environment is available to use with the following commands.
# Spin up new Dev Env
rush docker-up:dev
# Spin up new Dev Env but builds fresh
docker compose up -d --build
# Shuts down the Env
rush docker-down:dev
For more commands you can always run rush --help
and all native, as well as custom commands will be listed their.
Currently you'll only be able to deploy this via the command line, no CD integration is setup yet.
You'll need to re-build the container before every deployment.