/TO-THE-MOON

🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀

Primary LanguageJavaScript

🚀 TO THE MOON 🚀

To The Moon is an /r/wallstreetbets bot that periodically scrapes the subreddit for relevant stock tickers that appear in posts.

Swamphacks 2021 Slack Profile: https://swamphacks-vii.slack.com/team/U01M3GSKE8Y

Deployment

This app is powered by Firebase. If you want to deploy it, you'll need to install the firebase CLI and initialize the project with the following command:

# Navigate to the server source code directory
$ cd server 

# Login to firebase
$ firebase login

# Initialize firebase project
$ firebase init

When prompted, select the following services from firebase:

  • Database
  • Functions
  • Hosting

When prompted, use the following options:

  • Select JavaScript for language
  • Select No for ESLint
  • Do NOT overwrite any files
  • Install npm dependenciees
  • Use public as hosting directory
  • Configure as single-page application

Finally to deploy the application, you'll need to run the following command from the main direcotry:

# Just for the first time...
$ chmod +x ./deploy-app

# This will build and deploy your app
$ ./deploy-app

Note: You will need to enable an app engine in your GCP console.

Inspiration

The spike of the $GME stock has sparked some major press and we believe that there is something special happening with average joes on a reddit board deciding which way the needle moves as opposed to the folk running the hedge funds on wall street

Challenges we ran into

The biggest obstacle we ran into was developing the parser which ran against all the titles and descriptions of the reddit posts. We had to optimize our code in a way that would sort the posts which have been cleared of tickers and those which were not.

Accomplishments that we're proud of

Aside from just finishing a minimal viable product, we enjoyed the process of learning react and deploying a full stack application. We came in with a simple idea: a bot that periodically scrapes /r/wallstreetbets, evaluates trending stocks, and aggregates the data to a simple front-end.

What we learned

Henry

I mostly took a back seat to the coding on this project and got to take the reigns as our teams leader. I took the lead on designing our systems, managing the workload, and tagging in when my expertise on full stack development was necessary.

Ben

This was my first ever hackathon, and I learned many things that are sure to benefit me in the future. I learned how to successfully develop a web application using Javascript, while also learning how to use React. I had to learn React Bootstrap on the fly and use this knowledge to create the cards for the web application. I learned how to succesfully communicate and work with a team in a coding and technological environment as well. I had a lot of fun working with my team and I look forward to future hackathons!

Nik

As this was my first time participating in a hackathon, I could not be in more awe of how much I have learned in the span of 48 hours. From learning how to use Javascript, React, HTML, and overall working with a team editing code in real-time for the first time was an extremely insightful and incredibly fun experience for me. I can not wait to utilize hackathons in the future.

Vince

Helped design and implement the retrieval of trending stocks from Reddit RSS feed and wrote logic to display stocks in the front-end.

What's next for To The Moon

We want to add a chart which evaluates trends from prior scrapes of /r/wallstreetbets throughout the week so that users can compare the amount of hype different stocks receive throughout the course of their discussions. It would be nice to scrape posts with images and have them be analyzed by the vision engine provided by GCP. We can leverage the technology to see into screenshots being posted by users on the forums.

Built With