Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fccc673
feat(yuhm): shorten onboarding to sign in or browse, then do the task
cryptokoh Sep 8, 2026
c515ab1
docs(yuhm): session handoff for the onboarding funnel pass
cryptokoh Sep 8, 2026
ff818a1
feat(yuhm): one theme from landing to task, Sign in at the top of eve…
cryptokoh Sep 8, 2026
b3a26ee
docs(yuhm): detailed handoff for the one-theme / sign-in-at-the-top pass
cryptokoh Sep 9, 2026
28edd2d
Add Legacy Care site with cleaned markup and responsive spacing
cryptokoh Sep 11, 2026
528b355
Add editable Legacy Care social and Google review links
cryptokoh Sep 11, 2026
a80b57f
Add three Cathedral session section design concepts
cryptokoh Sep 15, 2026
19cebc1
docs(subculture-audio): handoff reflects the live preview
cryptokoh Sep 17, 2026
f837cb3
feat(yuhm): calmer sign-in card and sheet
cryptokoh Oct 6, 2026
3f48ca6
docs(yuhm): handoff for the sign-in fix, Resend auth email, and calme…
cryptokoh Oct 6, 2026
55116db
feat(yuhm): branded auth emails and Yuhm Network sender
cryptokoh Oct 6, 2026
6b673b0
fix(yuhm): capitalize Yuhm in the auth emails
cryptokoh Oct 6, 2026
7d0d1da
feat(yuhm): pickup-run tool (work in progress), plans 004-006, demos …
cryptokoh Oct 6, 2026
ed68805
fix(yuhm): run sheet fixes from the first browser pass
cryptokoh Oct 6, 2026
499fb0e
docs(yuhm): bring living docs current; record the pickup-run browser …
cryptokoh Oct 6, 2026
8607724
feat(legacy-care): add babysitting & childcare to the offering
cryptokoh Oct 23, 2026
3700b5f
fix(legacy-care): let the babysitting booking button wrap on phones
cryptokoh Oct 23, 2026
6fbb881
feat(mystichearts): one screen, one sheet, and koordi behind both way…
cryptokoh Nov 1, 2026
0ce76a7
docs(grants): drop DANZ references from the infra inventory
cryptokoh Nov 1, 2026
5dfd0b4
feat(mystichearts): live on mysticheartshealing.com, its own Netlify …
cryptokoh Nov 1, 2026
481f786
feat(mystichearts): the What's on calendar, with the intro, the marqu…
cryptokoh Nov 1, 2026
6a49d03
feat(eds-barbershop): both locations, a walk-through video and per-sh…
cryptokoh Nov 4, 2026
e0e2030
feat(mystichearts): booking at book.mysticheartshealing.com, Say hell…
cryptokoh Nov 4, 2026
7ca4a87
docs(mystichearts): cryptokoh@gmail.com on the team as HAND support
cryptokoh Nov 4, 2026
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
Binary file added clients/eds-barbershop/img/locations-poster.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added clients/eds-barbershop/img/locations-walk.mp4
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added clients/eds-barbershop/img/shop-out-back.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
459 changes: 391 additions & 68 deletions clients/eds-barbershop/index.html

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions clients/legacy-care-llc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
.netlify/
dist-preview/
.env
.env.*
41 changes: 41 additions & 0 deletions clients/legacy-care-llc/ENGINE_FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Files owned by the engine. `sync-engine.mjs` copies these from
# clients/_template into a client; everything NOT listed is the site pack
# (site.config.mjs, site/, public/assets/, public/favicon.svg,
# public/img/, tests/page.test.mjs, README.md, HANDOFF.md) and is never
# touched by a sync.
# Generated files (netlify.toml, public/img/placeholder/) are regenerated
# from the client's own config after a sync.
netlify/functions/admin-page.mjs
netlify/functions/admin.mjs
netlify/functions/auth.mjs
netlify/functions/content.mjs
netlify/functions/render.mjs
netlify/functions/lib/admin-page.mjs
netlify/functions/lib/blocks.mjs
netlify/functions/lib/config.mjs
netlify/functions/lib/content.mjs
netlify/functions/lib/db.mjs
netlify/functions/lib/email.mjs
netlify/functions/lib/html.mjs
netlify/functions/lib/http.mjs
netlify/functions/lib/sanitize.mjs
netlify/functions/lib/session.mjs
netlify/functions/lib/site.mjs
netlify/functions/lib/theme.mjs
public/admin/admin.css
public/admin/admin.js
public/robots.txt
scripts/gen-migration.mjs
scripts/gen-netlify-toml.mjs
scripts/make-placeholders.mjs
scripts/render-static.mjs
tests/admin.test.mjs
tests/blocks.test.mjs
tests/config.test.mjs
tests/db.test.mjs
tests/html.test.mjs
tests/migration.test.mjs
tests/sanitize.test.mjs
tests/session.test.mjs
.gitignore
ENGINE_FILES
84 changes: 84 additions & 0 deletions clients/legacy-care-llc/HANDOFF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Handoff — Legacy Care LLC · 2026-09-11

