Mobile View with expanded Menu
For Technical instructions refer to each README inside the source github repo parent folders.
Modernizing local, state, and federal governments by creating powerful sites without many resources. The challenge is to create a cool product that is effective and future-proof for not only the public but the people who maintain and author it as well.
What it does
The Hawaii Revised Statutes have been transformed to clean structured data that not only formats the data as it is read, it standardizes important metadata for each. Combining this data to a optimized original template has given the statutes a brand new website that is mobile responsive and navigable. We also easily transform the content into a JSON representation that we call the Content API. All this while still maintaining the simplicity of hosting and authoring of the statutes. An example of using the content API through an Amazon Alexa app was also created to show that the API can enable us to distribute statutes to a number of devices and applications.
How I built it
I've created a platform using Hugo static site generator. An ETL parser program was created to transform files from the original html to yaml markdown files. Custom layout and theming was created to optimize the design and navigation for any device but also maintain the simplicity of the content. Another template was created in Hugo to generate JSON representations of the content allowing an API to our data. Lastly, to provide an example of the API, an Amazon Alexa skill was created that interacts with the API. Alexa can not only read a statute given the section id, but it can also give information on state symbols and definition of Aloha Spirit, sourced by the statutes. An entire Continuous Integration and Delivery process using Github and Travis CI is enabled on the forked repo that deploys to a second repo that has github pages enabled. This is to show that the files can be hosted "serverless" without the need of a database or dedicated server.
The key factors for this approach include:
- serverless architecture
- separation of content and code
- tool agnostic
- very low upkeep
Challenges I ran into
20k+ pages Although the content and original site is simple, the sheer number of pages 20k+ is not. I find that anything around the 2k mark and above really needs attention to efficiency and optimization. To be able to pivot around these complexities were challenging but rewarding. I found myself, in numerous times, having to re-engineer what may easily have worked for ~1k pages but is unusable for 20k.
Taking a step back into simplicity... hear me out on this one cause I know what you'll say... something simple isn't challenging. We're always in a state of constant advancing technology that it's hard to take a step back into providing the best product vs the cool new one. At work, I'm hands deep into the latest JS frameworks and emerging cloud services that I find that it is very easy to lose sight of producing an effective product because you're blinded by the new and shiny. Throughout this project, i'd internally scrutinize every process / method / tool with questions like, "how hard is this to maintain", "does this provide benefit", "to who does this provide benefit for", "is this easy to understand".
Accomplishments that I'm proud of
I'm proud that I was able to take on a full project single handed in the timeframe given. This forced me to exercise the skills that I consider myself weak in (visual design and devops). There's many times that you sit and think that you could do a certain project or skill but to actually do it is something else.
The product itself, although still prototype, I do take pride in how it turned out.
Actually using services that I knew of but have never actually personally used (ex. travis, alexa, gulp, hugo)
If any of this, even if it's just one thing, has been implemented or has inspired anyone or anything i'd consider this well worth it.
What I learned
- How to create an Alexa Skill
- Appreciation for open source
- Technology and need is constantly changing / need to adapt
- Hawaii Revised Statutes (this one I learned more than I wanted)
What's next for BlueAndKrabby
- Integrate a more powerful search mechanism like elastic search.
- Better parse and clean up more of the original content.
- Perform better analysis on intent structures for machine learning to aid in giving the best information to the user.
- Understand more in-depth how the statutes and maintained and authored and provide better optimizations to the process.