We treat the server as an adversary. So everything is chunked an encrypted so the server can't see file data, filenames, file sizes, whether something is a file or dir, who has access to a file, who your friend are etc. Everything is signed so servers can't tamper with your data either.
We also use a p2p and self-authenticated protocol so it is easy to migrate servers whilst keeping your identity, friends and data.