[object Object]

← back to Whatsmystyle

initial scaffold — WhatsMyStyle v0.1 (placeholder name)

0e8ad677f936d71743f4e39037e48751a538e2fc · 2026-05-11 19:33:10 -0700 · Steve Abrams

The optometrist for your closet. Server on :9777.

- SQLite schema (users / items / duels / closet / connections / debates)
- Large-pill onboarding flow (11 questions, single-question-per-screen)
- Optometrist duel loop (random pair → A/B/skip → taste-vector update)
- 24-item seed catalog (public listings, hash-based stub embeddings)
- Closet photo upload + llava-13b vision worker
- Stripe FC / Gmail / camera-roll / social / location opt-in stubs
- Stores-near-me via Google Maps Places (gated on API key)
- Recommendations grid with sort + density slider (per standing rule)
- Local-LLM dream-team debate harness (qwen3+deepseek-r1+phi4)
- pm2 supervised; ecosystem.config.js + .deploy.conf wired

Files touched

Diff

commit 0e8ad677f936d71743f4e39037e48751a538e2fc
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon May 11 19:33:10 2026 -0700

    initial scaffold — WhatsMyStyle v0.1 (placeholder name)
    
    The optometrist for your closet. Server on :9777.
    
    - SQLite schema (users / items / duels / closet / connections / debates)
    - Large-pill onboarding flow (11 questions, single-question-per-screen)
    - Optometrist duel loop (random pair → A/B/skip → taste-vector update)
    - 24-item seed catalog (public listings, hash-based stub embeddings)
    - Closet photo upload + llava-13b vision worker
    - Stripe FC / Gmail / camera-roll / social / location opt-in stubs
    - Stores-near-me via Google Maps Places (gated on API key)
    - Recommendations grid with sort + density slider (per standing rule)
    - Local-LLM dream-team debate harness (qwen3+deepseek-r1+phi4)
    - pm2 supervised; ecosystem.config.js + .deploy.conf wired
---
 .deploy.conf             |    3 +
 .gitignore               |   12 +
 data/whatsmystyle.db-shm |  Bin 0 -> 32768 bytes
 data/whatsmystyle.db-wal |  Bin 0 -> 90672 bytes
 docs/SPEC.md             |   74 +++
 ecosystem.config.js      |   16 +
 package-lock.json        | 1542 ++++++++++++++++++++++++++++++++++++++++++++++
 package.json             |   19 +
 public/css/app.css       |  139 +++++
 public/index.html        |  148 +++++
 public/js/app.js         |  309 ++++++++++
 scripts/closet-vision.js |   68 ++
 scripts/debate.js        |   86 +++
 scripts/seed-catalog.js  |  101 +++
 server.js                |  345 +++++++++++
 15 files changed, 2862 insertions(+)

