← back to All Designerwallcoverings

CLAUDE.md

47 lines

# all-designerwallcoverings

Fleet aggregator for `all.designerwallcoverings.com` — the whole-catalog search
grid + the live microsite directory. Node http server on port **9958** (in-RAM
product rows + `/api/products` + `/api/facets` + `/api/vendors` + `/api/microsites`;
Basic-Auth gate `admin/DW2024!`, override `BASIC_AUTH=user:pass`, `/healthz` open).

Prod = Kamatera `root@45.61.58.125`, pm2 `all-designerwallcoverings` :9958, behind
Cloudflare. The `401` from the public root IS the healthy-gated signal, not an outage.

## Deploy

**DO NOT use the full-tree `/deploy` skill on this repo.** The canonical deploy
script (`~/Projects/_shared/scripts/deploy.sh`) runs `rsync -az --delete` full-tree,
which is UNSAFE here.

**WHY:** prod generates its OWN live-crawl artifacts that do NOT exist locally —
`data/microsites.json` and `data/vendors.json`, written by the microsite crawler
every 10 min — plus prod-only backup files. A full-tree `rsync --delete` would
overwrite these with stale local copies OR delete them entirely, taking down
`/api/microsites` and the live directory.

**CORRECT METHOD — targeted single-file rsync of ONLY the changed file(s):**

1. rsync just the changed file(s) to prod:
   ```sh
   rsync -avz public/index.html root@45.61.58.125:/root/Projects/all-designerwallcoverings/public/index.html
   ```
2. reload + persist pm2:
   ```sh
   ssh root@45.61.58.125 'pm2 reload all-designerwallcoverings && pm2 save'
   ```
3. smoke-test:
   ```sh
   # /healthz must return 200
   curl -s -o /dev/null -w '%{http_code}' http://45.61.58.125:9958/healthz            # expect 200
   # public root must return 401 (the HEALTHY gated signal, NOT an outage)
   curl -s -o /dev/null -w '%{http_code}' https://all.designerwallcoverings.com/       # expect 401
   ```

Repeat step 1 for each changed file. Never `--delete`, never sync the whole tree,
never sync `data/`.

Deploy to this public, gated surface is **Steve-gated** — build + stage locally,
then hand Steve the `/deploy` go. The same guardrail lives in the comment block at
the top of `.deploy.conf`.