summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2025-07-16 23:44:55 +0100
committerJoe Carstairs <me@joeac.net>2025-07-16 23:44:55 +0100
commitadc9078dd674d6849e24add3ad9412858ed4697f (patch)
treec2d90c61a888a0776a9625ce2d8a7e19cc4edf86
parent71b012799f7081c80fe8a03a5862e316e22e6d93 (diff)
add ard-000, ard-001
-rw-r--r--requirements/architecture/arch-v1.md4
-rw-r--r--requirements/architecture/ard-000.md35
-rw-r--r--requirements/architecture/ard-001.md30
3 files changed, 67 insertions, 2 deletions
diff --git a/requirements/architecture/arch-v1.md b/requirements/architecture/arch-v1.md
index a8b8b13..999cb23 100644
--- a/requirements/architecture/arch-v1.md
+++ b/requirements/architecture/arch-v1.md
@@ -2,8 +2,8 @@
![architecture diagram](./architecture.png)
-- There must be a desktop GUI
-- The desktop GUI must persist domain entities to an SQLite file
+- There must be a desktop GUI implemented in iced.rs (ard-000)
+- The desktop GUI must persist domain entities to an SQLite file (ard-001)
- The desktop GUI must persist config and caches to files
- The desktop GUI must send and receive messages to the REST API via HTTPS
- There must be a REST API
diff --git a/requirements/architecture/ard-000.md b/requirements/architecture/ard-000.md
new file mode 100644
index 0000000..d671cf8
--- /dev/null
+++ b/requirements/architecture/ard-000.md
@@ -0,0 +1,35 @@
+# ard-000: desktop GUI implemented in iced.rs
+
+## Problem
+
+Various requirements ask for the user to interact with Schist using a desktop
+computer.
+
+- req-014
+- req-016
+- req-021
+- req-023
+- req-048
+- req-050
+- req-052
+
+We need a way for the user to interact with Schist using a desktop computer.
+
+## Options
+
+- A command-line interface
+- A terminal UI (TUI)
+- A GUI implemented in another programming language
+- A GUI implemented in another Rust framework
+
+## Decision
+
+A GUI is a standard solution. Prominent alternatives are a command line or a
+TUI, but these alternatives are generally not suited to applications with lots
+of data and complex interactions.
+
+I like Rust.
+
+iced.rs is the most popular Rust GUI framework available at the time of writing.
+It is used in many diverse open-source projects, is well-supported, and is
+cross-platform, which could be useful when extending Schist to a Web GUI.
diff --git a/requirements/architecture/ard-001.md b/requirements/architecture/ard-001.md
new file mode 100644
index 0000000..0137251
--- /dev/null
+++ b/requirements/architecture/ard-001.md
@@ -0,0 +1,30 @@
+# ard-001: SQLite for desktop storage
+
+## Problem
+
+Schist needs a desktop GUI, and this desktop GUI needs a storage medium, in
+order to store domain entities, such as transactions, buckets, pipes and drips.
+
+## Options
+
+- SQLite
+- Bespoke file storage
+- NoSQL database
+- Other SQL database
+
+## Decision
+
+Schist's desktop GUI will persist domain data in an SQLite file.
+
+SQLite is well-supported in Rust via the rusqlite crate, and we are going to be
+writing the desktop GUI in Rust as a result of ard-000.
+
+SQLite is distinctive in that it runs in-memory but stores data in a file. The
+main motivation for having databases running as separate processes is that it
+enables horizontal scalability, but for a single-user app running locally, this
+is not a major concern.
+
+Resilience is easy and transparent in SQLite. It lives in a file on the user's
+hard drive. If they want extra resilience, they can back up their hard drive.
+
+There is no need to take on the complexity of managing bespoke file storage.