This week I have worked on following
- Updated the README with the instructions as how to install the atlas server locally.
- Written the SQL script files for the DB on a Gist and shared it with instructions.
- Made to get the lock symbol on the edit info window of the bubble.
- Scrum meets.
OpenMRS ID is the system of user management used by the OpenMRS Community. User accounts are managed and created using the OpenMRS ID Dashboard, a web app written in Node.js. Data model is built around LDAP user object and stored on an OpenLDAP server. In order to support unified authentication for all OpenMRS sites and external services, ID Dashboard also provides SSO, OAuth EndPoints.
For Atlas, we use the SSO Endpoints provided by the OpenMRS ID.
So.. What is SSO ?
SSO– Single Sign On authentication of a user with which the user enter his credentials only once to access a group related systems.
How we use it in Atlas ?
We use the multipass strategy of SSO to get the user authenticated to Atlas. For more details into how multipass actually works.. head to this LINK .
In Atlas, we need not encode the user details into AES encrypted JSON –that is done by the OpenMRS ID but we need to decode the encrypted JSON and use the details as we need it.
I use this Library for Decoding .
Updates for this week regarding the project.
- Since, the previous I am not entirely done with the frontend part, this week -I have invested in completing it and I am done with the same.
- Got the legend for the atlas up and now I can easily switch between the types, versions and distro options from the controller on the atlas.
- The markers are up from the previous week.
- Gained some knowledge regarding the SSO authentication and multi-pass.
- Commits for this week : Link .
- Will be working on authentication part, using the multi-pass authentication(SSO) against the openmrsID.
- Get the RSS feed consistent.
- Atlas cronjob (screen-captures) using the PhantomJS.
- Make sure the REST URI are consistent with the module and updates from the module.
This week, I started with getting the map show up when the app runs with the rest URI’s I’ve written in node, but surprisingly that didn’t happen as expected so I have to run through the code related to the frontend part and figured out a few points as how the frontend was designed.
- So up till now I am able to show the map on the browser and markers showing up on them
- The view files that I use right now are .ejs which are relatively very easy to understand and write
Objectives yet to achieve and plan coming weeks
- Probably it may take a few days to come up with the markers and Legend/Distributions show up on the map.
- Start the authentication part with the help of the community.
This week, I exposed the REST resources of OpenMRS Atlas using Node, Coming to the timeline, I have almost accomplished what I’ve planned earlier this month.
Some of the key Resource and routes for accessing them are
- GET /distributions : Response is a JSON object with all the type of distributions.
- GET /markersites : Response is a JSON object with all the markers available in the database
- GET / marker/:id : Get a specific marker with UUID parameter.
- GET /markers : This route will respond with a JSON object with a group of markers of a given type and version as parameters in the URI.
- POST /marker : Creates a new marker on the Atlas.
- POST /marker/:id : to update the specific marker.
I have completed the midterm evaluation of my mentor earlier this week and I’ve almost achieved what I have planned in the timeline .
Yet to achieve/plan for post-midterm
Hopefully, the following are the key things I’ll be working until the completion of GSoC.
- Consistent REST API.
- Get the UI done in a week(probably by the end of June).
- Authentication against OpenMRS ID .
- Adding functionalities to support arbitrary metric from the client.
- Compatibility to use the atlas through the module.
- Release the Atlas 3.0
All this week, I was constantly looking at the PHP code and figuring out some of the rest end points which I am gonna rewrite into node.
So my updates this week are as follows
- Working on REST URI in the node app.
- voraciously read and learnt some PHP laravel concepts.
- Added favicon and the title for the app.
- At last, Learnt a lot this week
commits this week : Link
Hope you all are doing well and I’ll explain how I made a favicon show up successfully on my browser after an hour of search.
Currently, I am working on building a node app using express with restful service. So this post will explain how I made a favicon show up in the browser using the features of the express framework.
Initially, I want to brag a bit about the express framework. It is a lightweight node.js web application framework which is currently holding huge recommendation from the node.js community if one wants to build a web app presenting rest services. It has 25750 stars and 4800 forks as I write this.
Some useful resources for express framework
GitHub : Link
How I have done it
- Initially, I recommend you to take the code generated by the express generator module (google how u can get the express generator installed locally )
- If u generate the code using express generator then all u have to do is jus uncomment the following code which u get by default.
in the above line we use path and favicon dependencies which come by default if u have used the express generator.
if not you have to do the following
var path = require(‘path‘);
var favicon = require(‘serve-favicon‘);
you’ll have to place the favicon.ico file in the public/images directory 🙂
For any queries ask in #express , #nodejs channel via IRC. I am sure they’ll help you.
This week I was very busy doing following tasks
- Figured out a little part of the API for the existing Laravel framework and started designing it.
- Committed little bit of code which I will develop into an app running in the coming weeks(hopefully).
- Attended scrum meets.
- Updated the mentors through the call.
- Relatively it was a huge learning experience and due to which I am a bit behind the schedule.
I would like to explain a bit about REST
REST : Representational state transfer, In my terms if I could put it in one line, it is a renaissance in software industry which came along with web 2.0
Some terms which are useful in understanding rest are
- API server: main REST application serving the API, in this case, written in PHP.
- API endpoint: a backend “method” which the client communicates with to perform an action and produce results.
- API endpoint URL: URL through which the backend system is accessible to the world.
- API token: a unique identifier passed via HTTP headers or cookies from which the user can be identified.
Currently I am going to design the API and write the specifications in swagger specifications and generate the server side code and tweak it accordingly to make it work.
Finally submitted the feedback, little bit nervous about the coming mid-term evaluation. 🙂
Commits of this week : Link
Thanks for reading 🙂