Scala crud app using http4s, circe and in-memory-db (thread safe concurrent TrieMap). Stack safe recursion optimized for tail-calls (tail rec)