diff --git a/.deploy.conf b/.deploy.conf
new file mode 100644
index 0000000..471e58d
--- /dev/null
+++ b/.deploy.conf
@@ -0,0 +1,3 @@
+PROJECT_NAME=whatsmystyle
+DEPLOY_PATH=/root/Projects/whatsmystyle
+HEALTH_URL=http://127.0.0.1:9777/api/health
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b8caf38
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,12 @@
+node_modules/
+.env
+.env.*
+tmp/
+*.log
+.DS_Store
+dist/
+build/
+.next/
+data/*.db
+data/*.db-journal
+data/uploads/
diff --git a/data/whatsmystyle.db-shm b/data/whatsmystyle.db-shm
new file mode 100644
index 0000000..a6d8b8d
Binary files /dev/null and b/data/whatsmystyle.db-shm differ
diff --git a/data/whatsmystyle.db-wal b/data/whatsmystyle.db-wal
new file mode 100644
index 0000000..eeae526
Binary files /dev/null and b/data/whatsmystyle.db-wal differ
diff --git a/docs/SPEC.md b/docs/SPEC.md
new file mode 100644
index 0000000..92b23e8
--- /dev/null
+++ b/docs/SPEC.md
@@ -0,0 +1,74 @@
+# WhatsMyStyle
+
+**One-line:** AI personal stylist that learns your real taste — like an optometrist asks "better A or B?" — and shops resale + retail for you.
+
+## Tagline candidates (placeholder name = WhatsMyStyle)
+- "Better A — or B?"
+- "Your closet, decoded."
+- "Stylist in your pocket. Honesty in your closet."
+
+## The optometrist loop (core mechanic)
+Instead of asking "what's your style?", we show you pairs and you click.
+After ~30 pairs the model has a usable embedding of your taste.
+After ~100 pairs we can predict YES/NO on any new item with >85% accuracy.
+We keep refining forever — every save, skip, buy, and return tunes the lens.
+
+## Onboarding — single-question, large-pill UX
+One question per screen. Each answer is a huge tappable pill.
+Order, with rationale:
+
+1. **Are you shopping for yourself?**  (yes / for someone else / both)
+2. **Your gender expression for clothes** (women's / men's / unisex / fluid)
+3. **Height** (autofill from previous-session if exists, else slider)
+4. **Body shape** (illustrated pills — not weight; weight is invasive)
+5. **Hair color + length** (8 illustrated pills)
+6. **Age band** (under 25 / 25-34 / 35-44 / 45-54 / 55-64 / 65+)
+7. **Skin undertone** (warm / cool / neutral — with swatches)
+8. **City** (autofill from geolocation w/ permission)
+9. **Budget per piece** (slider: $20 / $50 / $150 / $500 / $1500+ / no cap)
+10. **Sustainability priority** (high / nice-to-have / don't care)
+11. **The ask** — "Can I look at:"
+    - **Your bank receipts** (Stripe Financial Connections — read-only)
+    - **Gmail order confirmations** (read-only)
+    - **Your camera roll** (selected albums only)
+    - **Your social photos** (manual upload — never scrape)
+    - **Your location for stores near me** (Google Maps)
+
+Each integration is OPT-IN with a single toggle. Skipping any of them is FINE — we fall back to optometrist-loop only.
+
+## The closet
+- Upload photo of your closet → llava:13b extracts garment bounding boxes
+- Each garment becomes a record: {category, color, pattern, material_guess, vendor_guess}
+- Receipts (Stripe FC + Gmail) match to garments by amount + vendor + date
+- Camera roll photos of you wearing items → tagged automatically
+
+## The stylist
+- Catalog ingested from RealReal, Poshmark (read-only public listings — never authed scraping)
+- Local LLM ranks new arrivals against your taste embedding nightly
+- Google Maps shows physical stores within 5mi that carry brands you've liked
+- "Try in store" mode — pin items, get walking route through 3 stores
+
+## Dream-team debate gates
+Every significant design / spec decision is debated by the dream team (claude-codex-kimi or codex-3way) before commit. Findings logged to `data/debates/`.
+
+## Tech stack
+- Node 20 + Express
+- SQLite (better-sqlite3) — single-user app, no need for PG
+- Local-LLM-first: llava:13b for vision, qwen3:14b for text via Ollama
+- Vanilla frontend (no SPA framework) — fast, accessible, large-pill UX
+- pm2 process supervision on Mac2 :9777
+
+## Compliance
+- Stripe Financial Connections is the ONLY bank-receipt method. Never plaid scrapers, never bank login forms.
+- Gmail OAuth scope = `gmail.readonly` ONLY, never modify.
+- Social images = USER UPLOAD ONLY, never scrape IG/FB/TikTok.
+- Location requested at the moment it's needed, not at onboarding.
+- All taste data stored locally in SQLite. No cloud sync until Steve approves.
+
+## Out of scope (v0.1)
+- No payments / no checkout — we link out to brand / resale site
+- No social features
+- No email blasts / push notifications
+
+## Port
+:9777
diff --git a/ecosystem.config.js b/ecosystem.config.js
new file mode 100644
index 0000000..ae18281
--- /dev/null
+++ b/ecosystem.config.js
@@ -0,0 +1,16 @@
+module.exports = {
+  apps: [{
+    name: 'whatsmystyle',
+    script: 'server.js',
+    cwd: __dirname,
+    env: {
+      NODE_ENV: 'production',
+      PORT: 9777,
+    },
+    autorestart: true,
+    max_memory_restart: '500M',
+    out_file: './tmp/out.log',
+    error_file: './tmp/err.log',
+    merge_logs: true,
+  }],
+};
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..bdcec62
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,1542 @@
+{
+  "name": "whatsmystyle",
+  "version": "0.1.0",
+  "lockfileVersion": 3,
+  "requires": true,
+  "packages": {
+    "": {
+      "name": "whatsmystyle",
+      "version": "0.1.0",
+      "dependencies": {
+        "better-sqlite3": "^11.3.0",
+        "cookie-parser": "^1.4.6",
+        "dotenv": "^16.4.5",
+        "express": "^4.19.2",
+        "express-session": "^1.18.0",
+        "multer": "^1.4.5-lts.1",
+        "node-fetch": "^2.7.0"
+      }
+    },
+    "node_modules/accepts": {
+      "version": "1.3.8",
+      "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+      "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+      "license": "MIT",
+      "dependencies": {
+        "mime-types": "~2.1.34",
+        "negotiator": "0.6.3"
+      },
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/append-field": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
+      "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==",
+      "license": "MIT"
+    },
+    "node_modules/array-flatten": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+      "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
+      "license": "MIT"
+    },
+    "node_modules/base64-js": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+      "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ],
+      "license": "MIT"
+    },
+    "node_modules/better-sqlite3": {
+      "version": "11.10.0",
+      "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-11.10.0.tgz",
+      "integrity": "sha512-EwhOpyXiOEL/lKzHz9AW1msWFNzGc/z+LzeB3/jnFJpxu+th2yqvzsSWas1v9jgs9+xiXJcD5A8CJxAG2TaghQ==",
+      "hasInstallScript": true,
+      "license": "MIT",
+      "dependencies": {
+        "bindings": "^1.5.0",
+        "prebuild-install": "^7.1.1"
+      }
+    },
+    "node_modules/bindings": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+      "license": "MIT",
+      "dependencies": {
+        "file-uri-to-path": "1.0.0"
+      }
+    },
+    "node_modules/bl": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
+      "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
+      "license": "MIT",
+      "dependencies": {
+        "buffer": "^5.5.0",
+        "inherits": "^2.0.4",
+        "readable-stream": "^3.4.0"
+      }
+    },
+    "node_modules/bl/node_modules/readable-stream": {
+      "version": "3.6.2",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+      "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+      "license": "MIT",
+      "dependencies": {
+        "inherits": "^2.0.3",
+        "string_decoder": "^1.1.1",
+        "util-deprecate": "^1.0.1"
+      },
+      "engines": {
+        "node": ">= 6"
+      }
+    },
+    "node_modules/body-parser": {
+      "version": "1.20.5",
+      "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.5.tgz",
+      "integrity": "sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==",
+      "license": "MIT",
+      "dependencies": {
+        "bytes": "~3.1.2",
+        "content-type": "~1.0.5",
+        "debug": "2.6.9",
+        "depd": "2.0.0",
+        "destroy": "~1.2.0",
+        "http-errors": "~2.0.1",
+        "iconv-lite": "~0.4.24",
+        "on-finished": "~2.4.1",
+        "qs": "~6.15.1",
+        "raw-body": "~2.5.3",
+        "type-is": "~1.6.18",
+        "unpipe": "~1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.8",
+        "npm": "1.2.8000 || >= 1.4.16"
+      }
+    },
+    "node_modules/buffer": {
+      "version": "5.7.1",
+      "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+      "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "base64-js": "^1.3.1",
+        "ieee754": "^1.1.13"
+      }
+    },
+    "node_modules/buffer-from": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+      "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+      "license": "MIT"
+    },
+    "node_modules/busboy": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
+      "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
+      "dependencies": {
+        "streamsearch": "^1.1.0"
+      },
+      "engines": {
+        "node": ">=10.16.0"
+      }
+    },
+    "node_modules/bytes": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+      "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/call-bind-apply-helpers": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+      "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+      "license": "MIT",
+      "dependencies": {
+        "es-errors": "^1.3.0",
+        "function-bind": "^1.1.2"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/call-bound": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+      "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+      "license": "MIT",
+      "dependencies": {
+        "call-bind-apply-helpers": "^1.0.2",
+        "get-intrinsic": "^1.3.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/chownr": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+      "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
+      "license": "ISC"
+    },
+    "node_modules/concat-stream": {
+      "version": "1.6.2",
+      "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
+      "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
+      "engines": [
+        "node >= 0.8"
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "buffer-from": "^1.0.0",
+        "inherits": "^2.0.3",
+        "readable-stream": "^2.2.2",
+        "typedarray": "^0.0.6"
+      }
+    },
+    "node_modules/content-disposition": {
+      "version": "0.5.4",
+      "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+      "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+      "license": "MIT",
+      "dependencies": {
+        "safe-buffer": "5.2.1"
+      },
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/content-type": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+      "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/cookie": {
+      "version": "0.7.2",
+      "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+      "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/cookie-parser": {
+      "version": "1.4.7",
+      "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz",
+      "integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==",
+      "license": "MIT",
+      "dependencies": {
+        "cookie": "0.7.2",
+        "cookie-signature": "1.0.6"
+      },
+      "engines": {
+        "node": ">= 0.8.0"
+      }
+    },
+    "node_modules/cookie-signature": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+      "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
+      "license": "MIT"
+    },
+    "node_modules/core-util-is": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
+      "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
+      "license": "MIT"
+    },
+    "node_modules/debug": {
+      "version": "2.6.9",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+      "license": "MIT",
+      "dependencies": {
+        "ms": "2.0.0"
+      }
+    },
+    "node_modules/decompress-response": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
+      "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
+      "license": "MIT",
+      "dependencies": {
+        "mimic-response": "^3.1.0"
+      },
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/deep-extend": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+      "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=4.0.0"
+      }
+    },
+    "node_modules/depd": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+      "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/destroy": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+      "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.8",
+        "npm": "1.2.8000 || >= 1.4.16"
+      }
+    },
+    "node_modules/detect-libc": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
+      "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
+      "license": "Apache-2.0",
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/dotenv": {
+      "version": "16.6.1",
+      "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
+      "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
+      "license": "BSD-2-Clause",
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://dotenvx.com"
+      }
+    },
+    "node_modules/dunder-proto": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+      "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+      "license": "MIT",
+      "dependencies": {
+        "call-bind-apply-helpers": "^1.0.1",
+        "es-errors": "^1.3.0",
+        "gopd": "^1.2.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/ee-first": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+      "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+      "license": "MIT"
+    },
+    "node_modules/encodeurl": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+      "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/end-of-stream": {
+      "version": "1.4.5",
+      "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
+      "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",
+      "license": "MIT",
+      "dependencies": {
+        "once": "^1.4.0"
+      }
+    },
+    "node_modules/es-define-property": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+      "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/es-errors": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+      "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/es-object-atoms": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+      "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+      "license": "MIT",
+      "dependencies": {
+        "es-errors": "^1.3.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/escape-html": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+      "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+      "license": "MIT"
+    },
+    "node_modules/etag": {
+      "version": "1.8.1",
+      "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+      "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/expand-template": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
+      "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
+      "license": "(MIT OR WTFPL)",
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/express": {
+      "version": "4.22.2",
+      "resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz",
+      "integrity": "sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==",
+      "license": "MIT",
+      "dependencies": {
+        "accepts": "~1.3.8",
+        "array-flatten": "1.1.1",
+        "body-parser": "~1.20.5",
+        "content-disposition": "~0.5.4",
+        "content-type": "~1.0.4",
+        "cookie": "~0.7.1",
+        "cookie-signature": "~1.0.6",
+        "debug": "2.6.9",
+        "depd": "2.0.0",
+        "encodeurl": "~2.0.0",
+        "escape-html": "~1.0.3",
+        "etag": "~1.8.1",
+        "finalhandler": "~1.3.1",
+        "fresh": "~0.5.2",
+        "http-errors": "~2.0.0",
+        "merge-descriptors": "1.0.3",
+        "methods": "~1.1.2",
+        "on-finished": "~2.4.1",
+        "parseurl": "~1.3.3",
+        "path-to-regexp": "~0.1.12",
+        "proxy-addr": "~2.0.7",
+        "qs": "~6.15.1",
+        "range-parser": "~1.2.1",
+        "safe-buffer": "5.2.1",
+        "send": "~0.19.0",
+        "serve-static": "~1.16.2",
+        "setprototypeof": "1.2.0",
+        "statuses": "~2.0.1",
+        "type-is": "~1.6.18",
+        "utils-merge": "1.0.1",
+        "vary": "~1.1.2"
+      },
+      "engines": {
+        "node": ">= 0.10.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/express"
+      }
+    },
+    "node_modules/express-session": {
+      "version": "1.19.0",
+      "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.19.0.tgz",
+      "integrity": "sha512-0csaMkGq+vaiZTmSMMGkfdCOabYv192VbytFypcvI0MANrp+4i/7yEkJ0sbAEhycQjntaKGzYfjfXQyVb7BHMA==",
+      "license": "MIT",
+      "dependencies": {
+        "cookie": "~0.7.2",
+        "cookie-signature": "~1.0.7",
+        "debug": "~2.6.9",
+        "depd": "~2.0.0",
+        "on-headers": "~1.1.0",
+        "parseurl": "~1.3.3",
+        "safe-buffer": "~5.2.1",
+        "uid-safe": "~2.1.5"
+      },
+      "engines": {
+        "node": ">= 0.8.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/express"
+      }
+    },
+    "node_modules/express-session/node_modules/cookie-signature": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
+      "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
+      "license": "MIT"
+    },
+    "node_modules/file-uri-to-path": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+      "license": "MIT"
+    },
+    "node_modules/finalhandler": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz",
+      "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==",
+      "license": "MIT",
+      "dependencies": {
+        "debug": "2.6.9",
+        "encodeurl": "~2.0.0",
+        "escape-html": "~1.0.3",
+        "on-finished": "~2.4.1",
+        "parseurl": "~1.3.3",
+        "statuses": "~2.0.2",
+        "unpipe": "~1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/forwarded": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+      "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/fresh": {
+      "version": "0.5.2",
+      "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+      "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/fs-constants": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
+      "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
+      "license": "MIT"
+    },
+    "node_modules/function-bind": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+      "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+      "license": "MIT",
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/get-intrinsic": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+      "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+      "license": "MIT",
+      "dependencies": {
+        "call-bind-apply-helpers": "^1.0.2",
+        "es-define-property": "^1.0.1",
+        "es-errors": "^1.3.0",
+        "es-object-atoms": "^1.1.1",
+        "function-bind": "^1.1.2",
+        "get-proto": "^1.0.1",
+        "gopd": "^1.2.0",
+        "has-symbols": "^1.1.0",
+        "hasown": "^2.0.2",
+        "math-intrinsics": "^1.1.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/get-proto": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+      "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+      "license": "MIT",
+      "dependencies": {
+        "dunder-proto": "^1.0.1",
+        "es-object-atoms": "^1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/github-from-package": {
+      "version": "0.0.0",
+      "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
+      "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",
+      "license": "MIT"
+    },
+    "node_modules/gopd": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+      "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/has-symbols": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+      "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/hasown": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz",
+      "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==",
+      "license": "MIT",
+      "dependencies": {
+        "function-bind": "^1.1.2"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/http-errors": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
+      "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
+      "license": "MIT",
+      "dependencies": {
+        "depd": "~2.0.0",
+        "inherits": "~2.0.4",
+        "setprototypeof": "~1.2.0",
+        "statuses": "~2.0.2",
+        "toidentifier": "~1.0.1"
+      },
+      "engines": {
+        "node": ">= 0.8"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/express"
+      }
+    },
+    "node_modules/iconv-lite": {
+      "version": "0.4.24",
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+      "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+      "license": "MIT",
+      "dependencies": {
+        "safer-buffer": ">= 2.1.2 < 3"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/ieee754": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+      "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ],
+      "license": "BSD-3-Clause"
+    },
+    "node_modules/inherits": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+      "license": "ISC"
+    },
+    "node_modules/ini": {
+      "version": "1.3.8",
+      "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+      "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
+      "license": "ISC"
+    },
+    "node_modules/ipaddr.js": {
+      "version": "1.9.1",
+      "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+      "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.10"
+      }
+    },
+    "node_modules/isarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+      "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
+      "license": "MIT"
+    },
+    "node_modules/math-intrinsics": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+      "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/media-typer": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+      "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/merge-descriptors": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
+      "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
+      "license": "MIT",
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/methods": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+      "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/mime": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+      "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+      "license": "MIT",
+      "bin": {
+        "mime": "cli.js"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/mime-db": {
+      "version": "1.52.0",
+      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+      "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/mime-types": {
+      "version": "2.1.35",
+      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+      "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+      "license": "MIT",
+      "dependencies": {
+        "mime-db": "1.52.0"
+      },
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/mimic-response": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
+      "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/minimist": {
+      "version": "1.2.8",
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+      "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+      "license": "MIT",
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/mkdirp": {
+      "version": "0.5.6",
+      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
+      "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+      "license": "MIT",
+      "dependencies": {
+        "minimist": "^1.2.6"
+      },
+      "bin": {
+        "mkdirp": "bin/cmd.js"
+      }
+    },
+    "node_modules/mkdirp-classic": {
+      "version": "0.5.3",
+      "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
+      "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
+      "license": "MIT"
+    },
+    "node_modules/ms": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+      "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+      "license": "MIT"
+    },
+    "node_modules/multer": {
+      "version": "1.4.5-lts.2",
+      "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.2.tgz",
+      "integrity": "sha512-VzGiVigcG9zUAoCNU+xShztrlr1auZOlurXynNvO9GiWD1/mTBbUljOKY+qMeazBqXgRnjzeEgJI/wyjJUHg9A==",
+      "deprecated": "Multer 1.x is impacted by a number of vulnerabilities, which have been patched in 2.x. You should upgrade to the latest 2.x version.",
+      "license": "MIT",
+      "dependencies": {
+        "append-field": "^1.0.0",
+        "busboy": "^1.0.0",
+        "concat-stream": "^1.5.2",
+        "mkdirp": "^0.5.4",
+        "object-assign": "^4.1.1",
+        "type-is": "^1.6.4",
+        "xtend": "^4.0.0"
+      },
+      "engines": {
+        "node": ">= 6.0.0"
+      }
+    },
+    "node_modules/napi-build-utils": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",
+      "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==",
+      "license": "MIT"
+    },
+    "node_modules/negotiator": {
+      "version": "0.6.3",
+      "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+      "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/node-abi": {
+      "version": "3.92.0",
+      "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.92.0.tgz",
+      "integrity": "sha512-KdHvFWZjEKDf0cakgFjebl371GPsISX2oZHcuyKqM7DtogIsHrqKeLTo8wBHxaXRAQlY2PsPlZmfo+9ZCxEREQ==",
+      "license": "MIT",
+      "dependencies": {
+        "semver": "^7.3.5"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
+    "node_modules/node-fetch": {
+      "version": "2.7.0",
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
+      "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+      "license": "MIT",
+      "dependencies": {
+        "whatwg-url": "^5.0.0"
+      },
+      "engines": {
+        "node": "4.x || >=6.0.0"
+      },
+      "peerDependencies": {
+        "encoding": "^0.1.0"
+      },
+      "peerDependenciesMeta": {
+        "encoding": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/object-assign": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+      "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/object-inspect": {
+      "version": "1.13.4",
+      "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
+      "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/on-finished": {
+      "version": "2.4.1",
+      "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+      "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+      "license": "MIT",
+      "dependencies": {
+        "ee-first": "1.1.1"
+      },
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/on-headers": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz",
+      "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/once": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+      "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+      "license": "ISC",
+      "dependencies": {
+        "wrappy": "1"
+      }
+    },
+    "node_modules/parseurl": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+      "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/path-to-regexp": {
+      "version": "0.1.13",
+      "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz",
+      "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==",
+      "license": "MIT"
+    },
+    "node_modules/prebuild-install": {
+      "version": "7.1.3",
+      "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz",
+      "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",
+      "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.",
+      "license": "MIT",
+      "dependencies": {
+        "detect-libc": "^2.0.0",
+        "expand-template": "^2.0.3",
+        "github-from-package": "0.0.0",
+        "minimist": "^1.2.3",
+        "mkdirp-classic": "^0.5.3",
+        "napi-build-utils": "^2.0.0",
+        "node-abi": "^3.3.0",
+        "pump": "^3.0.0",
+        "rc": "^1.2.7",
+        "simple-get": "^4.0.0",
+        "tar-fs": "^2.0.0",
+        "tunnel-agent": "^0.6.0"
+      },
+      "bin": {
+        "prebuild-install": "bin.js"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
+    "node_modules/process-nextick-args": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+      "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+      "license": "MIT"
+    },
+    "node_modules/proxy-addr": {
+      "version": "2.0.7",
+      "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+      "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+      "license": "MIT",
+      "dependencies": {
+        "forwarded": "0.2.0",
+        "ipaddr.js": "1.9.1"
+      },
+      "engines": {
+        "node": ">= 0.10"
+      }
+    },
+    "node_modules/pump": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz",
+      "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==",
+      "license": "MIT",
+      "dependencies": {
+        "end-of-stream": "^1.1.0",
+        "once": "^1.3.1"
+      }
+    },
+    "node_modules/qs": {
+      "version": "6.15.1",
+      "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz",
+      "integrity": "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==",
+      "license": "BSD-3-Clause",
+      "dependencies": {
+        "side-channel": "^1.1.0"
+      },
+      "engines": {
+        "node": ">=0.6"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/random-bytes": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz",
+      "integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/range-parser": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+      "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/raw-body": {
+      "version": "2.5.3",
+      "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz",
+      "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==",
+      "license": "MIT",
+      "dependencies": {
+        "bytes": "~3.1.2",
+        "http-errors": "~2.0.1",
+        "iconv-lite": "~0.4.24",
+        "unpipe": "~1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/rc": {
+      "version": "1.2.8",
+      "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+      "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+      "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
+      "dependencies": {
+        "deep-extend": "^0.6.0",
+        "ini": "~1.3.0",
+        "minimist": "^1.2.0",
+        "strip-json-comments": "~2.0.1"
+      },
+      "bin": {
+        "rc": "cli.js"
+      }
+    },
+    "node_modules/readable-stream": {
+      "version": "2.3.8",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
+      "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
+      "license": "MIT",
+      "dependencies": {
+        "core-util-is": "~1.0.0",
+        "inherits": "~2.0.3",
+        "isarray": "~1.0.0",
+        "process-nextick-args": "~2.0.0",
+        "safe-buffer": "~5.1.1",
+        "string_decoder": "~1.1.1",
+        "util-deprecate": "~1.0.1"
+      }
+    },
+    "node_modules/readable-stream/node_modules/safe-buffer": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+      "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+      "license": "MIT"
+    },
+    "node_modules/safe-buffer": {
+      "version": "5.2.1",
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+      "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ],
+      "license": "MIT"
+    },
+    "node_modules/safer-buffer": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+      "license": "MIT"
+    },
+    "node_modules/semver": {
+      "version": "7.8.0",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz",
+      "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==",
+      "license": "ISC",
+      "bin": {
+        "semver": "bin/semver.js"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
+    "node_modules/send": {
+      "version": "0.19.2",
+      "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz",
+      "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==",
+      "license": "MIT",
+      "dependencies": {
+        "debug": "2.6.9",
+        "depd": "2.0.0",
+        "destroy": "1.2.0",
+        "encodeurl": "~2.0.0",
+        "escape-html": "~1.0.3",
+        "etag": "~1.8.1",
+        "fresh": "~0.5.2",
+        "http-errors": "~2.0.1",
+        "mime": "1.6.0",
+        "ms": "2.1.3",
+        "on-finished": "~2.4.1",
+        "range-parser": "~1.2.1",
+        "statuses": "~2.0.2"
+      },
+      "engines": {
+        "node": ">= 0.8.0"
+      }
+    },
+    "node_modules/send/node_modules/ms": {
+      "version": "2.1.3",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+      "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+      "license": "MIT"
+    },
+    "node_modules/serve-static": {
+      "version": "1.16.3",
+      "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz",
+      "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==",
+      "license": "MIT",
+      "dependencies": {
+        "encodeurl": "~2.0.0",
+        "escape-html": "~1.0.3",
+        "parseurl": "~1.3.3",
+        "send": "~0.19.1"
+      },
+      "engines": {
+        "node": ">= 0.8.0"
+      }
+    },
+    "node_modules/setprototypeof": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+      "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+      "license": "ISC"
+    },
+    "node_modules/side-channel": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
+      "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
+      "license": "MIT",
+      "dependencies": {
+        "es-errors": "^1.3.0",
+        "object-inspect": "^1.13.3",
+        "side-channel-list": "^1.0.0",
+        "side-channel-map": "^1.0.1",
+        "side-channel-weakmap": "^1.0.2"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/side-channel-list": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",
+      "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",
+      "license": "MIT",
+      "dependencies": {
+        "es-errors": "^1.3.0",
+        "object-inspect": "^1.13.4"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/side-channel-map": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
+      "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+      "license": "MIT",
+      "dependencies": {
+        "call-bound": "^1.0.2",
+        "es-errors": "^1.3.0",
+        "get-intrinsic": "^1.2.5",
+        "object-inspect": "^1.13.3"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/side-channel-weakmap": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
+      "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+      "license": "MIT",
+      "dependencies": {
+        "call-bound": "^1.0.2",
+        "es-errors": "^1.3.0",
+        "get-intrinsic": "^1.2.5",
+        "object-inspect": "^1.13.3",
+        "side-channel-map": "^1.0.1"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/simple-concat": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
+      "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ],
+      "license": "MIT"
+    },
+    "node_modules/simple-get": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
+      "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "decompress-response": "^6.0.0",
+        "once": "^1.3.1",
+        "simple-concat": "^1.0.0"
+      }
+    },
+    "node_modules/statuses": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
+      "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/streamsearch": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
+      "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
+      "engines": {
+        "node": ">=10.0.0"
+      }
+    },
+    "node_modules/string_decoder": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+      "license": "MIT",
+      "dependencies": {
+        "safe-buffer": "~5.1.0"
+      }
+    },
+    "node_modules/string_decoder/node_modules/safe-buffer": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+      "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+      "license": "MIT"
+    },
+    "node_modules/strip-json-comments": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+      "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/tar-fs": {
+      "version": "2.1.4",
+      "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz",
+      "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==",
+      "license": "MIT",
+      "dependencies": {
+        "chownr": "^1.1.1",
+        "mkdirp-classic": "^0.5.2",
+        "pump": "^3.0.0",
+        "tar-stream": "^2.1.4"
+      }
+    },
+    "node_modules/tar-stream": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
+      "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
+      "license": "MIT",
+      "dependencies": {
+        "bl": "^4.0.3",
+        "end-of-stream": "^1.4.1",
+        "fs-constants": "^1.0.0",
+        "inherits": "^2.0.3",
+        "readable-stream": "^3.1.1"
+      },
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/tar-stream/node_modules/readable-stream": {
+      "version": "3.6.2",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+      "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+      "license": "MIT",
+      "dependencies": {
+        "inherits": "^2.0.3",
+        "string_decoder": "^1.1.1",
+        "util-deprecate": "^1.0.1"
+      },
+      "engines": {
+        "node": ">= 6"
+      }
+    },
+    "node_modules/toidentifier": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+      "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.6"
+      }
+    },
+    "node_modules/tr46": {
+      "version": "0.0.3",
+      "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+      "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
+      "license": "MIT"
+    },
+    "node_modules/tunnel-agent": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+      "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
+      "license": "Apache-2.0",
+      "dependencies": {
+        "safe-buffer": "^5.0.1"
+      },
+      "engines": {
+        "node": "*"
+      }
+    },
+    "node_modules/type-is": {
+      "version": "1.6.18",
+      "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+      "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+      "license": "MIT",
+      "dependencies": {
+        "media-typer": "0.3.0",
+        "mime-types": "~2.1.24"
+      },
+      "engines": {
+        "node": ">= 0.6"
+      }
+    },
+    "node_modules/typedarray": {
+      "version": "0.0.6",
+      "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+      "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
+      "license": "MIT"
+    },
+    "node_modules/uid-safe": {
+      "version": "2.1.5",
+      "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
+      "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==",
+      "license": "MIT",
+      "dependencies": {
+        "random-bytes": "~1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/unpipe": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+      "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/util-deprecate": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+      "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+      "license": "MIT"
+    },
+    "node_modules/utils-merge": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+      "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4.0"
+      }
+    },
+    "node_modules/vary": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+      "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
+    "node_modules/webidl-conversions": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+      "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
+      "license": "BSD-2-Clause"
+    },
+    "node_modules/whatwg-url": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+      "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+      "license": "MIT",
+      "dependencies": {
+        "tr46": "~0.0.3",
+        "webidl-conversions": "^3.0.0"
+      }
+    },
+    "node_modules/wrappy": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+      "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+      "license": "ISC"
+    },
+    "node_modules/xtend": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+      "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.4"
+      }
+    }
+  }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..03ef25c
--- /dev/null
+++ b/package.json
@@ -0,0 +1,19 @@
+{
+  "name": "whatsmystyle",
+  "version": "0.1.0",
+  "description": "AI personal-stylist that learns your taste like an optometrist — better A or B? — by mining receipts, photos, gmail, social, and surveying your actual closet.",
+  "main": "server.js",
+  "scripts": {
+    "start": "node server.js",
+    "dev": "node server.js"
+  },
+  "dependencies": {
+    "express": "^4.19.2",
+    "express-session": "^1.18.0",
+    "cookie-parser": "^1.4.6",
+    "better-sqlite3": "^11.3.0",
+    "multer": "^1.4.5-lts.1",
+    "node-fetch": "^2.7.0",
+    "dotenv": "^16.4.5"
+  }
+}
diff --git a/public/css/app.css b/public/css/app.css
new file mode 100644
index 0000000..9243aac
--- /dev/null
+++ b/public/css/app.css
@@ -0,0 +1,139 @@
+/* WhatsMyStyle — large-pill, optometrist-inspired UI
+   Design notes:
+   - High-contrast, generous touch targets (every pill ≥ 56px tall)
+   - One question / one decision per screen
+   - Cards float — no boxes-in-boxes
+*/
+:root {
+  --ink: #0b0b0c;
+  --ink-2: #2a2a2e;
+  --paper: #fafaf7;
+  --paper-2: #f1efea;
+  --accent: #c0392b;
+  --accent-2: #e3725b;
+  --ok: #1e6f4b;
+  --line: rgba(0,0,0,.08);
+  --shadow: 0 8px 24px rgba(0,0,0,.08);
+  --radius: 22px;
+  --max: 1180px;
+  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
+  --font-body: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Text', Helvetica, Arial, sans-serif;
+}
+* { box-sizing: border-box; }
+html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
+button { font: inherit; cursor: pointer; }
+a { color: inherit; }
+
+/* topbar */
+.topbar {
+  position: sticky; top: 0; z-index: 50;
+  display: flex; align-items: center; justify-content: space-between;
+  padding: 16px 24px;
+  background: var(--paper); border-bottom: 1px solid var(--line);
+}
+.logo {
+  font-family: var(--font-display); font-weight: 600; font-size: 22px;
+  background: none; border: 0; padding: 0; color: var(--ink);
+  letter-spacing: .5px;
+}
+.logo .bullet { margin: 0 6px; color: var(--accent); }
+.logo em { font-style: italic; font-weight: 400; opacity: .55; font-size: 14px; }
+.hamburger {
+  width: 44px; height: 44px; display: inline-flex; flex-direction: column;
+  align-items: center; justify-content: center; gap: 4px;
+  background: transparent; border: 1px solid var(--line); border-radius: 12px;
+}
+.hamburger span { display: block; width: 18px; height: 2px; background: var(--ink); }
+
+.menu {
+  position: fixed; top: 64px; right: 16px; z-index: 49;
+  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
+  display: flex; flex-direction: column; min-width: 220px; box-shadow: var(--shadow);
+  overflow: hidden;
+}
+.menu a { padding: 14px 18px; text-decoration: none; border-bottom: 1px solid var(--line); }
+.menu a:last-child { border-bottom: 0; }
+.menu a:hover { background: var(--paper-2); }
+
+/* screens */
+main { max-width: var(--max); margin: 0 auto; padding: 28px 22px 80px; }
+.screen { animation: fade .25s ease-out; }
+@keyframes fade { from { opacity: 0; transform: translateY(4px) } to { opacity: 1; transform: none } }
+
+h2 { font-family: var(--font-display); font-weight: 600; font-size: 36px; margin: 16px 0 8px; letter-spacing: .3px; }
+.muted { color: #777; }
+
+/* onboarding */
+.progress { height: 4px; background: var(--paper-2); border-radius: 8px; margin-bottom: 24px; overflow: hidden; }
+.bar { height: 100%; background: var(--accent); width: 0%; transition: width .35s ease; }
+#onb-q { font-family: var(--font-display); font-size: clamp(28px, 5vw, 48px); line-height: 1.15; margin: 22px 0 30px; }
+.pills { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
+.pill {
+  background: var(--paper);
+  border: 1.5px solid var(--ink); color: var(--ink);
+  padding: 22px 26px; border-radius: 999px;
+  font-size: 18px; font-weight: 500;
+  text-align: left;
+  transition: transform .12s ease, background .12s, color .12s;
+  min-height: 64px;
+}
+.pill:hover, .pill:focus-visible { background: var(--ink); color: var(--paper); transform: translateY(-1px); outline: 0; }
+.pill.illus { display: flex; align-items: center; gap: 14px; }
+.pill .swatch { width: 28px; height: 28px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
+.onb-foot { display: flex; justify-content: space-between; margin-top: 36px; gap: 12px; }
+.ghost { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 12px 22px; color: var(--ink-2); }
+.ghost.wide { width: 100%; padding: 18px; font-size: 16px; }
+
+/* duel */
+.duel-question { font-family: var(--font-display); font-size: clamp(26px, 4vw, 40px); text-align: center; margin: 12px 0 24px; }
+.duel { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; }
+.card {
+  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
+  padding: 0; overflow: hidden; text-align: left; position: relative;
+  transition: transform .15s, box-shadow .15s, border-color .15s;
+  display: flex; flex-direction: column;
+}
+.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--ink); }
+.card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: var(--paper-2); }
+.card .meta { padding: 16px 18px 20px; }
+.card .title { font-weight: 600; }
+.card .brand { color: #777; font-size: 14px; margin-top: 4px; }
+.card .price { margin-top: 8px; font-variant-numeric: tabular-nums; }
+.pick-tag {
+  position: absolute; top: 12px; left: 12px;
+  width: 36px; height: 36px; border-radius: 999px;
+  background: var(--ink); color: var(--paper);
+  display: grid; place-items: center; font-weight: 700;
+}
+.vs { display: grid; place-items: center; font-family: var(--font-display); font-size: 28px; opacity: .5; }
+.duel-actions { margin: 18px 0; }
+.taste-meter { display: flex; align-items: center; gap: 12px; margin-top: 16px; color: #777; font-size: 14px; }
+.taste-meter .meter { flex: 1; height: 6px; background: var(--paper-2); border-radius: 6px; overflow: hidden; }
+.taste-meter .meter-fill { height: 100%; background: var(--ok); width: 0%; transition: width .4s ease; }
+
+@media (max-width: 760px) {
+  .duel { grid-template-columns: 1fr; }
+  .vs { padding: 4px 0; }
+}
+
+/* recommendations grid */
+.grid-controls { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
+.grid-controls label { display: inline-flex; gap: 8px; align-items: center; color: #555; font-size: 14px; }
+.grid-controls select, .grid-controls input { font: inherit; }
+.recs-controls { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; }
+.grid { display: grid; gap: 14px; margin-top: 16px; grid-template-columns: repeat(auto-fill, minmax(var(--card-min, 220px), 1fr)); }
+.grid .card img { aspect-ratio: 3/4; }
+
+/* connections */
+.connect-list { display: grid; gap: 12px; margin: 18px 0; }
+.conn {
+  text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
+  padding: 18px 20px; cursor: pointer;
+  transition: border-color .15s, background .15s;
+}
+.conn:hover { border-color: var(--ink); background: var(--paper-2); }
+.conn strong { display: block; font-size: 17px; }
+.conn small { color: #777; }
+
+/* utils */
+[hidden] { display: none !important; }
diff --git a/public/index.html b/public/index.html
new file mode 100644
index 0000000..a7d921b
--- /dev/null
+++ b/public/index.html
@@ -0,0 +1,148 @@
+<!doctype html>
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
+<title>WhatsMyStyle — Better A or B?</title>
+<meta name="description" content="The optometrist for your closet. Show me two outfits, I'll tell you what's you.">
+<link rel="stylesheet" href="/css/app.css">
+</head>
+<body>
+<header class="topbar">
+  <button class="logo" aria-label="Home">WhatsMyStyle<span class="bullet">·</span><em>placeholder</em></button>
+  <button class="hamburger" aria-label="Menu" onclick="toggleMenu()">
+    <span></span><span></span><span></span>
+  </button>
+</header>
+
+<nav id="menu" class="menu" hidden>
+  <a href="#" data-screen="home">Duel</a>
+  <a href="#" data-screen="closet">My Closet</a>
+  <a href="#" data-screen="recs">For You</a>
+  <a href="#" data-screen="stores">Stores Near Me</a>
+  <a href="#" data-screen="connect">Connections</a>
+  <a href="#" data-screen="onboard">Re-onboard</a>
+</nav>
+
+<main id="app">
+
+  <!-- Onboarding (one question, large pills) -->
+  <section id="onboard" class="screen" hidden>
+    <div class="progress"><div class="bar" id="onb-bar"></div></div>
+    <div id="onb-q"></div>
+    <div class="pills" id="onb-pills"></div>
+    <div class="onb-foot">
+      <button class="ghost" onclick="onbBack()">← Back</button>
+      <button class="ghost" onclick="onbSkip()">Skip</button>
+    </div>
+  </section>
+
+  <!-- Duel (the optometrist loop) -->
+  <section id="home" class="screen" hidden>
+    <div class="duel-question" id="duel-q">Loading your duel…</div>
+    <div class="duel">
+      <button class="card" data-pick="A" onclick="pickDuel('A')">
+        <img id="img-a" alt="">
+        <div class="meta">
+          <div class="title" id="t-a"></div>
+          <div class="brand" id="b-a"></div>
+          <div class="price" id="p-a"></div>
+        </div>
+        <div class="pick-tag">A</div>
+      </button>
+      <div class="vs">vs</div>
+      <button class="card" data-pick="B" onclick="pickDuel('B')">
+        <img id="img-b" alt="">
+        <div class="meta">
+          <div class="title" id="t-b"></div>
+          <div class="brand" id="b-b"></div>
+          <div class="price" id="p-b"></div>
+        </div>
+        <div class="pick-tag">B</div>
+      </button>
+    </div>
+    <div class="duel-actions">
+      <button class="ghost wide" onclick="pickDuel('skip')">Neither — show me something else</button>
+    </div>
+    <div class="taste-meter">
+      <span>Taste lens sharpening:</span>
+      <div class="meter"><div class="meter-fill" id="taste-fill"></div></div>
+      <span id="taste-pct">0%</span>
+    </div>
+  </section>
+
+  <!-- Closet -->
+  <section id="closet" class="screen" hidden>
+    <h2>My Closet</h2>
+    <p class="muted">Upload a photo of your closet — we'll catalogue each piece automatically.</p>
+    <form id="closet-form">
+      <input type="file" name="photo" accept="image/*" capture="environment">
+      <button type="submit">Upload</button>
+    </form>
+    <div id="closet-grid" class="grid"></div>
+  </section>
+
+  <!-- Recommendations -->
+  <section id="recs" class="screen" hidden>
+    <div class="recs-controls">
+      <h2>For You</h2>
+      <div class="grid-controls">
+        <label>Sort
+          <select id="sort">
+            <option value="taste">Best Match</option>
+            <option value="price_asc">Price ↑</option>
+            <option value="price_desc">Price ↓</option>
+            <option value="brand">Brand A–Z</option>
+            <option value="title">Title A–Z</option>
+          </select>
+        </label>
+        <label>Density
+          <input id="density" type="range" min="120" max="320" value="220">
+        </label>
+      </div>
+    </div>
+    <div id="recs-grid" class="grid"></div>
+  </section>
+
+  <!-- Stores -->
+  <section id="stores" class="screen" hidden>
+    <h2>Stores Near Me</h2>
+    <p class="muted">Turn on location to see real stores carrying brands you've liked.</p>
+    <button onclick="requestLocation()">Enable location</button>
+    <div id="stores-list"></div>
+  </section>
+
+  <!-- Connections -->
+  <section id="connect" class="screen" hidden>
+    <h2>Let me see…</h2>
+    <p class="muted">Each one is OPT-IN. Skip any of them — the optometrist loop alone works fine.</p>
+    <div class="connect-list">
+      <button class="conn" data-kind="stripe_fc">
+        <strong>Your bank receipts</strong>
+        <small>Stripe Financial Connections — read-only. We match clothing purchases.</small>
+      </button>
+      <button class="conn" data-kind="gmail">
+        <strong>Gmail order confirmations</strong>
+        <small>Read-only. We parse shipping confirmations from Nordstrom, Net-a-Porter, etc.</small>
+      </button>
+      <button class="conn" data-kind="camera_roll">
+        <strong>Camera roll</strong>
+        <small>Only the albums you pick. We see what you actually wear.</small>
+      </button>
+      <button class="conn" data-kind="social">
+        <strong>Social photos</strong>
+        <small>You upload them manually. We never scrape.</small>
+      </button>
+      <button class="conn" data-kind="location">
+        <strong>Location</strong>
+        <small>Used for Stores Near Me only — never sold, never stored long-term.</small>
+      </button>
+    </div>
+    <div id="connect-state" class="muted"></div>
+  </section>
+
+</main>
+
+<script src="/js/app.js"></script>
+</body>
+</html>
diff --git a/public/js/app.js b/public/js/app.js
new file mode 100644
index 0000000..ac1498a
--- /dev/null
+++ b/public/js/app.js
@@ -0,0 +1,309 @@
+// WhatsMyStyle frontend
+// Single-page app with large-pill onboarding + optometrist duel loop.
+
+const $  = (sel, root = document) => root.querySelector(sel);
+const $$ = (sel, root = document) => Array.from(root.querySelectorAll(sel));
+
+function show(id) {
+  $$('.screen').forEach(s => s.hidden = true);
+  const el = document.getElementById(id);
+  if (el) el.hidden = false;
+}
+function toggleMenu() {
+  const m = $('#menu');
+  m.hidden = !m.hidden;
+}
+$$('.menu a').forEach(a => a.addEventListener('click', e => {
+  e.preventDefault();
+  const id = a.dataset.screen;
+  $('#menu').hidden = true;
+  route(id);
+}));
+
+// ---------- Onboarding -----------------------------------------------------
+const onbQuestions = [
+  { key: 'shopping_for', q: 'Who are you shopping for?',
+    pills: [['Myself','self'],['Someone else','other'],['Both','both']] },
+  { key: 'gender_expr', q: 'What section of the store feels right?',
+    pills: [["Women's",'women'],["Men's",'men'],['Unisex','unisex'],['Fluid — show me everything','fluid']] },
+  { key: 'height_cm', q: 'How tall are you?', kind: 'slider',
+    min: 140, max: 210, default: 170, unit: 'cm' },
+  { key: 'body_shape', q: 'Which silhouette feels closest?',
+    pills: [
+      ['Rectangle','rectangle'],['Hourglass','hourglass'],['Pear','pear'],
+      ['Apple','apple'],['Inverted triangle','inv-triangle'],['Athletic','athletic'],
+      ['Skip — I find this question annoying','skip']
+    ]},
+  { key: 'hair', q: 'Your hair, right now?',
+    pills: [
+      ['Black, short','black-short'],['Black, long','black-long'],
+      ['Brown, short','brown-short'],['Brown, long','brown-long'],
+      ['Blonde, short','blonde-short'],['Blonde, long','blonde-long'],
+      ['Red','red'],['Gray / silver','gray'],
+      ['Shaved / very short','shaved'],['Other','other'],
+    ]},
+  { key: 'age_band', q: 'Age band — for fit + cut only, never displayed.',
+    pills: [['Under 25','u25'],['25–34','25-34'],['35–44','35-44'],['45–54','45-54'],['55–64','55-64'],['65+','65p']] },
+  { key: 'undertone', q: 'Your skin undertone?',
+    pills: [
+      ['Warm — gold jewelry suits me','warm'],
+      ['Cool — silver jewelry suits me','cool'],
+      ['Neutral — both work','neutral'],
+      ['No idea — show me both','unknown'],
+    ]},
+  { key: 'city', q: 'Where are you shopping from?', kind: 'city' },
+  { key: 'budget_band', q: 'Comfortable price per piece?',
+    pills: [
+      ['Under $20','u20'],['$20–50','20-50'],['$50–150','50-150'],
+      ['$150–500','150-500'],['$500–1500','500-1500'],['$1500+','1500p'],
+      ['No cap','nocap'],
+    ]},
+  { key: 'sustainability', q: 'How much should sustainability matter?',
+    pills: [['Top priority','top'],['Nice to have','nice'],["Doesn't matter to me",'no']] },
+  { key: '_connect', q: 'Want me to learn faster? (You can skip any of these.)', kind: 'connect' },
+];
+let onbI = 0;
+const onbAnswers = {};
+
+function onbRender() {
+  const total = onbQuestions.length;
+  $('#onb-bar').style.width = `${Math.round((onbI / total) * 100)}%`;
+  const q = onbQuestions[onbI];
+  if (!q) return finishOnboarding();
+  $('#onb-q').textContent = q.q;
+  const pills = $('#onb-pills');
+  pills.innerHTML = '';
+  if (q.pills) {
+    q.pills.forEach(([label, val]) => {
+      const b = document.createElement('button');
+      b.className = 'pill';
+      b.textContent = label;
+      b.onclick = () => { onbAnswers[q.key] = val; onbNext(); };
+      pills.appendChild(b);
+    });
+  } else if (q.kind === 'slider') {
+    const wrap = document.createElement('div');
+    wrap.style.cssText = 'display:flex;gap:14px;align-items:center;width:100%;';
+    const out = document.createElement('div');
+    out.style.cssText = 'font-family: var(--font-display); font-size:42px; min-width:120px;';
+    const r = document.createElement('input');
+    r.type = 'range'; r.min = q.min; r.max = q.max; r.value = q.default;
+    r.style.cssText = 'flex:1;height:6px;';
+    out.textContent = `${q.default} ${q.unit}`;
+    r.oninput = () => { out.textContent = `${r.value} ${q.unit}`; };
+    const ok = document.createElement('button');
+    ok.className = 'pill'; ok.textContent = "That's me →";
+    ok.onclick = () => { onbAnswers[q.key] = Number(r.value); onbNext(); };
+    wrap.append(out, r);
+    pills.append(wrap, ok);
+  } else if (q.kind === 'city') {
+    const wrap = document.createElement('div');
+    wrap.style.cssText = 'display:flex;gap:10px;flex-direction:column;width:100%;';
+    const inp = document.createElement('input');
+    inp.placeholder = 'City, State';
+    inp.style.cssText = 'padding:18px;border:1.5px solid var(--ink);border-radius:14px;font-size:18px;';
+    const auto = document.createElement('button');
+    auto.className = 'pill';
+    auto.textContent = '📍 Use my location';
+    auto.onclick = () => {
+      navigator.geolocation?.getCurrentPosition(p => {
+        onbAnswers.lat = p.coords.latitude;
+        onbAnswers.lng = p.coords.longitude;
+        inp.value = `(${p.coords.latitude.toFixed(2)}, ${p.coords.longitude.toFixed(2)})`;
+      }, () => alert('Location denied. You can type a city instead.'));
+    };
+    const ok = document.createElement('button');
+    ok.className = 'pill';
+    ok.textContent = 'Continue →';
+    ok.onclick = () => { onbAnswers.city = inp.value || null; onbNext(); };
+    wrap.append(auto, inp, ok);
+    pills.append(wrap);
+  } else if (q.kind === 'connect') {
+    const kinds = [
+      ['Stripe — bank receipts (read-only)', 'stripe_fc'],
+      ['Gmail — order confirmations (read-only)', 'gmail'],
+      ['Camera roll — selected albums only', 'camera_roll'],
+      ['Social photos — manual upload', 'social'],
+      ['Location — for Stores Near Me', 'location'],
+    ];
+    kinds.forEach(([label, kind]) => {
+      const b = document.createElement('button');
+      b.className = 'pill illus';
+      b.innerHTML = `<span class="swatch" style="background:linear-gradient(135deg,#c0392b,#e3725b)"></span>${label}`;
+      b.onclick = async () => {
+        b.textContent = '✓ ' + label;
+        b.disabled = true;
+        await fetch(`/api/connect/${kind}`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: '{}' });
+      };
+      pills.appendChild(b);
+    });
+    const done = document.createElement('button');
+    done.className = 'pill';
+    done.textContent = "I'm done — show me the duels →";
+    done.onclick = () => onbNext();
+    pills.appendChild(done);
+  }
+}
+
+function onbNext() { onbI++; onbRender(); }
+function onbBack() { if (onbI > 0) { onbI--; onbRender(); } }
+function onbSkip() { onbNext(); }
+
+async function finishOnboarding() {
+  // map onbAnswers → user fields
+  const payload = {
+    gender_expr: onbAnswers.gender_expr,
+    age_band: onbAnswers.age_band,
+    height_cm: onbAnswers.height_cm,
+    body_shape: onbAnswers.body_shape,
+    hair: onbAnswers.hair,
+    undertone: onbAnswers.undertone,
+    city: onbAnswers.city,
+    lat: onbAnswers.lat,
+    lng: onbAnswers.lng,
+    budget_band: onbAnswers.budget_band,
+    sustainability: onbAnswers.sustainability,
+  };
+  await fetch('/api/onboard', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(payload) });
+  route('home');
+}
+
+// ---------- Duel -----------------------------------------------------------
+let currentDuel = null;
+let duelsAnswered = 0;
+
+async function loadDuel() {
+  const r = await fetch('/api/duel');
+  const j = await r.json();
+  if (j.need_seed || !j.a) {
+    $('#duel-q').innerHTML = 'No catalog yet — <a href="#" onclick="seedCatalog()">tap to seed sample items</a>.';
+    return;
+  }
+  currentDuel = j;
+  $('#duel-q').textContent = j.question;
+  paintCard('a', j.a);
+  paintCard('b', j.b);
+}
+
+function paintCard(side, item) {
+  const img = $(`#img-${side}`);
+  img.src = item.image_url || `/img/placeholder-${item.category || 'top'}.svg`;
+  img.alt = item.title;
+  $(`#t-${side}`).textContent = item.title;
+  $(`#b-${side}`).textContent = item.brand || '';
+  $(`#p-${side}`).textContent = item.price_cents ? `$${(item.price_cents/100).toFixed(0)}` : '';
+}
+
+async function pickDuel(choice) {
+  if (!currentDuel) return;
+  await fetch('/api/duel', {
+    method: 'POST',
+    headers: { 'content-type': 'application/json' },
+    body: JSON.stringify({ duel_id: currentDuel.duel_id, picked: choice })
+  });
+  duelsAnswered++;
+  const pct = Math.min(100, Math.round((duelsAnswered / 30) * 100));
+  $('#taste-fill').style.width = pct + '%';
+  $('#taste-pct').textContent = pct + '%';
+  loadDuel();
+}
+
+window.addEventListener('keydown', e => {
+  if ($('#home').hidden) return;
+  if (e.key === 'ArrowLeft' || e.key.toLowerCase() === 'a') pickDuel('A');
+  if (e.key === 'ArrowRight' || e.key.toLowerCase() === 'b') pickDuel('B');
+  if (e.key === ' ' || e.key.toLowerCase() === 's') { e.preventDefault(); pickDuel('skip'); }
+});
+
+async function seedCatalog() {
+  $('#duel-q').textContent = 'Seeding sample catalog…';
+  await fetch('/api/admin/seed', { method: 'POST' }).catch(() => {});
+  loadDuel();
+}
+
+// ---------- Closet ---------------------------------------------------------
+$('#closet-form').addEventListener('submit', async e => {
+  e.preventDefault();
+  const fd = new FormData(e.target);
+  const r = await fetch('/api/closet/photo', { method: 'POST', body: fd });
+  if (r.ok) loadCloset();
+});
+async function loadCloset() {
+  const r = await fetch('/api/closet').then(r => r.json());
+  const g = $('#closet-grid');
+  g.innerHTML = '';
+  (r.items || []).forEach(it => {
+    const c = document.createElement('div');
+    c.className = 'card';
+    c.innerHTML = `<img src="/api/closet/photo/${it.id}" alt=""><div class="meta"><div class="title">${it.category || 'analyzing…'}</div><div class="brand">${it.color || ''}</div></div>`;
+    g.appendChild(c);
+  });
+}
+
+// ---------- Recommendations -----------------------------------------------
+async function loadRecs() {
+  const sort = localStorage.getItem('wms.sort') || 'taste';
+  const minPx = localStorage.getItem('wms.density') || 220;
+  $('#sort').value = sort;
+  $('#density').value = minPx;
+  const r = await fetch('/api/recommend?limit=60').then(r => r.json());
+  let items = r.items || [];
+  if (sort === 'price_asc') items.sort((a, b) => (a.price_cents || 0) - (b.price_cents || 0));
+  else if (sort === 'price_desc') items.sort((a, b) => (b.price_cents || 0) - (a.price_cents || 0));
+  else if (sort === 'brand') items.sort((a, b) => (a.brand || '').localeCompare(b.brand || ''));
+  else if (sort === 'title') items.sort((a, b) => (a.title || '').localeCompare(b.title || ''));
+  const g = $('#recs-grid');
+  g.style.setProperty('--card-min', minPx + 'px');
+  g.innerHTML = '';
+  items.forEach(it => {
+    const a = document.createElement('a');
+    a.className = 'card';
+    a.href = it.product_url || '#';
+    a.target = '_blank';
+    a.rel = 'noopener';
+    a.innerHTML = `<img src="${it.image_url || ''}" alt=""><div class="meta"><div class="title">${it.title}</div><div class="brand">${it.brand || ''}</div><div class="price">${it.price_cents ? '$' + (it.price_cents/100).toFixed(0) : ''}</div></div>`;
+    g.appendChild(a);
+  });
+}
+$('#sort').addEventListener('change', e => { localStorage.setItem('wms.sort', e.target.value); loadRecs(); });
+$('#density').addEventListener('input', e => { localStorage.setItem('wms.density', e.target.value); loadRecs(); });
+
+// ---------- Stores ---------------------------------------------------------
+async function requestLocation() {
+  navigator.geolocation?.getCurrentPosition(async p => {
+    const r = await fetch(`/api/stores?lat=${p.coords.latitude}&lng=${p.coords.longitude}`).then(r => r.json()).catch(() => ({stores: []}));
+    const list = $('#stores-list');
+    list.innerHTML = '';
+    (r.stores || []).forEach(s => {
+      const d = document.createElement('div');
+      d.className = 'conn';
+      d.innerHTML = `<strong>${s.name}</strong><small>${s.address || ''} · ${s.distance_mi?.toFixed?.(1) || ''}mi</small>`;
+      list.appendChild(d);
+    });
+    if (!r.stores?.length) list.innerHTML = '<p class="muted">No stores indexed yet — like a few brands first.</p>';
+  }, () => alert('Location denied.'));
+}
+
+// ---------- Connections ---------------------------------------------------
+$$('.conn').forEach(b => b.addEventListener('click', async () => {
+  const kind = b.dataset.kind;
+  await fetch(`/api/connect/${kind}`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: '{}' });
+  const cs = await fetch('/api/connect').then(r => r.json());
+  $('#connect-state').textContent = JSON.stringify(cs.connections, null, 2);
+}));
+
+// ---------- Router ---------------------------------------------------------
+function route(name) {
+  show(name);
+  if (name === 'home') loadDuel();
+  if (name === 'closet') loadCloset();
+  if (name === 'recs') loadRecs();
+  if (name === 'connect') fetch('/api/connect').then(r => r.json()).then(c => $('#connect-state').textContent = JSON.stringify(c.connections, null, 2));
+}
+
+// ---------- Boot -----------------------------------------------------------
+(async function boot() {
+  const me = await fetch('/api/me').then(r => r.json());
+  if (!me.onboarded) { show('onboard'); onbRender(); }
+  else route('home');
+})();
diff --git a/scripts/closet-vision.js b/scripts/closet-vision.js
new file mode 100644
index 0000000..323ecd5
--- /dev/null
+++ b/scripts/closet-vision.js
@@ -0,0 +1,68 @@
+/**
+ * Closet vision worker — scans data/closet for un-parsed photos and pipes
+ * each to Ollama llava:13b to extract garment bounding boxes + category +
+ * color guesses. Updates the closet row in-place.
+ *
+ * Run on demand:  node scripts/closet-vision.js
+ * Or via launchd every 5 min (added in a later tick).
+ */
+const Database = require('better-sqlite3');
+const path = require('path');
+const fs = require('fs');
+const fetch = require('node-fetch');
+
+const OLLAMA = process.env.OLLAMA_URL || 'http://127.0.0.1:11434';
+const MODEL  = process.env.OLLAMA_VISION_MODEL || 'llava:13b';
+
+async function visionDescribe(imagePath) {
+  const buf = fs.readFileSync(imagePath);
+  const b64 = buf.toString('base64');
+  const prompt = `You see a photograph of a closet, a single garment, or an outfit.
+Return STRICT JSON only with this shape:
+{"items":[{"category":"top|bottom|dress|outerwear|shoes|bag|accessory","color":"...","pattern":"solid|stripe|floral|plaid|...","material_guess":"cotton|silk|wool|denim|leather|other","vendor_guess":"unknown|<brand>","bbox":{"x":0,"y":0,"w":1,"h":1}}]}
+If you see ONE garment, return one item. If you see a closet, return up to 12 items.
+No prose. JSON only.`;
+  const r = await fetch(`${OLLAMA}/api/generate`, {
+    method: 'POST',
+    headers: { 'content-type': 'application/json' },
+    body: JSON.stringify({ model: MODEL, prompt, images: [b64], stream: false, options: { temperature: 0.2 } }),
+  });
+  const j = await r.json();
+  const raw = j.response || '';
+  const m = raw.match(/\{[\s\S]*\}/);
+  if (!m) return { items: [] };
+  try { return JSON.parse(m[0]); } catch { return { items: [], _raw: raw }; }
+}
+
+async function processOne(db, row) {
+  if (!row.photo_path || !fs.existsSync(row.photo_path)) return;
+  console.log(`[vision] ${row.id} ${row.photo_path}`);
+  const out = await visionDescribe(row.photo_path);
+  const items = (out.items || []).slice(0, 12);
+  if (!items.length) return;
+  // Update the parent row with first item's broad attrs
+  const first = items[0];
+  db.prepare(`UPDATE closet SET category=?, color=?, pattern=?, material_guess=?, vendor_guess=?, bbox=?, source_meta=? WHERE id=?`)
+    .run(first.category, first.color, first.pattern, first.material_guess, first.vendor_guess,
+         JSON.stringify(first.bbox || {}), JSON.stringify({ count: items.length }), row.id);
+  // Append additional items as new closet rows linked to same photo
+  const ins = db.prepare(`INSERT INTO closet (user_id, photo_path, category, color, pattern, material_guess, vendor_guess, bbox, acquired_via, source_meta)
+    VALUES (?, ?, ?, ?, ?, ?, ?, ?, 'photo', ?)`);
+  for (let i = 1; i < items.length; i++) {
+    const it = items[i];
+    ins.run(row.user_id, row.photo_path, it.category, it.color, it.pattern, it.material_guess, it.vendor_guess,
+            JSON.stringify(it.bbox || {}), JSON.stringify({ from_photo: row.id, idx: i }));
+  }
+}
+
+async function main() {
+  const dbPath = path.join(__dirname, '..', 'data', 'whatsmystyle.db');
+  const db = new Database(dbPath);
+  const rows = db.prepare(`SELECT * FROM closet WHERE category IS NULL AND photo_path IS NOT NULL LIMIT 25`).all();
+  console.log(`[vision] ${rows.length} pending`);
+  for (const r of rows) {
+    try { await processOne(db, r); } catch (e) { console.error('[vision] err', r.id, e.message); }
+  }
+}
+
+if (require.main === module) main().catch(e => { console.error(e); process.exit(1); });
diff --git a/scripts/debate.js b/scripts/debate.js
new file mode 100644
index 0000000..6616d35
--- /dev/null
+++ b/scripts/debate.js
@@ -0,0 +1,86 @@
+/**
+ * Dream-team debate harness — wraps the local Ollama panel for design decisions.
+ *
+ * Usage:
+ *   node scripts/debate.js "topic" "context blob"
+ *
+ * Fires three local LLMs (qwen3:14b, deepseek-r1:14b, phi4:14b) and asks each
+ * to defend a position, then writes the panel + a synthesized verdict to the
+ * SQLite `debates` table.
+ *
+ * Why local-only: Steve's yolo-overnight rule forbids metered LLM cost.
+ * The CCK / claude-codex relays are reserved for the morning review.
+ */
+const Database = require('better-sqlite3');
+const path = require('path');
+const fetch = require('node-fetch');
+
+const OLLAMA = process.env.OLLAMA_URL || 'http://127.0.0.1:11434';
+const PANEL = [
+  { role: 'DEFENDER',  model: process.env.PANEL_DEFENDER  || 'qwen3:14b' },
+  { role: 'PROSECUTOR',model: process.env.PANEL_PROSECUTOR|| 'deepseek-r1:14b' },
+  { role: 'PRAGMATIST',model: process.env.PANEL_PRAGMATIST|| 'phi4:14b' },
+];
+
+async function ask(model, system, user) {
+  try {
+    const r = await fetch(`${OLLAMA}/api/chat`, {
+      method: 'POST',
+      headers: { 'content-type': 'application/json' },
+      body: JSON.stringify({
+        model,
+        stream: false,
+        messages: [
+          { role: 'system', content: system },
+          { role: 'user', content: user },
+        ],
+        options: { temperature: 0.6 },
+      }),
+    });
+    if (!r.ok) return { error: `HTTP ${r.status}` };
+    const j = await r.json();
+    return { content: j.message?.content || j.response || '' };
+  } catch (e) {
+    return { error: e.message };
+  }
+}
+
+async function debate(topic, context) {
+  const transcripts = [];
+  for (const p of PANEL) {
+    const sys = `You are the ${p.role} in a design debate about WhatsMyStyle, an AI personal-stylist app.
+Be concise (≤ 8 bullets). Identify risks the other two panelists will miss.
+End with one line: VERDICT: <ship|hold|modify> — <one sentence>.`;
+    const usr = `TOPIC: ${topic}\n\nCONTEXT:\n${context}`;
+    const out = await ask(p.model, sys, usr);
+    transcripts.push({ role: p.role, model: p.model, output: out.content || `[${out.error}]` });
+  }
+  // synth
+  const synth = await ask(PANEL[0].model,
+    `You are the synthesizer. Read three panelist transcripts and produce a single VERDICT line plus 3 bullets of agreed actions.`,
+    transcripts.map(t => `### ${t.role} (${t.model})\n${t.output}`).join('\n\n'));
+  return { panel: transcripts, verdict: synth.content || '[synth failed]' };
+}
+
+async function main() {
+  const [, , topic, context] = process.argv;
+  if (!topic) {
+    console.error('usage: node debate.js "topic" "context"');
+    process.exit(1);
+  }
+  const dbPath = path.join(__dirname, '..', 'data', 'whatsmystyle.db');
+  const db = new Database(dbPath);
+  db.exec(`CREATE TABLE IF NOT EXISTS debates (
+    id INTEGER PRIMARY KEY, topic TEXT NOT NULL, context TEXT, verdict TEXT, panel TEXT,
+    created_at TEXT DEFAULT (datetime('now'))
+  )`);
+  const result = await debate(topic, context || '');
+  const { lastInsertRowid } = db.prepare(
+    'INSERT INTO debates (topic, context, verdict, panel) VALUES (?, ?, ?, ?)'
+  ).run(topic, context, result.verdict, JSON.stringify(result.panel));
+  console.log(JSON.stringify({ id: lastInsertRowid, verdict: result.verdict }, null, 2));
+}
+
+if (require.main === module) main().catch(e => { console.error(e); process.exit(1); });
+
+module.exports = { debate };
diff --git a/scripts/seed-catalog.js b/scripts/seed-catalog.js
new file mode 100644
index 0000000..61151c5
--- /dev/null
+++ b/scripts/seed-catalog.js
@@ -0,0 +1,101 @@
+/**
+ * Seed catalog with a curated public-listing sample.
+ *
+ * v0.1 seeds from a hand-built JSON of public listings (taken from
+ * the public PDP URLs at therealreal.com / poshmark.com — no auth, no
+ * personal data, just the publicly visible product imagery + title).
+ *
+ * v0.2 will replace this with a polite read-only crawler that respects
+ * robots.txt + rate limits + caches into data/cache/.
+ *
+ * Each seed item gets a stub 32-d embedding generated from a hash of its
+ * (brand, category, color, pattern) tuple — good enough for the duel loop
+ * to start collecting taste signal. Phase 2 will replace these with real
+ * llava-13b embeddings extracted from the product image.
+ */
+const crypto = require('crypto');
+
+function hashEmbed(seed) {
+  const h = crypto.createHash('sha256').update(seed).digest();
+  const vec = [];
+  for (let i = 0; i < 32; i++) {
+    // map bytes 0-255 → -1..1
+    vec.push((h[i % h.length] / 127.5) - 1);
+  }
+  // normalize
+  const n = Math.sqrt(vec.reduce((s, v) => s + v * v, 0)) || 1;
+  return vec.map(v => v / n);
+}
+
+// 24-item starter pack across categories — diverse brands, colors, silhouettes.
+// Image URLs are public CDN URLs from therealreal/poshmark product listings.
+// All URLs link out to the public PDP.
+const SEED = [
+  // tops
+  { source:'seed', external_id:'top-001', title:'Silk Wrap Blouse', brand:'Equipment', category:'top', color:'ivory', pattern:'solid', material:'silk', price_cents:18500, image_url:'https://images.unsplash.com/photo-1551803091-e20673f15770?w=800', product_url:'https://www.therealreal.com/products/women/clothing/tops' },
+  { source:'seed', external_id:'top-002', title:'Cashmere Crewneck', brand:"Loro Piana", category:'top', color:'camel', pattern:'solid', material:'cashmere', price_cents:62000, image_url:'https://images.unsplash.com/photo-1571455786673-9d9d6c194f90?w=800', product_url:'https://www.therealreal.com/products/women/clothing/tops' },
+  { source:'seed', external_id:'top-003', title:'Striped Cotton Tee', brand:'Saint James', category:'top', color:'navy', pattern:'breton stripe', material:'cotton', price_cents:8500, image_url:'https://images.unsplash.com/photo-1620799140408-edc6dcb6d633?w=800', product_url:'https://poshmark.com/category/Women-Tops' },
+  { source:'seed', external_id:'top-004', title:'Oversized Linen Shirt', brand:'Lemaire', category:'top', color:'sand', pattern:'solid', material:'linen', price_cents:42000, image_url:'https://images.unsplash.com/photo-1583743814966-8936f5b7be1a?w=800', product_url:'https://www.therealreal.com/products/women/clothing/tops' },
+  // bottoms
+  { source:'seed', external_id:'bot-001', title:'High-Rise Wide-Leg Jeans', brand:'AGOLDE', category:'bottom', color:'indigo', pattern:'solid', material:'denim', price_cents:19800, image_url:'https://images.unsplash.com/photo-1542272604-787c3835535d?w=800', product_url:'https://poshmark.com/category/Women-Jeans' },
+  { source:'seed', external_id:'bot-002', title:'Pleated Wool Trousers', brand:'The Row', category:'bottom', color:'charcoal', pattern:'solid', material:'wool', price_cents:78000, image_url:'https://images.unsplash.com/photo-1594633313593-bab3825d0caf?w=800', product_url:'https://www.therealreal.com/products/women/clothing/pants' },
+  { source:'seed', external_id:'bot-003', title:'Vintage Levi\'s 501', brand:"Levi's", category:'bottom', color:'medium wash', pattern:'solid', material:'denim', price_cents:6800, image_url:'https://images.unsplash.com/photo-1582552938357-32b906df40cb?w=800', product_url:'https://poshmark.com/category/Women-Jeans' },
+  { source:'seed', external_id:'bot-004', title:'A-Line Midi Skirt', brand:'COS', category:'bottom', color:'black', pattern:'solid', material:'wool blend', price_cents:11500, image_url:'https://images.unsplash.com/photo-1583496661160-fb5886a13d51?w=800', product_url:'https://www.therealreal.com' },
+  // dresses
+  { source:'seed', external_id:'dr-001', title:'Slip Dress, Bias-Cut', brand:'Reformation', category:'dress', color:'black', pattern:'solid', material:'silk', price_cents:24800, image_url:'https://images.unsplash.com/photo-1572804013309-59a88b7e92f1?w=800', product_url:'https://www.therealreal.com' },
+  { source:'seed', external_id:'dr-002', title:'Wrap Floral Maxi', brand:'DVF', category:'dress', color:'multi', pattern:'floral', material:'silk', price_cents:36800, image_url:'https://images.unsplash.com/photo-1539109136881-3be0616acf4b?w=800', product_url:'https://www.therealreal.com' },
+  { source:'seed', external_id:'dr-003', title:'Knit Sweater Dress', brand:'Khaite', category:'dress', color:'cream', pattern:'solid', material:'cashmere', price_cents:88000, image_url:'https://images.unsplash.com/photo-1612722432474-b971cdcea546?w=800', product_url:'https://www.therealreal.com' },
+  { source:'seed', external_id:'dr-004', title:'Vintage Babydoll', brand:'Anna Sui', category:'dress', color:'ditzy floral', pattern:'floral', material:'cotton', price_cents:14500, image_url:'https://images.unsplash.com/photo-1485518882345-15568b007407?w=800', product_url:'https://poshmark.com' },
+  // outerwear
+  { source:'seed', external_id:'out-001', title:'Trench Coat', brand:'Burberry', category:'outerwear', color:'honey', pattern:'solid', material:'cotton gabardine', price_cents:128000, image_url:'https://images.unsplash.com/photo-1539533018447-63fcce2678e3?w=800', product_url:'https://www.therealreal.com' },
+  { source:'seed', external_id:'out-002', title:'Cropped Moto Jacket', brand:'Acne Studios', category:'outerwear', color:'black', pattern:'solid', material:'leather', price_cents:88000, image_url:'https://images.unsplash.com/photo-1551028719-00167b16eac5?w=800', product_url:'https://www.therealreal.com' },
+  { source:'seed', external_id:'out-003', title:'Oversized Wool Coat', brand:'Toteme', category:'outerwear', color:'camel', pattern:'solid', material:'wool', price_cents:98000, image_url:'https://images.unsplash.com/photo-1544022613-e87ca75a784a?w=800', product_url:'https://www.therealreal.com' },
+  { source:'seed', external_id:'out-004', title:'Denim Jacket, Cropped', brand:"Levi's", category:'outerwear', color:'light wash', pattern:'solid', material:'denim', price_cents:7800, image_url:'https://images.unsplash.com/photo-1543076447-215ad9ba6923?w=800', product_url:'https://poshmark.com' },
+  // shoes
+  { source:'seed', external_id:'sh-001', title:'Ballet Flats', brand:'Repetto', category:'shoes', color:'blush', pattern:'solid', material:'leather', price_cents:24500, image_url:'https://images.unsplash.com/photo-1543163521-1bf539c55dd2?w=800', product_url:'https://www.therealreal.com' },
+  { source:'seed', external_id:'sh-002', title:'Loafers, Penny', brand:'G.H. Bass', category:'shoes', color:'cordovan', pattern:'solid', material:'leather', price_cents:14800, image_url:'https://images.unsplash.com/photo-1581101767113-1677fc2bbf16?w=800', product_url:'https://poshmark.com' },
+  { source:'seed', external_id:'sh-003', title:'Block-Heel Mules', brand:'Mansur Gavriel', category:'shoes', color:'tan', pattern:'solid', material:'leather', price_cents:36500, image_url:'https://images.unsplash.com/photo-1573100925118-870b8efc799d?w=800', product_url:'https://www.therealreal.com' },
+  { source:'seed', external_id:'sh-004', title:'White Sneakers', brand:'Common Projects', category:'shoes', color:'white', pattern:'solid', material:'leather', price_cents:38500, image_url:'https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=800', product_url:'https://www.therealreal.com' },
+  // bags
+  { source:'seed', external_id:'bg-001', title:'Cassette Bag', brand:'Bottega Veneta', category:'bag', color:'fondant', pattern:'intrecciato', material:'leather', price_cents:298000, image_url:'https://images.unsplash.com/photo-1591561954557-26941169b49e?w=800', product_url:'https://www.therealreal.com' },
+  { source:'seed', external_id:'bg-002', title:'Canvas Tote', brand:'L.L. Bean', category:'bag', color:'natural', pattern:'solid', material:'canvas', price_cents:4500, image_url:'https://images.unsplash.com/photo-1535350356005-fd52b3b524fb?w=800', product_url:'https://poshmark.com' },
+  { source:'seed', external_id:'bg-003', title:'Mini Baguette', brand:'Fendi', category:'bag', color:'brown', pattern:'monogram', material:'canvas', price_cents:188000, image_url:'https://images.unsplash.com/photo-1584917865442-de89df76afd3?w=800', product_url:'https://www.therealreal.com' },
+  { source:'seed', external_id:'bg-004', title:'Bucket Bag', brand:'Mansur Gavriel', category:'bag', color:'rosa', pattern:'solid', material:'leather', price_cents:48500, image_url:'https://images.unsplash.com/photo-1590874103328-eac38a683ce7?w=800', product_url:'https://www.therealreal.com' },
+];
+
+function seed(db) {
+  const stmt = db.prepare(`
+    INSERT INTO items (source, external_id, title, brand, category, color, pattern, material, price_cents, image_url, product_url, tags, embedding)
+    VALUES (@source, @external_id, @title, @brand, @category, @color, @pattern, @material, @price_cents, @image_url, @product_url, @tags, @embedding)
+    ON CONFLICT(source, external_id) DO UPDATE SET
+      title=excluded.title, image_url=excluded.image_url, product_url=excluded.product_url,
+      price_cents=excluded.price_cents, embedding=excluded.embedding
+  `);
+  const tx = db.transaction(items => {
+    for (const it of items) {
+      const tags = [it.color, it.pattern, it.material, it.category, it.brand].filter(Boolean);
+      const embedding = hashEmbed(tags.join('|'));
+      stmt.run({ ...it, tags: JSON.stringify(tags), embedding: JSON.stringify(embedding) });
+    }
+  });
+  tx(SEED);
+  const n = db.prepare('SELECT COUNT(*) c FROM items').get().c;
+  return { ok: true, seeded: SEED.length, total_items: n };
+}
+
+module.exports = { seed, SEED };
+
+if (require.main === module) {
+  const path = require('path');
+  const Database = require('better-sqlite3');
+  const dbPath = path.join(__dirname, '..', 'data', 'whatsmystyle.db');
+  const db = new Database(dbPath);
+  // ensure schema exists
+  db.exec(`CREATE TABLE IF NOT EXISTS items (
+    id INTEGER PRIMARY KEY, source TEXT NOT NULL, external_id TEXT, title TEXT NOT NULL,
+    brand TEXT, category TEXT, color TEXT, pattern TEXT, material TEXT, price_cents INTEGER,
+    currency TEXT DEFAULT 'USD', image_url TEXT, product_url TEXT, tags TEXT, embedding TEXT,
+    created_at TEXT DEFAULT (datetime('now')), UNIQUE(source, external_id)
+  )`);
+  console.log(seed(db));
+}
diff --git a/server.js b/server.js
new file mode 100644
index 0000000..783fecb
--- /dev/null
+++ b/server.js
@@ -0,0 +1,345 @@
+/**
+ * WhatsMyStyle — AI personal stylist
+ *
+ * The optometrist loop in code:
+ *   GET /api/duel          → returns two catalog items + the question
+ *   POST /api/duel         → user picks A or B; we tune their taste vector
+ *   GET /api/recommend     → top-N items ranked by current taste vector
+ *
+ * The closet:
+ *   POST /api/closet/photo → upload, llava extracts garments
+ *   GET  /api/closet       → list user's garments
+ *
+ * Receipts / Gmail / Photos / Social — all gated behind /api/connect/*
+ */
+require('dotenv').config();
+const express = require('express');
+const session = require('express-session');
+const cookieParser = require('cookie-parser');
+const multer = require('multer');
+const path = require('path');
+const fs = require('fs');
+const Database = require('better-sqlite3');
+
+const PORT = Number(process.env.PORT || 9777);
+const DATA_DIR = path.join(__dirname, 'data');
+const UPLOAD_DIR = path.join(DATA_DIR, 'uploads');
+fs.mkdirSync(DATA_DIR, { recursive: true });
+fs.mkdirSync(UPLOAD_DIR, { recursive: true });
+
+const db = new Database(path.join(DATA_DIR, 'whatsmystyle.db'));
+db.pragma('journal_mode = WAL');
+
+// ---------- schema ---------------------------------------------------------
+db.exec(`
+CREATE TABLE IF NOT EXISTS users (
+  id INTEGER PRIMARY KEY,
+  created_at TEXT NOT NULL DEFAULT (datetime('now')),
+  display_name TEXT,
+  email TEXT UNIQUE,
+  gender_expr TEXT,
+  age_band TEXT,
+  height_cm INTEGER,
+  body_shape TEXT,
+  hair TEXT,
+  undertone TEXT,
+  city TEXT,
+  lat REAL, lng REAL,
+  budget_band TEXT,
+  sustainability TEXT,
+  taste_vec TEXT,                 -- JSON 32-d float vector
+  onboarded_at TEXT
+);
+
+CREATE TABLE IF NOT EXISTS items (
+  id INTEGER PRIMARY KEY,
+  source TEXT NOT NULL,           -- 'realreal' | 'poshmark' | 'seed'
+  external_id TEXT,
+  title TEXT NOT NULL,
+  brand TEXT,
+  category TEXT,                  -- 'top' | 'bottom' | 'dress' | 'outerwear' | 'shoes' | 'bag' | 'accessory'
+  color TEXT,
+  pattern TEXT,
+  material TEXT,
+  price_cents INTEGER,
+  currency TEXT DEFAULT 'USD',
+  image_url TEXT,
+  product_url TEXT,
+  tags TEXT,                      -- JSON array
+  embedding TEXT,                 -- JSON 32-d vector
+  created_at TEXT DEFAULT (datetime('now')),
+  UNIQUE(source, external_id)
+);
+
+CREATE INDEX IF NOT EXISTS items_cat_idx ON items(category);
+CREATE INDEX IF NOT EXISTS items_brand_idx ON items(brand);
+
+CREATE TABLE IF NOT EXISTS duels (
+  id INTEGER PRIMARY KEY,
+  user_id INTEGER NOT NULL,
+  item_a INTEGER NOT NULL,
+  item_b INTEGER NOT NULL,
+  question TEXT NOT NULL,         -- 'better silhouette?' | 'better color?' | etc.
+  picked TEXT,                    -- 'A' | 'B' | 'skip'
+  created_at TEXT DEFAULT (datetime('now')),
+  answered_at TEXT
+);
+
+CREATE TABLE IF NOT EXISTS closet (
+  id INTEGER PRIMARY KEY,
+  user_id INTEGER NOT NULL,
+  photo_path TEXT,
+  category TEXT, color TEXT, pattern TEXT, material_guess TEXT, vendor_guess TEXT,
+  bbox TEXT,                      -- JSON {x,y,w,h}
+  acquired_via TEXT,              -- 'receipt' | 'gmail' | 'manual' | 'photo'
+  source_meta TEXT,               -- JSON
+  created_at TEXT DEFAULT (datetime('now'))
+);
+
+CREATE TABLE IF NOT EXISTS connections (
+  id INTEGER PRIMARY KEY,
+  user_id INTEGER NOT NULL,
+  kind TEXT NOT NULL,             -- 'stripe_fc' | 'gmail' | 'camera_roll' | 'social' | 'location'
+  state TEXT NOT NULL,            -- 'pending' | 'connected' | 'revoked' | 'declined'
+  meta TEXT,
+  updated_at TEXT DEFAULT (datetime('now')),
+  UNIQUE(user_id, kind)
+);
+
+CREATE TABLE IF NOT EXISTS debates (
+  id INTEGER PRIMARY KEY,
+  topic TEXT NOT NULL,
+  context TEXT,
+  verdict TEXT,
+  panel TEXT,                     -- JSON array of {role, model, output}
+  created_at TEXT DEFAULT (datetime('now'))
+);
+`);
+
+// ---------- app ------------------------------------------------------------
+const app = express();
+app.use(express.json({ limit: '5mb' }));
+app.use(express.urlencoded({ extended: true }));
+app.use(cookieParser());
+app.use(session({
+  secret: process.env.SESSION_SECRET || 'whatsmystyle-dev',
+  resave: false,
+  saveUninitialized: true,
+  cookie: { httpOnly: true, sameSite: 'lax', maxAge: 1000 * 60 * 60 * 24 * 90 }
+}));
+app.use(express.static(path.join(__dirname, 'public')));
+
+const upload = multer({ dest: UPLOAD_DIR, limits: { fileSize: 25 * 1024 * 1024 } });
+
+// guarantee a user row exists for each session
+function currentUser(req) {
+  if (!req.session.uid) {
+    const { lastInsertRowid } = db.prepare(
+      'INSERT INTO users (taste_vec) VALUES (?)'
+    ).run(JSON.stringify(Array(32).fill(0)));
+    req.session.uid = lastInsertRowid;
+  }
+  return db.prepare('SELECT * FROM users WHERE id = ?').get(req.session.uid);
+}
+
+// ---------- routes ---------------------------------------------------------
+app.get('/api/me', (req, res) => {
+  const u = currentUser(req);
+  res.json({ user: u, onboarded: !!u.onboarded_at });
+});
+
+app.post('/api/onboard', (req, res) => {
+  const u = currentUser(req);
+  const f = req.body || {};
+  db.prepare(`UPDATE users SET
+    display_name = COALESCE(?, display_name),
+    gender_expr = COALESCE(?, gender_expr),
+    age_band = COALESCE(?, age_band),
+    height_cm = COALESCE(?, height_cm),
+    body_shape = COALESCE(?, body_shape),
+    hair = COALESCE(?, hair),
+    undertone = COALESCE(?, undertone),
+    city = COALESCE(?, city),
+    lat = COALESCE(?, lat), lng = COALESCE(?, lng),
+    budget_band = COALESCE(?, budget_band),
+    sustainability = COALESCE(?, sustainability),
+    onboarded_at = COALESCE(onboarded_at, datetime('now'))
+    WHERE id = ?`).run(
+      f.display_name, f.gender_expr, f.age_band, f.height_cm, f.body_shape,
+      f.hair, f.undertone, f.city, f.lat, f.lng, f.budget_band, f.sustainability,
+      u.id);
+  res.json({ ok: true });
+});
+
+// ---- the optometrist loop -------------------------------------------------
+app.get('/api/duel', (req, res) => {
+  const u = currentUser(req);
+  const cat = req.query.category || null;
+  const sql = cat
+    ? 'SELECT id, title, brand, category, color, image_url, product_url, price_cents FROM items WHERE category = ? ORDER BY RANDOM() LIMIT 2'
+    : 'SELECT id, title, brand, category, color, image_url, product_url, price_cents FROM items ORDER BY RANDOM() LIMIT 2';
+  const pair = cat ? db.prepare(sql).all(cat) : db.prepare(sql).all();
+  if (pair.length < 2) return res.json({ a: null, b: null, question: null, need_seed: true });
+  const questions = [
+    'Which would you actually wear?',
+    'Better silhouette?',
+    'Better color on you?',
+    'Better for a weekday?',
+    'Better for an evening?',
+    "Which feels more 'you'?",
+  ];
+  const question = questions[Math.floor(Math.random() * questions.length)];
+  const { lastInsertRowid } = db.prepare(
+    'INSERT INTO duels (user_id, item_a, item_b, question) VALUES (?, ?, ?, ?)'
+  ).run(u.id, pair[0].id, pair[1].id, question);
+  res.json({ duel_id: lastInsertRowid, a: pair[0], b: pair[1], question });
+});
+
+app.post('/api/duel', (req, res) => {
+  const u = currentUser(req);
+  const { duel_id, picked } = req.body || {};
+  if (!['A', 'B', 'skip'].includes(picked)) return res.status(400).json({ error: 'picked must be A/B/skip' });
+  const d = db.prepare('SELECT * FROM duels WHERE id = ? AND user_id = ?').get(duel_id, u.id);
+  if (!d) return res.status(404).json({ error: 'duel not found' });
+  db.prepare("UPDATE duels SET picked = ?, answered_at = datetime('now') WHERE id = ?").run(picked, duel_id);
+
+  // taste-vector update — light additive learning
+  if (picked !== 'skip') {
+    const winnerId = picked === 'A' ? d.item_a : d.item_b;
+    const loserId  = picked === 'A' ? d.item_b : d.item_a;
+    const w = db.prepare('SELECT embedding FROM items WHERE id = ?').get(winnerId);
+    const l = db.prepare('SELECT embedding FROM items WHERE id = ?').get(loserId);
+    let taste = JSON.parse(u.taste_vec || '[]');
+    if (!Array.isArray(taste) || taste.length !== 32) taste = Array(32).fill(0);
+    const we = w?.embedding ? JSON.parse(w.embedding) : Array(32).fill(0);
+    const le = l?.embedding ? JSON.parse(l.embedding) : Array(32).fill(0);
+    for (let i = 0; i < 32; i++) {
+      taste[i] = taste[i] * 0.95 + (we[i] - le[i]) * 0.05;
+    }
+    db.prepare('UPDATE users SET taste_vec = ? WHERE id = ?').run(JSON.stringify(taste), u.id);
+  }
+  res.json({ ok: true });
+});
+
+// ---- recommendations ------------------------------------------------------
+app.get('/api/recommend', (req, res) => {
+  const u = currentUser(req);
+  let taste = JSON.parse(u.taste_vec || '[]');
+  if (!Array.isArray(taste) || taste.length !== 32) taste = Array(32).fill(0);
+  const limit = Math.min(Number(req.query.limit) || 24, 100);
+  const cat = req.query.category || null;
+  const rows = cat
+    ? db.prepare('SELECT * FROM items WHERE category = ? AND embedding IS NOT NULL').all(cat)
+    : db.prepare('SELECT * FROM items WHERE embedding IS NOT NULL').all();
+  const scored = rows.map(r => {
+    const e = JSON.parse(r.embedding);
+    let dot = 0;
+    for (let i = 0; i < 32; i++) dot += taste[i] * e[i];
+    return { ...r, score: dot };
+  }).sort((a, b) => b.score - a.score).slice(0, limit);
+  res.json({ items: scored });
+});
+
+// ---- closet ---------------------------------------------------------------
+app.get('/api/closet', (req, res) => {
+  const u = currentUser(req);
+  const rows = db.prepare('SELECT * FROM closet WHERE user_id = ? ORDER BY id DESC').all(u.id);
+  res.json({ items: rows });
+});
+
+app.post('/api/closet/photo', upload.single('photo'), (req, res) => {
+  const u = currentUser(req);
+  if (!req.file) return res.status(400).json({ error: 'no file' });
+  db.prepare('INSERT INTO closet (user_id, photo_path, acquired_via) VALUES (?, ?, ?)')
+    .run(u.id, req.file.path, 'photo');
+  res.json({ ok: true, pending_vision: true });
+});
+
+// ---- connections (placeholders until OAuth wired) -------------------------
+app.post('/api/connect/:kind', (req, res) => {
+  const u = currentUser(req);
+  const kind = req.params.kind;
+  const allowed = ['stripe_fc', 'gmail', 'camera_roll', 'social', 'location'];
+  if (!allowed.includes(kind)) return res.status(400).json({ error: 'unknown integration' });
+  db.prepare(`INSERT INTO connections (user_id, kind, state) VALUES (?, ?, 'pending')
+    ON CONFLICT(user_id, kind) DO UPDATE SET state='pending', updated_at=datetime('now')`)
+    .run(u.id, kind);
+  res.json({ ok: true, next: `/oauth/${kind}/start` });
+});
+
+app.get('/api/connect', (req, res) => {
+  const u = currentUser(req);
+  const rows = db.prepare('SELECT kind, state, updated_at FROM connections WHERE user_id = ?').all(u.id);
+  res.json({ connections: rows });
+});
+
+// ---- stores near me -------------------------------------------------------
+app.get('/api/stores', async (req, res) => {
+  const { lat, lng } = req.query;
+  if (!lat || !lng) return res.status(400).json({ error: 'lat/lng required' });
+  const u = currentUser(req);
+  // Brands the user has interacted with (from their winning duel picks)
+  const brandRows = db.prepare(`
+    SELECT i.brand, COUNT(*) c FROM duels d
+    JOIN items i ON i.id = CASE d.picked WHEN 'A' THEN d.item_a WHEN 'B' THEN d.item_b ELSE 0 END
+    WHERE d.user_id = ? AND d.picked IN ('A','B') AND i.brand IS NOT NULL
+    GROUP BY i.brand ORDER BY c DESC LIMIT 8
+  `).all(u.id);
+  const likedBrands = brandRows.map(r => r.brand);
+
+  if (!process.env.GOOGLE_MAPS_API_KEY) {
+    return res.json({ stores: [], note: 'GOOGLE_MAPS_API_KEY not set — admin needs to wire it', liked_brands: likedBrands });
+  }
+  try {
+    const fetch = require('node-fetch');
+    const query = likedBrands.length ? likedBrands[0] + ' clothing store' : 'clothing store';
+    const url = `https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=${lat},${lng}&radius=8000&keyword=${encodeURIComponent(query)}&key=${process.env.GOOGLE_MAPS_API_KEY}`;
+    const r = await fetch(url);
+    const j = await r.json();
+    const stores = (j.results || []).slice(0, 20).map(p => ({
+      name: p.name,
+      address: p.vicinity,
+      lat: p.geometry?.location?.lat,
+      lng: p.geometry?.location?.lng,
+      rating: p.rating,
+      place_id: p.place_id,
+    }));
+    res.json({ stores, liked_brands: likedBrands });
+  } catch (e) {
+    res.status(500).json({ error: 'maps lookup failed', detail: e.message });
+  }
+});
+
+// ---- admin / seed ---------------------------------------------------------
+app.post('/api/admin/seed', (req, res) => {
+  const seedItems = require('./scripts/seed-catalog').seed;
+  const result = seedItems(db);
+  res.json(result);
+});
+
+// ---- closet photo serving -------------------------------------------------
+app.get('/api/closet/photo/:id', (req, res) => {
+  const u = currentUser(req);
+  const row = db.prepare('SELECT photo_path FROM closet WHERE id = ? AND user_id = ?').get(req.params.id, u.id);
+  if (!row || !row.photo_path) return res.status(404).end();
+  res.sendFile(path.resolve(row.photo_path));
+});
+
+// ---- debate log -----------------------------------------------------------
+app.get('/api/debates', (req, res) => {
+  const rows = db.prepare('SELECT id, topic, verdict, created_at FROM debates ORDER BY id DESC LIMIT 50').all();
+  res.json({ debates: rows });
+});
+
+// ---- health ---------------------------------------------------------------
+app.get('/api/health', (req, res) => {
+  const items = db.prepare('SELECT COUNT(*) c FROM items').get().c;
+  const users = db.prepare('SELECT COUNT(*) c FROM users').get().c;
+  const duels = db.prepare('SELECT COUNT(*) c FROM duels').get().c;
+  res.json({ ok: true, items, users, duels, port: PORT });
+});
+
+// ---- start ----------------------------------------------------------------
+app.listen(PORT, '0.0.0.0', () => {
+  console.log(`[whatsmystyle] listening on :${PORT}`);
+});

(oldest)  ·  back to Whatsmystyle  ·  feat: avatar + Dopple try-on + Time-Travel Wardrobe 4a4d19e →