From 7d68f6fef801a2d051744f84039205aeae9ca126 Mon Sep 17 00:00:00 2001 From: cinereal Date: Fri, 6 Jun 2025 11:05:27 +0200 Subject: [PATCH] add data model for the reference front-end (#31) follows up from #31 to offer a data model focused on formalize to the point of incorporating any data attribute types to be stored in the `panel` db. data model [requirements](https://git.fediversity.eu/Fediversity/meta/src/branch/main/architecture-docs/data-model-requirements.md): - [x] specifying [entity relations](https://mermaid.js.org/syntax/entityRelationshipDiagram.html#relationship-syntax) e.g. many-to-many - [x] migrating both deployed and staged configurations - [x] deploying of applications using the same versions - [x] retaining relevant application state - handling of application-specific migration logic, such as to rewrite URLs as needed - note this requirement does not affect the model here, in the sense it is handled through code rather than through the database closes https://git.fediversity.eu/Fediversity/Fediversity/issues/103. Reviewed-on: https://git.fediversity.eu/Fediversity/meta/pulls/31 Reviewed-by: Valentin Gagarin Co-authored-by: cinereal Co-committed-by: cinereal --- architecture-docs/panel-data-model.mmd | 24 ++++++++++++++++++++++++ architecture-docs/panel-data-model.svg | 1 + 2 files changed, 25 insertions(+) create mode 100644 architecture-docs/panel-data-model.mmd create mode 100644 architecture-docs/panel-data-model.svg diff --git a/architecture-docs/panel-data-model.mmd b/architecture-docs/panel-data-model.mmd new file mode 100644 index 0000000..45f42a7 --- /dev/null +++ b/architecture-docs/panel-data-model.mmd @@ -0,0 +1,24 @@ +--- +title: Data model of sample web application +--- +erDiagram + operator { + string username + string password_hash + } + deployment { + json deployed_configuration + option[string] staged_configuration + option[string] version + } + backup["back-up"] { + string bucket + string endpoint + } + keypair { + string access_key + string secret_key + } + operator ||--o{ deployment : has + deployment ||--o{ backup : has + backup ||--|{ keypair : authorises diff --git a/architecture-docs/panel-data-model.svg b/architecture-docs/panel-data-model.svg new file mode 100644 index 0000000..5e8d048 --- /dev/null +++ b/architecture-docs/panel-data-model.svg @@ -0,0 +1 @@ +operatorstringusernamestringpassword_hashdeploymentjsondeployed_configurationoption[string]staged_configurationoption[string]versionback-upstringbucketstringendpointkeypairstringaccess_keystringsecret_keyhashasauthorisesData model of sample web application \ No newline at end of file