Client site for Legacy Care LLC (owner: cryptokoh@gmail.com,emarie12202007@gmail.com). Server-rendered single page
with an owner CMS at `/admin/` (passwordless email link) for all copy and
photos. Built from `clients/_template` with the `hand-client-site` skill on
2026-09-11.

**Status:** LIVE at https://legacycare.llc since 2026-09-11 (provisioned by provision.mjs).

## Babysitting & childcare (2026-10-23, LIVE)

New `#babysitting` section between Senior care and About, styled from the
owner's "Compassionate Care for Every Generation" flyer: service strip
(Senior care / Babysitting & childcare / In-home services), brush-stroke
script titles, pill rate rows, blue ribbons, and the flyer's watercolor heart
(`public/img/children-heart.webp`, cropped from the flyer, decorative). Rates
are the flyer's: 1 child $18–20, 2 children $22–25, 3 children $25–30,
date night $20–25, weekend $20–25 per hour, 3-hour minimum. No licensing or
age claims. All copy EN/ES and owner-editable under **Babysitting &
childcare** (rates and reasons are lists; empty rates list hides the card).
Nav gains a Babysitting link; nav links now hide below 1100px (was 900) so
five links never wrap. Removed a duplicate hard-coded meta description.
Asset version `20261023b`.

**Deployed 2026-10-23** (deploy `6adb7c76…`; rollback point = previous deploy
`6aaa398b6aa71bbdcfd84090`). This deploy also shipped the 2026-09-16 engine
sync that was sitting undeployed in this folder (booking code is present but
dormant: no `config.booking`). The stored content doc was updated for the
changed defaults (hero eyebrow + lead, services eyebrow, SEO title +
description, EN/ES) as revision 13 under hand@handprotocol.org; the owner can
restore revision 12 from History to undo the copy change.

## Display fixes (2026-09-11)

CMS tokens now render as live values in call buttons and the footer. The page
shows `© 2026 Legacy Care LLC.`, and the Made by HAND credit sits inside the
footer with the owner sign-in. Service text is constrained to its grid track
and wraps within the card on mobile. Asset version: `20260911d`.

## Social links (2026-09-11)

Facebook, Instagram, and the Google review link appear after the direct contact
options and in the footer. The owner can edit or hide them under **Social &
reviews** in the admin. Missing fields in older stored content receive the
schema defaults; no database migration is needed. Facebook and Instagram also
populate LocalBusiness `sameAs` metadata. The Instagram URL uses the clean
profile address without QR tracking parameters. Asset version: `20260911c`.

Validation: 32 tests pass; English and Spanish layouts checked at 360, 390,
768, and 1440px with no horizontal overflow and at least 44px link targets.

## Start here (cold session)

1. Read this file, then `README.md` (architecture, deploy, env vars).
2. Site pack = `site.config.mjs`, `site/schema.mjs`, `site/page.mjs`,
`public/assets/site.css|site.js`. Everything else is engine — do not edit
it here; fix in `clients/_template` and run `sync-engine.mjs legacy-care-llc`.
3. `npm test` runs with no DB. `npm run preview` renders `dist-preview/`.

## Who can sign in (all `owner` role)

| Email | Who |
|---|---|
| cryptokoh@gmail.com | Legacy Care owner |
| emarie12202007@gmail.com | Legacy Care owner |
| hand@handprotocol.org | HAND operator inbox, seeded by migration |

## Where things are

- **Code:** `clients/legacy-care-llc/`
- **Database:** HAND's shared Supabase project `vconmgerblqbworcqkvr`, tables
`command.legacy_care_llc_editors / login_tokens / content / media / revisions`;
migration `command/supabase/migrations/045_legacy_care_llc.sql` — applied: **yes** (2026-09-11).
- **Storage:** public bucket `legacy-care-llc`.
- **Netlify:** project `legacy-care-llc`, site id `5a3d778d-9067-470c-82fa-330fbefe5d15`, account **cryptokoh**.
Env vars per README.
- **Custom domain:** `legacycare.llc`.

## Next steps

1. Design pass on the site pack (theme, copy, layout) → `npm test` + preview.
2. `node .claude/skills/hand-client-site/scripts/provision.mjs legacy-care-llc` (creates
the Netlify site, sets env, applies the migration, deploys, verifies).
3. Owner signs in at `/admin/`, replaces placeholders, publishes.
130 changes: 130 additions & 0 deletions clients/legacy-care-llc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Legacy Care LLC — owner-editable site

Scaffolded from `clients/_template` (read that README for the architecture; this copy is identical).

