Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/wxl-ci.yml → .github/workflows/yuhm-ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: WXL CI
name: yuhm CI

on:
pull_request:
paths:
- "wxl/**"
- ".github/workflows/wxl-ci.yml"
- "yuhm/**"
- ".github/workflows/yuhm-ci.yml"
push:
branches: [main]
paths:
- "wxl/**"
- ".github/workflows/wxl-ci.yml"
- "yuhm/**"
- ".github/workflows/yuhm-ci.yml"
workflow_dispatch:

jobs:
Expand All @@ -18,14 +18,14 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: wxl
working-directory: yuhm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: wxl/package-lock.json
cache-dependency-path: yuhm/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run tests
Expand Down
1 change: 0 additions & 1 deletion wxl/public/_redirects

This file was deleted.

This file was deleted.

52 changes: 0 additions & 52 deletions wxl/src/LandingPage.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions wxl/src/SourceBoard.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions wxl/src/main.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions wxl/src/vite-env.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion wxl/.env.example → yuhm/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ LOCATION_ENCRYPTION_KEY=

# Server-only Netlify Functions. RESEND_API_KEY must support audience access.
RESEND_API_KEY=
WXL_RESEND_AUDIENCE_ID=
YUHM_RESEND_AUDIENCE_ID=
EMAIL_FROM=
EMAIL_TO_OPS=
43 changes: 22 additions & 21 deletions wxl/DEPLOY.md → yuhm/DEPLOY.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,76 @@
# WXL:FOOD deployment
# yuhm deployment

## Target

- Host: `wxl.handprotocol.org`
- Netlify site: `wxl-food`, id `56ee91bf-bf15-472d-8c1c-d6c30af05d6c`
- Netlify base directory: `wxl`
- Host: `yuhm.handprotocol.org`
- Legacy host: `wxl.handprotocol.org` stays a domain alias on the site and 301-redirects to `yuhm.handprotocol.org` via `public/_redirects` (renamed from WXL:FOOD on 2026-08-24)
- Netlify site: `yuhm-network`, id `56ee91bf-bf15-472d-8c1c-d6c30af05d6c`
- Netlify base directory: `yuhm`
- Build command: `npm run build`
- Publish directory: `dist`

## How deploys actually happen

The `wxl-food` Netlify site is **not linked to the GitHub repository** (verified 2026-08-11: `build_settings.repo_url` is empty). Pushing to `main` does not deploy WXL. Every production deploy is a CLI publish:
The `yuhm-network` Netlify site is **not linked to the GitHub repository** (verified 2026-08-11: `build_settings.repo_url` is empty). Pushing to `main` does not deploy yuhm. Every production deploy is a CLI publish:

```bash
cd wxl
cd yuhm
npm ci && npm run build
netlify deploy --prod --site 56ee91bf-bf15-472d-8c1c-d6c30af05d6c --dir dist --message "<what shipped> (<commit>)"
```

Deploy from a clean checkout of `main`, not a working tree with unrelated changes. Security headers ship via `public/_headers` (copied into `dist`), because `[[headers]]` in `netlify.toml` is not applied on CLI `--dir` deploys. Verify after deploying:

```bash
curl -sI https://wxl.handprotocol.org/ | grep -i content-security-policy
curl -sI https://yuhm.handprotocol.org/ | grep -i content-security-policy
```

## Environment

Set these variables on the WXL:FOOD Netlify site:
Set these variables on the yuhm Netlify site:

```text
VITE_SUPABASE_URL=https://<HAND project ref>.supabase.co
VITE_SUPABASE_ANON_KEY=<HAND anon key>
```

The browser receives only the anon key. The service-role key stays in the HAND Command Center and is never added to WXL:FOOD.
The browser receives only the anon key. The service-role key stays in the HAND Command Center and is never added to yuhm.

In the HAND Supabase dashboard, open **Authentication > Sign In / Providers > Email** and turn off **Confirm email**. WXL signup expects `signUp` to return a session immediately. The client then opens `/app/`; standard `username`, `new-password`, and form-submit metadata lets the member's browser offer to save the credentials locally.
In the HAND Supabase dashboard, open **Authentication > Sign In / Providers > Email** and turn off **Confirm email**. yuhm signup expects `signUp` to return a session immediately. The client then opens `/app/`; standard `username`, `new-password`, and form-submit metadata lets the member's browser offer to save the credentials locally.

In **Authentication > URL Configuration**, set:

```text
Site URL: https://wxl.handprotocol.org
Redirect URL: https://wxl.handprotocol.org/app/?mode=recovery
Site URL: https://yuhm.handprotocol.org
Redirect URL: https://yuhm.handprotocol.org/app/?mode=recovery
Redirect URL: http://localhost:5173/app/?mode=recovery
```

The production recovery URL must appear exactly in the redirect allowlist. Otherwise Supabase can fall back to its default Site URL, which is commonly `http://localhost:3000`.

