refactor as a proper lib (see seeds-boilerplate-app for the moved sample webapp)