I don't know what do we call such a situation 👇
"When you feel everything is ready and you are preparing for the final submission, there is a crazy requirement that pops up"
It happened to me ❄️
When everything is going like breeze I got stuck in an avalanche.
Let me give you a TL;DR of the story, so I gave the business with the initial version of the MVP, they really enjoyed it and used it for a while and they came up with a requirement asking
"This is quite amazing, but what if we want to search in all the 8k products available at once?"
This is it, I was going crazy because the database I used is a firebase firestore, and it doesn't support full-text search.
Fetching 8k products from the database and searching from them locally would only profit Google, also since few clients stay in remote areas the internet speed is pretty low.
Then I watched Kung fu panda, gained the required motivation and then started on it again.
I came across Algolia and Elastic Search during my research. Both of them felt so promising, but the catch here is I never used any of them sadly. After a bit of research and digging my email, I realised I had some credits in Algolia so inevitably I choose it.
Here is an interesting part, to make Algolia search to work, we need to store all the data in Algolia. For that, I have written a small node js application to handle that.
Finally, after creating the search index, it was just connecting the endpoint with the frontend.
Thanks to redux thunks, it handles asynchronous actions pretty dope.
Finally, will add a few minor things and then will make a final submission in the next post.