This is a small website built with Next.js that displays a list of subreddits related to investing and/or finance. A central database of all subreddits might be useful to some people.
As of today, the list of subreddits has to manually be maintained in types.ts
. Users can submit a suggestion to add a subreddit.
src/*
- The Next.js websitefunctions/*
- This folder is excluded from the Next.js build and contains the Firebase function that scrapes Reddit every 3 hours. We just update the subscriber count for each sub in this cronjob and then re-deploy the Vercel website. The reason we re-deploy the website is because we are not using SSR and instead build a static website at buildtime (SSG). In the future, ISR will be implemented!
First you'll need a Firebase project and you'll need to populate an .env.local
based off of .env.example
$ git clone [email protected]:zachweinberg/redditfinance
$ cd redditfinance
$ npm install
$ cd functions/ && npm install && cd ..
$ npm run dev
firebase deploy --only functions