GSoC 2020 with SCoRe Lab — Week 7

Nipuna Weerasekara
SCoRe Lab
Published in
2 min readJun 29, 2020

tl;drThis is the eighth article of my journey into the Google Summer of Code with SCoRe Lab. Here I discuss the week seven (22nd to 28st of June) of my GSoC experience.

First evaluations, so excited!

As the day 29th of June is coming closer, we were in a tight schedule, and we needed to complete our first evaluation milestones. As for the first evaluation milestones, we had to complete the Organization creation and edit feature of the CodeLabz platform.

So my fellow developer and I started working on the organization creation and edit features. Now a user can register with our platform and they can choose to become a normal user or they can choose to become an organization user by creating an organization. We included a feature that if an organization user wants to create more organizations, they just do it with one click. And one of the awesome features we have is that the organization user can view and edit their organization from one place. One of the hardest features I was assigned to develop was the full-text search functionality.

Full-Text Search, what is it?

Full-Text Search is a feature where you see everywhere. When you visit an online shopping site there is a search box. The search box is the front end of the full-text search implementation. There are several technologies that provide full-text search functionalities, such as Algolia, ElasticSearch, etc. Since we have Firestore and Firebase, the full-text search functionality is not directly implemented inside these databases, so we have to use third-party providers. But if we use MySQL, or MongoDB as our database, the full-text search functionality is implemented within the database itself.

So we had to make a decision, which provider to choose. Since the situation where we need to provide a full-text search is a simple use case where the organization user searches for a user with a name or handle. So we thought using a separate full-text search provider for this use case is like cutting a cake with a chain saw 😂. So we decided to go with a client-side full-text search library. After searching the whole internet for a suitable candidate library. We came across a library called ElasticLunr.js. “Elasticlunr.js is a lightweight full-text search engine developed in JavaScript for browser search and offline search.” Implementing ElasticLunr is easy and simple with any JS codebase and their documentation is really good.

After implementing the full-text search, we concluded the organization creation and edit features of CodeLabz. There is more to do with our CodeLabz platform and I will be working on them in the coming weeks. So, until we meet again, happy coding…

--

--

Nipuna Weerasekara
SCoRe Lab

I am a web developer turned security researcher. Find me on niweera.com