Correct me if I am wrong, but won't latency be an issue if connecting to a DB via an API? I would imagine that would be a deal breaker for most (especially for me).
Building a sports site and only friends of team members or the team members themselves can message each other? Build it in your authorization model. The UI will only see appropriate recipients and only be able to send messages to them. In other words, a lot of your architecture could become UI-DB direct and only a portion going through a business layer.