kawalcovid19 / wargabantuwarga.com

Inisiatif warga untuk berbagi informasi seputar fasilitas kesehatan dan alat kesehatan untuk COVID-19.
https://www.wargabantuwarga.com
MIT License
554 stars 166 forks source link

Revisit the search, to be served from the server #290

Open mazipan opened 3 years ago

mazipan commented 3 years ago

Description

See the detail on the Doc on section 1.2.1:

https://docs.google.com/document/d/1im7CF8XaF4yYQ_jJjjW7dOKZz8tJFvidtW7bOlqt1Y8/edit?usp=sharing

Currently our search feature are executed on the client side, the data is re-aggregated on the client.

Looking to our architecture that serve a static HTML, this should not happen, we have all the data. No need to re-calculate the data on the client side.

Tasks

zainfathoni commented 3 years ago

Mas @famasya has built a demo over here. https://famasya.github.io/wbw-gsheets-demo/

The backend is using TrustMedis' TypeSense instance, sourcing the data from our Google Sheets.

This is the source code of the demo. https://github.com/famasya/wbw-gsheets-demo

I'll be adding more details on how we can utilise this for our use case, but first I need to clarify some stuff from him, such as how often it updates the index from the latest updates in the Google Sheets.

famasya commented 3 years ago

Hi there, it is basically an open source version of Algolia. Fortunately, typesense has Algolia's instantsearch.js adapter for faster development.

For the reindex, it happens in every 3 hours.

zainfathoni commented 3 years ago

I've prepared a public repository for this crawler project named wbw-gsheets-crawler. Mas @famasya will help to set up the initial codebase later.

famasya commented 3 years ago

All set mas @zainfathoni . We have three indices for now:

I'll send you typesense search key by PM

zainfathoni commented 3 years ago

Thank you for implementing it quickly, Mas @famasya! 🙏 Could you please help us list all the necessary tasks into a new epic issue for integrating with your search functionality, Mas @famasya? Frankly, I don't know where it is hosted, how we can fetch the data, etc. 😅 🙏