Server is also written in C# using ASP.Net Core Web API.
Server is a distributed server structure. A server can set a destination server to sync content from and to target server. And server can broadcast data changes to other servers connected to it.
The server utilizes RESTful API style: Only serve API services via HTTP requests.
The server provides a multi-user service, every user has its own notebook. A user can share their notes/folders to anyone.
For database, it can be configured as the server is a ASP.Net Core Web API application, and by default, it uses SQLite. EF Core or similar packages should be used to avoid manually writting SQL statements.
To setup a server network, every server should share a private-public certificate, if a server want to join (or connect to) another server, it must have the same private-public certificate.
All node content must be encrypted if they are hosted on the server unless they are set as public to everyone. By default every user has a encryption key generated automatically when users creates their account. The key will be encrypted using user's password and everytime user access the content requires that key be given from the client.
Server provides an API to obtain the encrypted key and client can decrypt that key locally using user's password.