As there are a lot of ideas to hack OpenMRS Atlas to make it more useful to the community and implementers across the globe. So, to finalise the exact work that could be accomplished this summer as a part of GSoC, we had a call last week (@burke@janflowers@pascal ).
The following features will be included to Atlas 3.0 this summer
Rewrite the atlas server backend as a node.js app presenting Restful API.
Authentication against OpenMRS ID.
Add functionality to support arbitrary metric from clients.
I will help you with the OpenMRS ID bits – just let me know! You have no idea how happy I am to see the PHP app die – it makes dockerizing it way easier too – you’re already behind a reverse proxy – so just the app needs to run.
FYI – if it helps at all, I forked @alexis.duque’s mock-id server and dockerized it, so you can spin up a mock multipass server with something like
docker run -d --name mock-id -e REDIRECT_URL=http://atlas/ -p 3000:80 omrs-mock-id
When running, it present’s Alexis’ simple mock login form. Password is just username again, so any username can be mocked. I haven’t tested it, but given this code (except for some minor changes) was working on the staging server, it should work or be close to working.
Anyway, I was planning on putting this code under the mock-id folder of the docker-compose version of openmrs-contrib-atlas.
I can also help you get OpenMRS ID up and running if you like. It’s actually really easy to do! Uses docker-compose. I’d rather not have an image of it be public since it’s pretty much not generic, I’d like to make it less generic soonish.
I have setup the mock-id server locally and it is working.[quote=“burke, post:3, topic:6540”]
I haven’t tested it, but given this code (except for some minor changes) was working on the staging server, it should work or be close to working.
[/quote]
yes, it requires some minor changes, I’ve changed a bit and now I am able to login to the laravel setup of atlas.
Thanks, It always helps in not killing the time to get the setup done.
Initially, I thought to use mongo but I ended up using MySQL since the database design and constraints are already done in the existing MySQL DB and unnecessary shift may lead to complexity(populating it and do the design if any which involves learning curve and scarce of time).
I would like to complete the REST part before the midterm and demo that for evaluation, If possible I’ll try to complete a fully working atlas model(consistent) before the midterm.
As of now the sql queries are not injection proof, could you suggest any good library which supports it. I have come across knex --is it good? any suggestions from you regarding the same.
@shekhar, I’m not sure I understand. How is the user able to influence the SQL queries? We should just be exposing REST resources, and only the frontend should be able to interact with those resources, right?
Yes, you are right they are handled by the frontend but I manually made a rest call using postman. Anyways it is jus an additional thought(i think it isn’t required).
Exposing REST resources and I am almost done with that except a few changes – will complete them by today and I’ll make the video if admins instruct me to do. else,
I’ll work on making few corresponding changes to the view files so that to comeup with the UI before 30th and
hopefully, after mid-term I’ll start with authentication part
Got the Map show up, a little more to improve(have to get the distributions and legend on the map) probably will take a couple of days to get that done.
After that the I’ll start with the authentication.
Feature Request: Admin interface so that I can edit ownership of pins; and add OpenMRS versions as releases happen without having to ssh into the production server and work against a live database. This NEEDS to be there. Remember, helpdesk is entirely volunteer, so don’t make us do more work than necessary.
Can you add this as a “nice to have”/“if time allows” feature on this years GSoC page? That way, if we don’t get around to it this year, then at least we’ll still be able to find a reference to the feature for future Atlas projects.
@shekhar, I’m trying to get openmrs-contrib-atlas-node set up, but I’m not exactly sure how to perform the populate the database and Run the app steps listed in the README. Can you update the README with more details?
EDIT: Can you also include details on what the database name should be, what the user/pass should be, etc.