- initial work on backend side

This commit is contained in:
Dmytro Bogovych 2021-04-03 22:15:09 +03:00
parent 201ecac7b3
commit e1791d755f
2 changed files with 36 additions and 0 deletions

18
server/backend/README.md Normal file
View File

@ -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.

18
server/sql/database.sql Normal file
View File

@ -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);