File Structure
Data Directory
/
config/
server :Server
meta :Metadata
ca/
key :KEY
registry :BLOCK{KeyPair}
domain/
key :KEY
registry :BLOCK{Domain}
hosts :TRIE{DOMAIN_ID}
meta :BLOCK{record}
DOMAIN_ID/
config :Domain
audit :BLOCK{Audit}
group :BLOCK{Group}
app/
registry :BLOCK{Application}
authorization
channel :BLOCK{Channel}
district :BLOCK{District}
thread :BLOCK{Thread}
message :BLOCK{Message}
room :BLOCK{Room}
user :BLOCK{User}
watcher :BLOCK{list{Watcher}}
session :BLOCK{Session}
Media Directory
/
registry :TRIE{Media}
GROUP_ID/
BUCKET_ID :BLOCK{FILE}
Design
Permissions
Upon creating the directory structure, the server should restrict the permissions of each directory to only read/write by the current user.
Encryption
Adherent to the server configuration, all data should be encrypted using a symmetric key, which itself is encrypted using provided RSA credentials.