summaryrefslogtreecommitdiffstats
path: root/doc/shopfs.md
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2026-03-07 11:45:19 -0500
committerSam Anthony <sam@samanthony.xyz>2026-03-07 11:45:19 -0500
commit7c32f8a87889c8fdb8637243fd540061ea1a8539 (patch)
treefe5b5b42f3cfe74e755cf57419b7f3d3b6dd89bb /doc/shopfs.md
parent36381d86c6a690a7870ce360dad63be333361447 (diff)
downloadbuth-7c32f8a87889c8fdb8637243fd540061ea1a8539.zip
doc: simplify architecture, some notes
Got rid of client-side 9p, which was just silly bloat. Using HTTP exclusively on the client side now, with htmx. Combined auth and api servers into monolithic buthd, which translates http/9p between client and backend 9p servers. Added some implementation and security notes, and part of shopfs.
Diffstat (limited to 'doc/shopfs.md')
-rw-r--r--doc/shopfs.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/shopfs.md b/doc/shopfs.md
new file mode 100644
index 0000000..6e1e199
--- /dev/null
+++ b/doc/shopfs.md
@@ -0,0 +1,17 @@
+
+# 9P files served by the `shopfs` daemon
+
+`carts/`
+ `<username>/`
+ `<sku>`
+
+`/carts/<username>/<sku>` (rw)
+Creating the file `<sku>` adds a single item of `<sku>` (stock keeping
+unit) to user `<username>`'s cart. The initial quantity is 1 unit.
+Read returns the number of items of that type in the user's cart, in
+text form (`[1-9][0-9]*`). Writing a number to the file adds or
+removes the specified number of items to/from the cart
+(`[+-]?[1-9][0-9]*`). Removing the file removes (all units of) the
+item from the cart.
+
+TODO: checkout