Update collaboration doc

Add some diagrams
This commit is contained in:
Max Brunsfeld
2021-06-10 14:27:05 -07:00
parent 9c5c9fdc36
commit e897d1c98e
8 changed files with 157 additions and 148 deletions
+5
View File
@@ -0,0 +1,5 @@
# Diagrams
The SVG sequence diagrams in the `svg` folder are generated from the UML text files in the `src` folder. To regenerate them, run `script/generate-doc-diagrams`.
Documentation for the UML sequence diagram format is located on [the PlantUML website](https://plantuml.com/sequence-diagram).
+17
View File
@@ -0,0 +1,17 @@
@startuml
participant "Zed App" as app
participant "Browser" as browser
participant "Zed HTTP server" as server
rnote over app: Generate encryption keypair.\nListen on an open TCP port.
app -> browser: Open sign-in page\n(public key, TCP port)
browser -> server: Sign in\n(app's public key, app's TCP port)
rnote over server: Generate access token.\nEncrypt it with app's public key.
server -> browser: Redirect to loopback with app's port\n(user id, encrypted access token)
browser -> app: Follow redirect\n(user id, encrypted access token)
rnote over app: Decrypt access token with private key.\nSave credentials to keychain.
@enduml
+19
View File
@@ -0,0 +1,19 @@
@startuml
participant "Zed App" as app
participant "Zed HTTP server" as server
participant "Zed RPC server" as rpc_server
app -> server: POST worktrees\n(user id, access token)
server -> app: OK\n(worktree id, RPC server address)
app -> rpc_server: Connect to the given RPC server address
app -> rpc_server: **Auth**\n(user id, access token)
rnote over rpc_server: Load access token hashes for user.\nVerify that one matches the given access token.
rpc_server -> app: **AuthResponse**\n(credentials valid)
app -> rpc_server: **ShareWorktree**\n(worktree_id, file paths, file digests)
rnote over rpc_server: Load existing files.\nIdentify which are needed.
rpc_server -> app: **ShareWorktreeResponse**\n(needed path indices)
@enduml
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.1 KiB