From 62dc9d6cc0802bb1ab761df6f6db3b5923489425 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 5 Nov 2025 20:00:20 -0500 Subject: [PATCH] docs: Add a little diagram of how I think about Tilde Friends. --- docs/model.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 docs/model.md diff --git a/docs/model.md b/docs/model.md new file mode 100644 index 00000000..66df196f --- /dev/null +++ b/docs/model.md @@ -0,0 +1,32 @@ +# Model + +A reasonable mental model of Tilde Friends is as a virtual computer. User +interace is through a web browser. Communication with the outside world is +through the Secure Scuttlebutt (SSB) network protocol. Persistence is through +an SSB store and an additional key-value store in an sqlite database. + +The schema for the sqlite database is primarily a `messages` table and a +`blobs` table, which are what one would expect from the SSB specifications. + +```dot +digraph { + web_browser -> tilde_friends_web_interface [dir=both]; + web_browser [shape=rect,label="Web Browser"]; + subgraph cluster_tilde_friends { + label = "Tilde Friends"; + tilde_friends_web_interface -> example_app [dir=both]; + subgraph cluster_sandbox { + label = "app sandbox"; + example_app; + } + example_app -> tilde_friends_core; + tilde_friends_core -> example_app; + tilde_friends_web_interface -> tilde_friends_core; + tilde_friends_core -> "db.sqlite"; + tilde_friends_core -> ssb; + "db.sqlite" [shape=cylinder]; + } + ssb -> other_ssb_clients [label="Secure Handshake",dir=both]; + other_ssb_clients [shape=rect,label="SSB Peers"]; +} +```