2014 Internship Project
This project is being considered as a potential project for 2014 Internships. If you are a potential intern and are interested in working on this project, please discuss it in detail with the mentor(s) listed here before submitting your internship proposal.
|Primary Mentor||Elliott Williams|
Elliott built the OpenMRS ID Dashboard as a student in 2011. The Dashboard is a lightweight web application (~4000 SLOC) that facilitates user-account creation and profile management in the OpenMRS Community. We're looking to design better ways for users to "create a profile" that allows them to tie lots of information to their OpenMRS ID—such as who they are, what their needs are, what they're interested in. We will be evolving the OpenMRS ID system to be capable of holding this kind of information.
Currently, the OpenMRS ID's data model is built around an LDAP user object (we use OpenLDAP under the hood to store the basic user profile data). Since we want to store much more versatile data than LDAP allows, the the Dashboard will need to be decoupled from its LDAP core, and a new data model that can store and manipulate all kinds of data on the user will be implemented. Building and implementing this new data model is the first objective of the project.
OpenMRS ID also needs better connectivity with other services that hold OpenMRS contributor data. We want to allow users to get data into their OpenMRS Profile from other networks—GitHub, Twitter, etc. We also need to interact with the data outside of the Dashboard—from other applications like Desk.com or HingX. To handle this, a REST interface should be implemented that has full access to the new data model.
- Re-write OpenMRS ID's data model to a generic data store, probably based on MongoDB. This data model will need to sync with the current OpenLDAP server or needs to implement an LDAP protocol server using ldapjs.
- Build a REST and OAuth-backed interface to the new data model.
- Improve the signup and profile-editing interface at https://id.openmrs.org with some of the new OpenMRS ID functionality.
- Use the REST API you built to import data from OpenMRS ID to Desk.com, our CRM/Helpdesk service.
- I'm leaning toward using Mongooseon top of MongoDB as the platform behind the new data model. We'll want to create a schema that contains all the user attributes we store on LDAP currently, and that can be extended to store anything else.
- In addition to a user-centric data model, we should move some of the data that's currently stored in MySQL via Sequelize over. These data include email verifications, google groups subscriptions, and navbar links.
- Once the Mongoose ODM is in place (and structured in a models/ directory or something similar), we can build an LDAP server using ldapjs that draws from this data model directly. ldapjs provides an Express-like interface for responding to LDAP requests. The goal will be to replace our current OpenLDAP server with this LDAP interface on top of the new data model.
- Finally, I'm interested in using Restify to serve the data model as a REST interface. Restify can be app.use()'d into the Express server and served from an /api uri on the server.
- As it currently stands, the application is a little unstructured—there's not so much MVC / separation of concerns. I'd love to better organize the application as a part of the development process. For some inspiration, an incomplete and out-of-date attempted restructuring exists on an old branch. While I'm not suggesting picking up the work on that branch, it might give some good ideas on how to go forward.
- Wanna see something pretty? next.openmrs.org currently has a new Wordpress theme we'll be redesigning www.openmrs.org for. The infrastructure team would love to use the REST api from this project to allow users to create IDs directly from the Wordpress site.
- Current OpenMRS ID source code: https://github.com/openmrs/openmrs-contrib-id
- A Reprise of LDAP: a good blog post giving an overview of what LDAP is, and info about ldapjs, the library we intend to incorporate in this new data model http://blog.nodejs.org/2011/09/08/ldapjs-a-reprise-of-ldap/
- LDAP for Rocket Scientists is a good guide to for those new to LDAP. It is not, in fact, for rocket scientists.
- Mastering OpenLDAP by Matt Butcher is resource for learning the fundamentals LDAP. It's available as an e-book.