Frontend code for HPFanfiction Recommender webiste. Written in NextJS
How it works?
trigger-backend triggers a Python Backend every two hours. The backend uses pushshift.io to lookup comments made by FanfictionBot. It parses the comments and stores the data in a database. It then generates a bunch of JSON files requrired by this frontend. After finishing, it triggers the website build over at Vercel.
The frontend requests all the necessary JSON files at build time using
getStaticProps() and builds the website.
The description of the stories are fetched at client side using SWR