If the recovery email template was customized, keep `{{ .ConfirmationURL }}` as the link target. A manually constructed link must use `{{ .RedirectTo }}`, not `{{ .SiteURL }}`, so the `redirectTo` value supplied by WXL is preserved.
If the recovery email template was customized, keep `{{ .ConfirmationURL }}` as the link target. A manually constructed link must use `{{ .RedirectTo }}`, not `{{ .SiteURL }}`, so the `redirectTo` value supplied by yuhm is preserved.

The `FOOD IS HERE!` operations email hook also reads these server-side values:

```text
RESEND_API_KEY
EMAIL_FROM
EMAIL_TO_OPS
WXL_RESEND_AUDIENCE_ID
YUHM_RESEND_AUDIENCE_ID
```

`EMAIL_FROM` should use the existing verified `handprotocol.org` domain, for example `WXL:FOOD <alerts@handprotocol.org>`. The function falls back to HAND's existing `RESEND_NOTIFY_FROM`, `RESEND_NOTIFY_TO`, and `RESEND_FORWARD_TO` names when present. Do not add a Resend key to any `VITE_` variable.
`EMAIL_FROM` should use the existing verified `handprotocol.org` domain, for example `yuhm <alerts@handprotocol.org>`. The function falls back to HAND's existing `RESEND_NOTIFY_FROM`, `RESEND_NOTIFY_TO`, and `RESEND_FORWARD_TO` names when present. Do not add a Resend key to any `VITE_` variable.

The email-only WXL updates form uses `RESEND_API_KEY` and `WXL_RESEND_AUDIENCE_ID` to add contacts to a Resend audience without creating Supabase accounts. If `WXL_RESEND_AUDIENCE_ID` is absent, it falls back to `RESEND_AUDIENCE_ID`. Use a WXL-specific audience when available so platform updates and future offerings can be managed separately. Audience emails must retain Resend's unsubscribe link. Each newly added updates subscriber is also sent through HAND's shared feedback notification path. Successful WXL account creation uses that same path. Keep `EMAIL_TO_OPS=handprotocol@gmail.com` on the HAND Netlify site so both notices reach operations. Set `HAND_FEEDBACK_ENDPOINT` on WXL only to override the shared endpoint for local or staging use.
The email-only yuhm updates form uses `RESEND_API_KEY` and `YUHM_RESEND_AUDIENCE_ID` to add contacts to a Resend audience without creating Supabase accounts. If `YUHM_RESEND_AUDIENCE_ID` is absent, it falls back to `RESEND_AUDIENCE_ID`. Use a yuhm-specific audience when available so platform updates and future offerings can be managed separately. Audience emails must retain Resend's unsubscribe link. Each newly added updates subscriber is also sent through HAND's shared feedback notification path. Successful yuhm account creation uses that same path. Keep `EMAIL_TO_OPS=handprotocol@gmail.com` on the HAND Netlify site so both notices reach operations. Set `HAND_FEEDBACK_ENDPOINT` on yuhm only to override the shared endpoint for local or staging use.

The feedback panel posts to `https://handprotocol.org/.netlify/functions/feedback` by default. That HAND site function writes the durable Command Center record and sends the operations notification. Keep `EMAIL_TO_OPS=handprotocol@gmail.com` on the HAND Netlify site. `VITE_FEEDBACK_ENDPOINT` may override the shared endpoint for local or staging tests.

If WXL does not have its own Resend variables, the function forwards the authenticated alert to HAND's shared feedback endpoint. That endpoint provides the existing Command Center, Telegram, and Resend notification fan-out without exposing a key to WXL.
If yuhm does not have its own Resend variables, the function forwards the authenticated alert to HAND's shared feedback endpoint. That endpoint provides the existing Command Center, Telegram, and Resend notification fan-out without exposing a key to yuhm.

## Routing

- `/` is the WXL landing page.
- `/app/` is the WXL:FOOD command center.
- `/` is the yuhm landing page.
- `/app/` is the yuhm command center.
- The SPA fallback is defined in `netlify.toml` and `public/_redirects`.

## Database
Expand Down Expand Up @@ -97,7 +98,7 @@ Apply these migrations to the HAND Supabase project in order, then add `command`
../command/supabase/migrations/041_wxl_hardening.sql
```

After migration 026, verify that no auth account is missing the profile row required by WXL food-record foreign keys:
After migration 026, verify that no auth account is missing the profile row required by yuhm food-record foreign keys:

```sql
select users.id, users.email
Expand Down Expand Up @@ -200,4 +201,4 @@ Inventory code does not yet provide automated expiry, recall quarantine, lot tra

## Domain

The Netlify site `wxl-food` is configured with `wxl.handprotocol.org` as its primary custom domain. Netlify provisioned SSL and manages the DNS record for the existing `handprotocol.org` zone. The current deployment is live at `https://wxl.handprotocol.org`.
The Netlify site `yuhm-network` is configured with `yuhm.handprotocol.org` as its primary custom domain. Netlify provisioned SSL and manages the DNS record for the existing `handprotocol.org` zone. The current deployment is live at `https://yuhm.handprotocol.org`.
Loading
Loading