blob: faac44ec94016609eb256c6145ab67c66ea4a431 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# Architecture
Intended to be deployed on OpenBSD.
- LAN
- shop.samanthony.xyz
- Basic web server, e.g. httpd(8)
- Serves static HTML files
- Serves scripts (js/wasm) including htmx.js
- api.shop.samanthony.xyz
- `buthapi` API server
- Serves htmx fragments
- Serves 9P {/cart, /checkout} to authenticated clients via websockets
- auth.shop.samanthony.xyz
- `buthauth` web authentication gateway
- Client-facing HTTP interface to authfs
- Handles registration and login forms
- authfs
- `buthauthfs` daemon
- Persistent user database
- Stores password hashes
- Manages client sessions
- Serves 9P to api and auth servers
- relay
- relayd(8)
- TLS proxy/gateway
- WAN
- Client web browser
- HTML renderer, js/wasm interpreter
- Generates and stores its session ID (in a cookie)
The LAN could be either a single OpenBSD host, several vmd(8) VMs, or several machines in a VPN, e.g. Tailscale.
![[arch.png]]
|