add db, fix unit test, fix helpers, complete json route