Github, Forking, and Access to Justice

Tl;dr: Forking is great; Our decision tree project is a good way to screen and refer potential clients.  Use it.

Last week, I gave a talk on open source software to members of the Louisiana State Bar Association, and part of the discussion centered around the wonder of “forking.”  Forking is the practice in open source software development where one developer can easily create a copy of someone else’s code and then make whatever changes or improvements they wish, a practice which has been greatly facilitated by the advent of Github. To give a concrete example of forking, I told them the following story.

I am on the board of the Justice and Accountability Center of Louisiana, (JAC) a group which helps ex-offenders with employment issues. One of their main efforts is in providing criminal record expungements. In a state like Louisiana, which has one of the highest incarceration rates in the world, there is a tremendous need for this type of service. When the group held an “Expungement Day” last September for members of the public to get advice and information about expungements, the line of people waiting to get in ran around the block and the event ended up making the local evening news.

Lines forming around the block to get advice and information about criminal records expungements.
Lines forming around the block to get advice and information about criminal records expungements. New Orleans, September 2013.

Given the huge year-round demand, the group asked me to find a technological tool which might help in screening potential clients and getting them to the legal services they need. If people could do a little technological self-help, it would save the need for them to line up outside on the few days a year when Expungement Days were offered. Our first thought was to use decision trees, the well-known process which guides users to an outcome after answering a series of yes or no questions.  My students Shannon Jung and Edem Tsiagbey had worked on just such a tree for expungements last year, so we already had a good logic in place.  All we needed now was a front-end to deliver the questions to potential clients.

I searched around on Github and found Warren Harrison‘s excellent Interactive Decision Tree (IDT). The project, written in a delightfully simple procedural php style, allows you to create an xml-based decision tree and then present the data to users in an attractive slider format.  I downloaded a copy to the server and with the invaluable help of Adrienne Wheeler, JAC’s Director of Law and Policy, put up an updated expugnement tree.

The result was fairly good, but there were some limitations. First and foremost, we are lawyers and we need to have our disclaimers (“Use of the service does not constitute legal advice…”). Warren’s IDT as it stood did not allow us to present a disclaimer and have the user agree to it. The IDT also had a wide-open back end so that anyone could create and edit the decision trees, which was less than ideal in our environment. Lastly, JAC wanted to maintain a database of lawyers who agreed to do pro bono or lo bono expungements and track whether or not the IDT resulted in referrals to those lawyers.

That’s where the forking came in. I forked Interactive Decision Tree, fired up my trusty copy of Vim, and got to work. I created a password-protected backend where all the business of the application could be done. I added some code which wrote the disclaimers directly into the xml and required the user to accept the terms before heading off to the tree.  Next I added a database of lawyer referral sources which was hooked up to the tree.  When the tree suggests to the user that he or she should contact a lawyer for more help, the program does a geolocation-based look up to find cooperating lawyers near the user’s location. If the user clicks through to the lawyer’s site or phone number, the click is then stored in a database so that JAC can have some idea as to how the service is being used. Lastly, I added the ability to theme the trees using Boostrap and Bootswatch.

The IDT fork is still in development with some features still to be added. I hope to have a report generator which will allow JAC to count referrals to lawyers on a monthly basis. I also hope to build in the ability for an individual tree to be packed up and presented as an iPhone or Android app, using PhoneGap. As it stands now, though, the project is fairly stable and you’re welcome to use it on your site!

See it Action:

Tree Demo

Backend demo (username: admin, password: admin)

Repo