Spin-Off: Loklak fuels Open Event

Continuing with the Loklak & Open Event Partnership (check out Loklak fuels Open Event ), we can now easily in clicks create our very own web-app for the event with details imported from eventbrite.com powered by Loklak.

The scraping of data done using JSoup, Java HTML parsing was explained in the previous post of this series.

Next, a console service was implemented as the single point for information retrieval from various social networks and websites (a post coming for it soon 😉 ) especially for SUSI (our very own personal digital assistant, a cute one indeed !)

The JSONArray result of the EventBriteCrawler was set in SusiThought, which is nothing but a piece of data that can be remembered. The structure or the thought can be modelled as a table which may be created using the retrieval of information from elsewhere of the current argument.

/** Defining SusiThought as a class 
 * which extends JSONObject

public class SusiThought extends JSONObject {

/* details coming soon.... */


/** Modifications in EventBriteCrawler
 *  Returning SusiThought instead of 
 * a simple JSONObject/JSONArray.
public static SusiThought crawlEventBrite(String url) {
    SusiThought json = new SusiThought();
    return json;


The API EndPoint was thus created.
A sample is as: http://loklak.org/api/console.json?q=SELECT * FROM eventbrite WHERE url=’https://www.eventbrite.fr/e/billets-europeade-2016-concert-de-musique-vocale-25592599153′;

Screenshot from 2016-07-15 13:22:00


The files generated were next imported in the Open Event Web App generator, using simple steps.


Screenshot from 2016-07-15 13:25:39 Screenshot from 2016-07-15 13:36:19

It’s amazing to see how a great visual platform is provided to edit details parsed from the plain JSONObject and deploy the personalized web-app !

Screenshot from 2016-07-15 13:59:47

Screenshot from 2016-07-15 12:55:06Screenshot from 2016-07-15 12:55:18Screenshot from 2016-07-15 12:55:29Screenshot from 2016-07-15 12:54:24
Screenshot from 2016-07-15 12:54:33
Tadaa !
We have our very own event web-app with all the information imported from eventbrite.com in a single (well, very few 😛 ) click (s) !

With this, we conclude the Loklak – Open Event – EventBrite series.

Stay tuned for detailed post on SUSI and Console Services 🙂

Spin-Off: Loklak fuels Open Event

Application structure and the making of an open source SPA


Loklak Webclient would be the biggest SPA repo I have ever seen. Probably because of these two reasons:

  • Application structure was designed to be scalable from the beginning.
  • Application is as much independent as possible from external APIs

As the first reason is covered the in the previous part, this week we will take a look at the second version.

There are three API we are using locally in for Loklak Webclient

  • Iframely: To render data with rich content, we needed a service to debug the resource. Iframely was chosen because it’s open source and its node js implementation fits our repo perfectly.
  • Node-Oauth-shim: Twitter is using Oauth 1, which make it harder to implement Oauth to Twitter from the client without exposing application secret keys, hence, an oauth-shim service is needed. One very popular choice is Oauth.io. Although Oauth.io is open source, its application structure didn’t fit our application, and also is an overkill one. The only vanilla Javascript solution left is Hello.js and its Node-Oauth-shim service. The repo is highly recommended on Github, so as expected, the service works perfectly without any critical errors.
  • Loklak GeoLocation: this is a developing service at Loklak Server Api. At first we used OSM/GoogleMap APIs, however their implementation involves the whole library for a very small use of geo location, so we decided to look for another ways. Meanwhile, Loklak server cache are getter bigger and bigger so GeoLocation is more than just possible. Try this query!

Other than APIs, an application can’t “flourish” without external libraries. There are three place libraries are included in our application

    • If a node package is available, it is saved in node_modules and included with the help of Browserify
    • If not
      1. If it is required for other operations than the angular application, include it in a script tag, before the angular script.
      2. Else, include in app/components/ to be bundled together with the angular application

This way, with the help of build tools, we are able to minimize the number of http requests and the bandwidth to load Loklak Webclient, and make the world a better place 🙂

Application structure and the making of an open source SPA