A single-page client site the owner edits themselves: server-rendered from a
database, with a passwordless `/admin/` (one-time email link) for every line
of copy, all photos (upload, reorder, caption, replace in place, featured
image), extra editors, and publish history with one-click restore. Edits go
live instantly. First built for ZeroBlur (2026-09-05); this directory is the
reusable template — **scaffold a client with the `hand-client-site` skill,
do not copy this by hand.**

## Engine vs site pack

Two kinds of files live here. The split is the whole point.

| | Files | Who edits |
|---|---|---|
| **Engine** | `netlify/functions/**`, `public/admin/**` (css + js; the shell is server-rendered), `scripts/**`, `tests/**`, `netlify.toml` (generated), `package.json`, `.gitignore` — listed in `ENGINE_FILES` | Nobody, per client. Fix once in `clients/_template`, run `sync-engine.mjs` to push to every client. |
| **Site pack** | `site.config.mjs` (identity, theme, fonts, logo, nav, seed media), `site/schema.mjs` (what the owner can edit + default copy), `site/page.mjs` (the layout), `public/assets/site.css` + `site.js` (design + effects), `public/favicon.svg`, `public/img/**`, `tests/page.test.mjs` (the layout's own test) | The person building the client's site. This is the only work per client. |

The engine reaches the pack only through `netlify/functions/lib/site.mjs`
(schema + renderer) and `lib/config.mjs` (config). A pack is therefore exactly
three contracts:

1. `site.config.mjs` — default export, validated by `normalizeConfig()`.
Required: `slug`, `name`, `theme.{bg,ink,accent}`. See the file's comments.
2. `site/schema.mjs` — `SECTIONS`, `DEFAULT_CONTENT`, `CONTENT_KEY`.
Validated at startup by `assertSections()`.
3. `site/page.mjs` — `renderPage({ content, media, origin }) → html string`.
Compose from `lib/blocks.mjs` (head tags with theme injection, JSON-LD,
CTA resolution, image tags with srcset, lightbox, footer links).

Two ways to build a client:

- **Fast path (same layout, new skin + copy):** edit `site.config.mjs`
(theme, fonts, logo, nav labels) and `site/schema.mjs` defaults. No layout
code. ~80 lines of edits.
- **Bespoke design:** keep the schema (or extend it), replace `site/page.mjs`
+ `site.css` + `site.js` with the client's design, composed from blocks.
Porting an existing static design is mechanical: hardcoded copy →
`${e(c.section.field)}`, `<head>` → `B.headTags()`, images → `B.img()`.

## How it works

```
public/ static assets (CSS, JS, seed images, /admin/ app)
netlify/functions/
render.mjs GET / server-renders the page from the DB (CDN-cached, tag = slug)
content.mjs GET /api/content copy + media + editing schema + site identity (public, read-only)
admin-page.mjs GET /admin/ the owner editor, server-rendered in the site's theme (lib/admin-page.mjs + lib/theme.mjs)
auth.mjs /api/auth/* magic-link sign-in → HttpOnly session cookie
admin.mjs /api/admin/* publish copy, media CRUD + order + in-place replace, editors, revisions
lib/config.mjs normalized site.config.mjs + derived names (tables, bucket, cookie, env prefix)
lib/site.mjs the ONLY import path from engine → pack
lib/blocks.mjs renderer building blocks (escaping, meta, CTA, images, lightbox)
lib/sanitize.mjs schema-driven sanitizer (unknown keys dropped, lengths clipped)
lib/db.mjs Supabase REST/Storage + Netlify cache purge; '/{media}' → '/<prefix>_media'
scripts/
gen-migration.mjs the Supabase migration from config (tables, RLS, bucket, seed rows)
gen-netlify-toml.mjs netlify.toml from config (Image CDN allow-list)
make-placeholders.mjs placeholder SVGs in the site palette
render-static.mjs dist-preview/ from defaults for local design review (no DB)
tests/ node --test; runs with no network, no DB
```

- **Rendering.** `GET /` loads the copy document + media rows and returns
finished HTML (all owner text escaped). The CDN caches it 10 minutes under
the slug tag; every admin write purges it, so edits are live immediately.
DB unreachable → 503 with `Retry-After`; no DB configured → defaults + seed
media (local preview).
- **Editing schema.** `site/schema.mjs` drives the admin forms and the
sanitizer. Every publish writes a revision row; the History tab restores any.
- **Themed editor.** `/admin/` is rendered with the site's palette and fonts
(`config.theme` + `config.fonts`); missing surfaces are derived from
`bg`/`ink`/`accent` (`lib/theme.mjs`), and `config.theme.admin` sets the
editor's feel (radii, label case, weights, primary-button fill). One
brand's editor is pill-and-glow, another's is square gold hairlines.
- **Photos.** Browser resizes to ≤2400 px WebP, PUTs straight to a signed
Supabase upload URL, then registers the row (after a HEAD check). Served via
the Netlify Image CDN with responsive `srcset`. Replace swaps a file while
keeping the slot. Seed rows are ordinary rows pointing at site-relative
files (`/img/...`); "Remove all placeholders" clears the ones flagged.
- **Database.** Shared HAND Supabase project, tables `command.<prefix>_*`,
RLS on with no policies (service role only). Storage bucket = slug.
- **Auth.** Magic link (20 min, single use, 5/hour/editor), 30-day HttpOnly
cookie, same-origin check on writes, no editor enumeration. Owners manage
editors; `<PREFIX>_OWNER_EMAILS` auto-provisions owners on first request.
Supabase Auth is deliberately NOT used (no custom SMTP on the project).

## Local preview

```bash
npm test # engine tests, no DB
node scripts/render-static.mjs && python3 -m http.server 8787 -d dist-preview
```

## Deploy

Own Netlify site per client, **not git-linked**; deploy from the CLI from
inside the client dir with the **cryptokoh** token:

```bash
cd clients/<slug>
NETLIFY_AUTH_TOKEN=<cryptokoh token> netlify deploy --prod --build --site <site-id> --message "…"
```

`--skip-functions-cache` when anything under `netlify/` changed. Bump
`assetVersion` in `site.config.mjs` when CSS/JS change (site and admin
assets both carry it).

Env vars on the site: `SUPABASE_URL`, `SUPABASE_SERVICE_ROLE_KEY`,
`RESEND_API_KEY`, `EMAIL_FROM`, `<PREFIX>_SESSION_SECRET`; optional
`<PREFIX>_SITE_NAME`, `<PREFIX>_OWNER_EMAILS`. Netlify injects
`NETLIFY_PURGE_API_TOKEN` + `SITE_ID`. `<PREFIX>` = slug in UPPER_SNAKE
(or `envPrefix` in config).

## Gotchas (learned on ZeroBlur, do not re-learn)

- Supabase signed-upload `data.url` must be **string-concatenated** onto
`/storage/v1`; `new URL(path, base)` with a leading-slash path drops the
prefix → 404 "requested path is invalid".
- Any element with its own `display:` rule ignores the `hidden` attribute;
both stylesheets carry a global `[hidden]{display:none!important}`.
- The generic hero headline is word-split into spans, so grepping the literal
sentence in the HTML fails by design.
- Functions are v2 (`export default (req, context)` + `config.path`); the
admin router parses `/api/admin/<head>/<second>/<third>` by hand.
- New Netlify sites default `built_with_badge_enabled: true`; provision
disables it. Verify the served HTML has no `/.netlify/scripts/hud`.
43 changes: 43 additions & 0 deletions clients/legacy-care-llc/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Legacy Care LLC — owner-editable site. Deployed as its OWN Netlify site
# (project `legacy-care-llc`), decoupled from the handprotocol repo's git auto-deploy.
# Generated by scripts/gen-netlify-toml.mjs from site.config.mjs.
#
# cd clients/legacy-care-llc && netlify deploy --prod --build --site <site-id>
#
# This local toml pins the publish dir and functions dir so a deploy from
# inside the monorepo never inherits the root netlify.toml (the HAND site).
[build]
publish = "public"
command = ""

[functions]
directory = "netlify/functions"
node_bundler = "esbuild"

# Owner uploads live in Supabase Storage; Netlify Image CDN resizes them.
[images]
remote_images = ["https://vconmgerblqbworcqkvr\\.supabase\\.co/storage/v1/object/public/legacy-care-llc/.*"]

[[headers]]
for = "/assets/*"
[headers.values]
Cache-Control = "public, max-age=3600, must-revalidate"

[[headers]]
for = "/img/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"

[[headers]]
for = "/admin/*"
[headers.values]
X-Robots-Tag = "noindex, nofollow"
Cache-Control = "no-store"
X-Frame-Options = "DENY"

[[headers]]
for = "/*"
[headers.values]
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
Permissions-Policy = "camera=(), microphone=(), geolocation=()"
18 changes: 18 additions & 0 deletions clients/legacy-care-llc/netlify/functions/admin-page.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// GET /admin/ — the owner editor, server-rendered with the site's theme.
// (No static public/admin/index.html: a static file would win over this
// route and lose the theme injection.)

import { renderAdminPage } from './lib/admin-page.mjs';

export default async () =>
new Response(renderAdminPage(), {
status: 200,
headers: {
'Content-Type': 'text/html; charset=utf-8',
'Cache-Control': 'no-store',
'X-Robots-Tag': 'noindex, nofollow',
'X-Frame-Options': 'DENY',
},
});

export const config = { path: ['/admin', '/admin/', '/admin/index.html'] };
Loading
Loading