From 90a12ed04383e4cbede13293835c5548bca8d4d6 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 2 Jun 2023 07:36:48 +0200 Subject: [PATCH 1/2] docs: Init --- README.md | 10 ++-------- docs/architecture.md | 9 +++++++++ {assets => docs}/architecture.puml | 0 {assets => docs}/architecture.svg | 0 tool/generate-assets.sh | 2 -- tool/generate-docs.sh | 5 +++++ 6 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 docs/architecture.md rename {assets => docs}/architecture.puml (100%) rename {assets => docs}/architecture.svg (100%) create mode 100755 tool/generate-docs.sh diff --git a/README.md b/README.md index 6113ef48..5c467305 100644 --- a/README.md +++ b/README.md @@ -54,15 +54,9 @@ Developing a new Nextcloud client can be as easy as adding some UI and then nece We have a Matrix space where you can ask questions: https://matrix.to/#/#nextcloud-neon:matrix.org -## Architecture overview +## Documentation -![Architecture overview diagram](assets/architecture.svg) - -The framework consists of multiple packages: -- For APIs the nextcloud package provides the implementations. The dynamite generator generates the code using the OpenAPI specs. -- The main package is the neon package that provides widgets and functionality that is useful for building a Nextcloud client. It also manages the global state at runtime so that the app implementations do not have to manage things like multiple accounts for example. -- The individual apps are implemented as separate packages. Those depend on the neon framework and implement a few interfaces so that the neon framework can use them. -- On top of all that sits the app package that injects the relevant app implementations into the framework. It is possible to configure which app implementations should be included and how the app is branded. +See [docs](./docs). ## Platform support diff --git a/docs/architecture.md b/docs/architecture.md new file mode 100644 index 00000000..7228791b --- /dev/null +++ b/docs/architecture.md @@ -0,0 +1,9 @@ +# Architecture overview + +![Architecture overview diagram](architecture.svg) + +The framework consists of multiple packages: +- For APIs the nextcloud package provides the implementations. The dynamite generator generates the code using the OpenAPI specs. +- The main package is the neon package that provides widgets and functionality that is useful for building a Nextcloud client. It also manages the global state at runtime so that the app implementations do not have to manage things like multiple accounts for example. +- The individual apps are implemented as separate packages. Those depend on the neon framework and implement a few interfaces so that the neon framework can use them. +- On top of all that sits the app package that injects the relevant app implementations into the framework. It is possible to configure which app implementations should be included and how the app is branded. diff --git a/assets/architecture.puml b/docs/architecture.puml similarity index 100% rename from assets/architecture.puml rename to docs/architecture.puml diff --git a/assets/architecture.svg b/docs/architecture.svg similarity index 100% rename from assets/architecture.svg rename to docs/architecture.svg diff --git a/tool/generate-assets.sh b/tool/generate-assets.sh index a0af4822..f82d3ae7 100755 --- a/tool/generate-assets.sh +++ b/tool/generate-assets.sh @@ -4,7 +4,5 @@ cd "$(dirname "$0")/.." color="#f37736" -plantuml -tsvg assets/architecture.puml - wget https://raw.githubusercontent.com/Templarian/MaterialDesign/master/svg/cable-data.svg -O assets/logo.svg sed -i "s/ Date: Fri, 2 Jun 2023 08:15:31 +0200 Subject: [PATCH 2/2] docs: Document login user flow --- docs/login.md | 5 +++++ docs/login.puml | 36 ++++++++++++++++++++++++++++++++++++ docs/login.svg | 1 + 3 files changed, 42 insertions(+) create mode 100644 docs/login.md create mode 100644 docs/login.puml create mode 100644 docs/login.svg diff --git a/docs/login.md b/docs/login.md new file mode 100644 index 00000000..46817809 --- /dev/null +++ b/docs/login.md @@ -0,0 +1,5 @@ +# Login user flow + +This diagram displays the user flow for logging into the app. This is not how it currently works, but how it should work at some point. + +![Login user flow diagram](login.svg) diff --git a/docs/login.puml b/docs/login.puml new file mode 100644 index 00000000..bbe65592 --- /dev/null +++ b/docs/login.puml @@ -0,0 +1,36 @@ +@startuml login + +(*) if "Started from QR code scanner?" then +-[#red]->[Yes] "Validate server details" +else + ->[No] if "Has account?" then + -->[Yes] (*) + else + -->[No] "Login page" + endif +endif + +if "Selected login method?" then + -[#blue]->[Login flow] "Validate server details" + -[#blue]-> "Open login flow page" + -[#blue]-> "Initiate login flow" + -[#blue]-> "Open web browser" + -[#blue]-> "Wait for login flow result" + -[#blue]-> "Validate login details" +else + -[#red]->[QR code] "Open QR scan page" + -[#red]-> "Scan QR code" + -[#red]-> "Validate server details" + -[#red]-> "Validate login details" +endif + +-->[Login success] (*) + + +legend left + |Color | Login method | + |<#red> | QR Code | + |<#blue>| Login flow | +endlegend + +@enduml diff --git a/docs/login.svg b/docs/login.svg new file mode 100644 index 00000000..d6983c67 --- /dev/null +++ b/docs/login.svg @@ -0,0 +1 @@ +Validate server detailsLogin pageOpen login flow pageInitiate login flowOpen web browserWait for login flow resultValidate login detailsOpen QR scan pageScan QR codeStarted from QR code scanner?YesNoHas account?YesNoSelected login method?Login flowQR codeLogin successColorLogin method QR Code Login flow \ No newline at end of file