Mynij Milestone 3: PWA Application Release

The code of Mynij application was refactored into a progressive web application by using the render.js and the PWA generator of ERP5. The new user interface provides some visualisation of the index building and sharing process.
  • Last Update:2021-09-14
  • Version:001
  • Language:en

The goal of this Milestone is to refactor the Mynij application using the same code base of Officejs applications and provide a simple solution for users to define thier own list of websites to search and index. This PWA app will provide:

  • Accessibility (make an app easier to use)
  • Query and results page
  • Add and List RSS/Sitemap sources
  • Build source index in background
  • Import list of RSS/Sitemap
  • Export list of RSS/Sitemap
  • Import index with or without content
  • Export index with or without content

The OfficeJS appstore is a software to run an ecosystem for progressive web applications developed with renderJS and jIO. The Appstore can be reached at https://officejs.com and includes a collection of productivity apps such as editors or converters. Apps are developed under the premises of privacy and availability meaning users are free to choose their storage, can work offline and synchronize their applications easily.

Source code of Mynij app was built as erp5 Business Template (bt5) and can be found in Nexedi gitlab here: https://lab.nexedi.com/Mynij/mynij. This bt5 is installable in erp5 instance, then it will be possible to export as OfficeJS application.

There is many ways to get an erp5 instance in order to deploy your own Mynij app, these documentation below explain how to process and install a bt5:

Mynij Offline installation

Mynij PWA deployed in OfficeJS store is offline-capable web applications, the first launch will install all required files in the browser (html, css, javascript, etc...) which now provide offline experience, aided by officejs service workers.

Officejs Appstore - Dashboard

To install Mynij, go to https://officejs.com and click on Mynij. You will be redirected to the latest Mynij app version and installation will start immediately.

Mynij App Offline installation

 

Configure the storage by selecting Local is Enough where to store RSS/Sitemap sources and index in the web browser indexeddb. When Mynij will build sitemap, the result will be stored in the storage that has been choosen.

Mynij - Choose your storage

Features of Mynij application

Manage Sitemap/RSS Sources

The app will allow to add index Sources with a title and links to one or more rss/Sitemap. A document is created with portal type Mynij Search Collection and store it in the browser indexeddb for later use. At any moment, it's possible to edit the document, add or remove links.

Clicking on Add or + button will open the form bellow for adding a new source.

Build source index in background

Mynij activities page is used for to display all background tasks, these tasks are index building or Torrent seeding. As they can run from few minutes to many hours or indefinitely for torrent seed, we use RenderJS Service Callback to start them.

RenderJS Service Callback is automatically trigger as soon as the gadget is loaded into the DOM and is cancelled as soon as the gadget is removed from the DOM. This is usefull to control and cancel automatically the job when the page change.

Launch a build will simply add the index in the build queue, which is a FIFO list, all registered index in the queue will be built sequentially. Activities page show the current build progression with current state as well as all finished builds.

When the build is finished, the index state will change to built and a popup notification show up with the number of items added to the browser local storage.

Query and results

The search page (menu Search) allow to make a query and get result, the page contain Mynij logo, a search input and list of indexex for query. The user input a pattern, select an index for query then type enter to see result.

There is two results tabs:

  • Mynij results: it present Mynij search result using flexsearch. 
  • Google results: this tab show search result from searx free metasearch engine.

 

A click on Google tab will show online results.

Import and export RSS/Sitemap Source

Export Sources generate a JSON File containing index definition (title, links). This file can be shared between Mynij users and imported in another Mynij app. It's possible to export a single index or full list of indexes of the app.


 

Exported JSON containing list of sources looks like the content bellow:

[{
    "title": "Nexedi.com",
    "links": "http://softinst126139.host.vifib.net/www.nexedi.com.xml"
}, {
    "title": "TheVerge.com",
    "links": "http://softinst126139.host.vifib.net/www.theverge.com.xml"
}]

Import and export Index

Export Index allow to save the full index into JSON file, this mean export all Flexsearch data, index definition and saved content with or without pages. Exporting index has two variants: export the stringified JSON file, or a compressed version of the file, which is smaller and thus takes less time to download.

The user can decide to export compressed file with JSZip (which can take a bit more time to generate zip file but has a smaller size) or simple file, it's also possible to decide if pages content will be included to the export or not.

Import will take the exported index file and restore full index with or without page content (if was exported without page content). The index to import can be a zipped JSON or a non compressed JSON file, Mynij will automatically detect if uncompression is required while restoring index.

Selenium UI Tests

Selenium test suite integrated to erp5 is used to run automated tests of Mynij app. The UI is tested with random data to ensure that all features are working well and there is no regression during the development. Mynij selenium test bt5 source code can be found here erp5_web_mynij_search_ui_test.

Here is mynij search Zuite result in erp5:

Contact

  • Logo Nexedi
  • Alain Takoudjou
  • alain (dot) takoudjou (at) nexedi (dot) com
  • email was talino@tiolive.com
  • Photo Jean-Paul Smets
  • Logo Nexedi
  • Jean-Paul Smets
  • jp (at) rapid (dot) space
  • Jean-Paul Smets is the founder and CEO of Nexedi. After graduating in mathematics and computer science at ENS (Paris), he started his career as a civil servant at the French Ministry of Economy. He then left government to start a small company called “Nexedi” where he developed his first Free Software, an Enterprise Resource Planning (ERP) designed to manage the production of swimsuits in the not-so-warm but friendly north of France. ERP5 was born. In parallel, he led with Hartmut Pilch (FFII) the successful campaign to protect software innovation against the dangers of software patents. The campaign eventually succeeeded by rallying more than 100.000 supporters and thousands of CEOs of European software companies (both open source and proprietary). The Proposed directive on the patentability of computer-implemented inventions was rejected on 6 July 2005 by the European Parliament by an overwhelming majority of 648 to 14 votes, showing how small companies can together in Europe defeat the powerful lobbying of large corporations. Since then, he has helped Nexedi to grow either organically or by investing in new ventures led by bright entrepreneurs.