From 582e571eff037f8d82ec38e3d5dec9bdd9dfb9c4 Mon Sep 17 00:00:00 2001 From: avi Date: Mon, 28 Sep 2026 15:09:49 -0500 Subject: [PATCH] Replace BTCPay payments with free pre-orders + live ready-status - server.js: order store with K484-XXXX codes, stand assignment, SSE status to customers, passcode-gated staff API, persists to .data/ - staff.html at /staff: order board with Mark ready / Collected / Cancel - index.html: drop BTCPay API key, invoices, QR, BTC price; orders now server-backed with live PREPARING -> READY updates and stand location - e2e-test.js rewritten for the order loop (14 checks, all passing) - README added; .gitignore covers server/.data --- .gitignore | 3 + README.md | 34 ++ index.html | 394 ++++++-------------- server/.env.example | 21 +- server/docker-compose.btcpay.yml | 188 ---------- server/e2e-test.js | 205 ++++++----- server/mock-btcpay.js | 124 ------- server/package.json | 7 +- server/server.js | 607 +++++++++++-------------------- server/staff.html | 189 ++++++++++ 10 files changed, 666 insertions(+), 1106 deletions(-) create mode 100644 README.md delete mode 100644 server/docker-compose.btcpay.yml delete mode 100644 server/mock-btcpay.js create mode 100644 server/staff.html diff --git a/.gitignore b/.gitignore index 513af21..a4e3b96 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ target/ *.jks tsconfig.tsbuildinfo instance/ + +server/.data/ +server/.env diff --git a/README.md b/README.md new file mode 100644 index 0000000..268cc0d --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# KITCHEN 484 · Solarpunk Summit + +Festival kitchen site: browse the food schedule, place a free pre-order, +and watch it flip to **READY** the moment the kitchen fires it — with the +stand to pick it up from. + +## What it is + +- `index.html` — customer PWA (schedule, cart, pickup codes, live status) +- `server/server.js` — zero-dependency Node backend: order store, pickup + codes (`K484-XXXX`), SSE live status, static hosting +- `server/staff.html` — staff order board at `/staff` (passcode-gated: + mark orders READY / COLLECTED / CANCELLED, filter by stand) +- `home.html` — K484 association page (separate, untouched) + +Payments were removed (Sep 2026): pre-orders are free reservations; +people pay at the stand. The old BTCPay proxy lives in git history +(commit `601c85f`) if it's ever needed again. + +## Run + +```sh +cd server +cp .env.example .env # set STAFF_PASSCODE (openssl rand -hex 4) +node server.js # http://localhost:8787 +``` + +Orders persist to `server/.data/orders.json` (gitignored). + +## Test + +```sh +cd server && npm run test:e2e # 14 checks: order loop, auth, SSE, restart persistence +``` diff --git a/index.html b/index.html index df173c1..4d6a3bd 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,6 @@ - + + +
+
+

KITCHEN 484 · STAFF

+
pre-order board — tap READY when the food is up
+
+
+
+
+ + +
+ + +