Replacing Modulus: Design Thoughts

Thanks all for the input and feedback. I began working on this over the past couple of days, and I’ve made a good start.

I decided to call the project “Add-On Index” which sounds a bit awkward, but does make the points that (a) it can cover modules and OWAs, and (b) it’s an index, not a repository.

There is one file (add-ons-to-index.json) that lists all of the add-ons we want to be tracking, with minimal details. Anyone who wants to have their omod/owa indexed would send a PR, adding its details to this file. Thanks @cintiadr for this idea. The application periodically updates this file from github, and then it fetches details/versions of the modules one by one, and indexes them.

The server application uses Spring Boot. This felt very familiar (because of using Spring in OpenMRS) but the latest Spring Boot just makes everything you want to do really easy. Spring has done a great job with this.

I only implemented the “OpenMRS Maven Repo” handler; we should add them for Bintray, etc. And I’m not using any sort of database; the “index” is currently just a List of objects.

I created a small React app that will list the add-ons, let you search, view, and download a version (by linking you through to the place where it’s actually hosted). It needs some CSS love, but I’m not going to get distracted by that for now.

I tried out Snap CI (a ThoughtWorks product) for this project, and honestly their UI for setting up a multi-stage deployment pipeline is amazing. Once I can get some OpenMRS server space, I’ll set it up for CD.

Also, I spent a lot of time on the README. It should be easy for anyone to build and run this, assuming you’ve got Java 8 and Node/NPM installed. (Thanks @mseaton for running through this and finding the error in my instructions.)

Code: https://github.com/djazayeri/openmrs-contrib-addonindex CI: https://app.snap-ci.com/djazayeri/openmrs-contrib-addonindex

Anyone interested in getting involved?

Some of the next things to do:

  • move the github repo over to OpenMRS
  • docker packaging
  • make it look pretty
  • support for required OpenMRS version, and for required module versions
  • support Bintray and prove it works by indexing https://bintray.com/openmrs/owa/openmrs-owa-conceptdictionary
  • show download stats (from bintray)
  • show ratings (from bintray)
  • use a real database with full-text search capabilities
  • implement the legacy API
  • tags/labels
  • “lists” of add-ons e.g. “list of modules in refapp 2.5”
1 Like