Post liking functionality

The idea

I want any reader of my posts to be able to click a small heart at the top of each article, which in turn increases the number of "likes" or "hearts" the post has in real-time.

Why? I don't know, it just feels right.

The details

Since the amount of "hearts" for each article needs to be saved somewhere, we need a database. However, readers should not have to sign in to heart a post, but the database can't be fully open for anyone to write into.

I'm thinking something like Firestore with anonymous authentication.

Each article gets its own document in Firestore containing its slug and current number of hearts. Simple enough?

The heart buttons should be a Lottie animation that does something fun when clicking it.

The result

Not completed.