olmps / memo

Memo is an open-source, programming-oriented spaced repetition software (SRS) written in Flutter.
BSD 3-Clause "New" or "Revised" License
1.82k stars 158 forks source link

[Server support] - Adds server support to `memo` #136

Open matuella opened 3 years ago

matuella commented 3 years ago

Central issue to track the Server support for memo.

Why

Adding a server will allow memo to:

This will inevitably make this project structure way more complex, but it's almost inevitable given the use-case of this application.

Constraints to these changes:

How

At the time of writing, we already tackled both core starting point decisions to this:

Decide which infrastructure and cloud vendor to use

To summarize the first, the decision was to use Firebase because:

There are caveats when making this decision, like having a less flexible (and arguably a less robust) server solution, "severe" vendor-locking, etcetera. We are fine with this, as it seems that the pros outweighs the cons, when comparing the same in AWS or GCP.

Plan database structure, taking into consideration current and planned features

We opted to restructure the current (local) NoSQL database to a more "intelligent" model, solving limitations that we had previously, allowing easy scaling for future modifications and also being more cost-efficient while making read/writes. This rewrite can be seen in this image, summarizing the first version of this remodeling, although subject to change until the final release.

Side-note: This could look kind of confusing, but the problem is that we have to deal with a bunch of aggregator fields, or even properties that must be calculated using the dates - like all memo's average memory recall for a single collection.

Pending discussions to be resolved

Issues

The server should be considered completed after all issues below are closed.

Firebase

Flutter

[NEW] Because https://github.com/olmps/memo/issues/214 feature will also need to be connected to the server, we must also attach all required domain/data logic to make the functionality to work properly:

This will be worked on server branch, which will be eventually be merged to main when we consider it stable.

matuella commented 3 years ago

Added needs more info, as we still need to address the migration issue.