Background

I threw this website together for a few reasons:

  • I wanted it to exist so that I could find highly rated books which weren't excessively long
  • To play around with some emerging frameworks (Fastify, Remix)
  • To see first hand how a Postgres DB served from a Raspberry Pi would perform
  • To reacquaint myself with some relational database concepts
I try to read every night but I usually fall asleep after about 10 minutes so diving into a >1,000 page book is rarely appealing. On top of this, my day to day work is in the API space so I don't get to write much frontend code.

Tools & Technologies

Frontend

The frontend is built using React and Remix. I had read really positive things about Remix and wanted to try it out for myself. I didn't get too deep into the weeds but it was a really pleasant experience overall. Material UI / MUI components are used extensively. While these might lack originality in some cynical eyes, they were perfect for a small side project. If I tried to create those components myself (factoring in accessibility, design etc), it would take forever and I wouldn't do as good of a job. I definitely do not have a good eye for design so dropping in some well designed components was perfect for this project. The application is hosted on Vercel as it is amazing, easy to use and has a great (free) "hobby" tier.

react-logoremix-logomaterial-ui-logovercel-logo

Backend

The backend is a very simple Fastify API. The API doesn't do much except for some access key checking and connecting to / querying a database. The backend portion of this application lives on a Raspberry Pi 3 Model B. Obviously this solution lacks in the performance, security and reliability departments but it's free and it was fun to set up. The actual source of the data is a dataset that I found on Kaggle. I wrote a Node.js script to parse the CSV file, normalize the data and store it in a Postgres database. I considered trying to get fancy and use an advanced COPY command / write a neat shell script but it just wasn't worth the effort (considering that I was trying to get this done over the Christmas holidays).

postgres-logoraspberry-pi-logofastify-logonode-js-logo

To-Do (a.k.a. "Things I want to acknowledge but will likely never do")

  • Spend more than 5 minutes on a logo
  • Write tests - I never write tests for half assed side projects as most of them don't see the light of day
  • Refactor / reorganize the code. The route files are a bit bloated and some stuff could be moved to the components folder
  • Rethink styling approach. Most of the page's styles are inline. This is not ideal but it was the quickest way for me to get where I wanted to be
  • Fix my SQL query - One tiny feature (showing the genre chips) is forcing me to run a subquery. It is increasing the query duration by over 100%
  • Buy a domain