diff --git a/server/backend/README.md b/server/backend/README.md new file mode 100644 index 0000000..bbc74a7 --- /dev/null +++ b/server/backend/README.md @@ -0,0 +1,18 @@ +The idea is to keep server simple as much as possible. + +This will serve as central endpoint to provide API. + +- list all available devices for the user. +- list all upcoming changes starting from given datetime excluding some device(s). +- put new change to backend. + +Type of changes: + +- import: initial import of texts +- text diff +- branch operation - add / delete / move / rename +- new time intervals +- delete time intervals + +All data is encrypted. Server hasn't access to changes content. Changes are treated as BLOBs. + diff --git a/server/sql/database.sql b/server/sql/database.sql new file mode 100644 index 0000000..fb875dd --- /dev/null +++ b/server/sql/database.sql @@ -0,0 +1,18 @@ +CREATE DATABASE IF NOT EXISTS litt CHARACTER SET utf8 COLLATE utf8_general_ci; + +CREATE TABLE diffs ( client_id int not null, + device_id varchar(255) not null, + created timestamp not null, + content blob not null ); + +create table clients ( client_id int not null, + username varchar(255) not null, + password varchar(255) not null); + +create table devices ( client_id int not null, + device_id int not null, + device_name varchar(255) not null, + device_platform int not null); + + +