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:
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:
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.
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.
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.
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.
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:
A click on Google tab will show online results.
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:
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 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: