add db access and ability to save json snippets