Browse Source

Merge pull request #348 from provokateurin/feature/login-docs

RFC: Login docs
pull/329/head
Kate 2 years ago committed by GitHub
parent
commit
35eb2d6579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      README.md
  2. 9
      docs/architecture.md
  3. 0
      docs/architecture.puml
  4. 0
      docs/architecture.svg
  5. 5
      docs/login.md
  6. 36
      docs/login.puml
  7. 1
      docs/login.svg
  8. 2
      tool/generate-assets.sh
  9. 5
      tool/generate-docs.sh

10
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

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

0
assets/architecture.puml → docs/architecture.puml

0
assets/architecture.svg → docs/architecture.svg

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

5
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)

36
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

1
docs/login.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 15 KiB

2
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/<path /<path fill=\"$color\" /g" assets/logo.svg

5
tool/generate-docs.sh

@ -0,0 +1,5 @@
#!/bin/bash
set -euxo pipefail
cd "$(dirname "$0")/.."
plantuml -tsvg docs/*.puml
Loading…
Cancel
Save