Technology
Architecture, repositories, deployment, and integrations
Last updated: Nov 18, 2026
On This Page
Architecture Overview
Tech Stack
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React + Vite + TypeScript | Customer portal |
| Backend | Supabase (PostgreSQL + Edge Functions) | Database, auth, serverless |
| Hosting | Vercel | Frontend deployment |
| Payments | Stripe | Billing, subscriptions |
| Scheduling | Google Calendar (native) | Booking layer — service account writes to “SV Bookings” |
| CRM | Canonical target workbook | Partnership record; send history in the outreach engine’s log (details) |
| Auth | Supabase Auth (Magic Links) | Passwordless authentication |
| Storage | Supabase Storage | Item photos |
| Error Monitoring | Sentry | Portal error capture (live Jul 11, 2026 — see Integrations) |
Infrastructure
| Service | Details |
|---|---|
| Supabase Project | gmjucacmbrumncfnnhua |
| Supabase URL | https://gmjucacmbrumncfnnhua.supabase.co |
| Region | us-east-1 |
| Database | PostgreSQL 17.6.1 |
| Vercel Team | StorageValet |
Vercel Projects
| Project | URL | Repo |
|---|---|---|
| sv-website | www.mystoragevalet.com | sv-website |
| sv-portal-2026 | portal.mystoragevalet.com (cut over Jun 10, 2026) | sv-portal-2026 |
| sv-portal | sv-portal-gamma.vercel.app (v1 — decommissioned Jun 29, 2026; retired placeholder, repo archived) | sv-portal (archived) |
| sv-wiki | wiki.mystoragevalet.com | sv-wiki |
| sv-metrics | sv-metrics.vercel.app (live since Nov 4, 2026; metrics.mystoragevalet.com is attached on Vercel and resolves once the registrar move below completes) | sv-metrics (StorageValet/sv-metrics, private) |
Domain and DNS
mystoragevalet.com is registered at Squarespace Domains, with its zone on the Google ns-cloud-d1 to d4.googledomains.com nameservers that Squarespace manages. Squarespace requires an emailed one-time code before any DNS edit, even on a signed-in session. On the night of Nov 4, 2026 none of three requested codes arrived, which blocked a DNS change.
Registrar move, in progress since Nov 5, 2026: founder decision to transfer the registration to Vercel, the host of www, portal, wiki and metrics (transfer $12.03 for one year, added to the Mar 3, 2028 expiry). The domain is unlocked (WHOIS status ok) and has no DNSSEC. The zone (29 records: Google Workspace MX and verification, SPF, DMARC, Resend DKIM and return paths, Stripe custom-email-domain DKIM and bounce, and the three Vercel site records) is inventoried in Technology/Reference/dns-zone-mystoragevalet_2026-11-05_v1_claude.md in the business files.
- The zone is copied into Vercel DNS and verified against Vercel’s nameservers.
- Zach starts the transfer at vercel.com with the authorization code.
- The nameservers switch to
ns1.vercel-dns.comandns2.vercel-dns.comonce Vercel is the registrar (or at Squarespace earlier if a code arrives).
Until then DNS is still edited at Squarespace.
Development Tools
| Category | Tools |
|---|---|
| Runtime | Node.js 24.14.0 LTS (Homebrew node@24, native ARM64) — npm 11.11.0 bundled |
| AI Development | Claude Code (native installer — Homebrew cask on Mac Studio, ~/.local/bin on MacBook Air) + plugins |
| Database | Supabase CLI, Supabase MCP |
| Hosting | Vercel CLI |
| Payments | Stripe CLI (STRIPE_API_KEY from sv-env auto-detects live mode; use env -u STRIPE_API_KEY stripe for test mode) |
| Analytics | gcloud CLI (Homebrew cask gcloud-cli) — Application Default Credentials for GA4 MCP |
| Python | pipx (Homebrew formula pipx) — isolated Python app runner for GA4 MCP server |
| Secrets | 1Password CLI |
| Terminal | iTerm2 + Ghostty (Ghostty is the default terminal for Claude Code work) |
| Workflow | Raycast (app switching, shortcuts, clipboard history, custom scripts) |
MCP Servers (Claude Code Integrations)
Claude Code connects to MCP servers across three tiers — user-scoped local processes, Anthropic-managed cloud connectors, and plugin-bundled servers. These give Claude direct, tool-based access to external services without manual API calls or dashboard navigation. The bias is toward Anthropic-managed cloud connectors over self-hosted launchers: fewer moving parts, no local auth to expire, and no per-machine drift. On Jul 26, 2026 the redundant local calendly and resend launchers plus the unused figma connector were removed — Calendly and Resend remain fully available through their managed claude.ai connectors (verified same account, identical Resend domain ID), leaving only two user-scoped MCPs that have no managed equivalent.
User-Scoped MCPs (local processes, available in all Claude Code sessions)
| Server | Tool Prefix | Purpose | Auth Method |
|---|---|---|---|
| Supabase | mcp__supabase__* | Direct database access, schema exploration, SQL execution | OAuth (remote HTTP) |
| GA4 Analytics | mcp__analytics-mcp__* | Query website traffic, run reports, realtime visitors — read-only | Application Default Credentials via gcloud |
Google Workspace moved to Anthropic’s official managed connectors (Gmail / Google Calendar / Google Drive, listed below) on Jun 22, 2026; the former custom mcp__google-workspace__* local MCP and its Google Cloud OAuth app were retired — see the Modernization Watchlist.
Cloud Connectors (managed by Anthropic, available in Claude Code + Desktop + Web)
| Connector | Tool Prefix | Purpose |
|---|---|---|
| Airtable | mcp__claude_ai_Airtable__* | Bases and records; the fallback if the partnership workbook stops being enough |
| Asana | mcp__claude_ai_Asana__* | Connected; holds the design-system finish-line tracker (adopted Oct 19, 2026); agents update its tasks in the same turn a step moves |
| Calendly | mcp__claude_ai_Calendly__* | List/cancel events, view invitees, manage scheduling (replaced the retired local launcher) |
| Canva | mcp__claude_ai_Canva__* | Design creation and management |
| Claude Docs | mcp__claude_ai_Claude_Docs__* | Shared docs on claude.ai, made only when the founder asks for a doc |
| Context7 | mcp__claude_ai_Context7__* | Live API documentation lookup for any library |
| GitHub Integration | none (claude.ai web only) | Anthropic's native GitHub connector for web chats. Claude Code uses the gh CLI for all GitHub work; the custom “GitHub MCP” connector was removed Oct 7, 2026 |
| Gmail | mcp__claude_ai_Gmail__* | Read/draft/search email |
| Google Calendar | mcp__claude_ai_Google_Calendar__* | Event management, free time, scheduling |
| Google Drive | mcp__claude_ai_Google_Drive__* | Read/search/share Drive files (Docs, Sheets, etc.) |
| Notion | mcp__claude_ai_Notion__* | Connected; wiki-to-Notion is undecided and not started |
| Resend | mcp__claude_ai_Resend__* | Send/manage emails, contacts, domains, broadcasts — debug delivery (replaced the retired local launcher) |
| Sentry | mcp__claude_ai_Sentry__* | Error monitoring, issue triage, Seer analysis (v2 portal) |
| Stripe | mcp__claude_ai_Stripe__* | Customers, subscriptions, invoices, products |
| Vercel | mcp__claude_ai_Vercel__* | Deployments, projects, build logs |
The Zapier connector (mcp__claude_ai_Zapier__*) was disconnected Jun 2026 — the paid annual plan went essentially unused (modern Claude models cover the automation it once bridged) and lapsed to free Jun 20, 2026. Being an account-level claude.ai connector, removing it applies across all machines automatically (unlike per-machine local skills).
Removed Sep 23, 2026: Clinical Trials, Dropbox, Wispr Flow and Vibe Prospecting connectors (unused), plus 13 disabled Claude Code plugins. syncClaudeAiPlugins: false keeps claude.ai plugins from syncing back into Claude Code. The Calendly connector stays until the partnerships page moves to Google Calendar (sv-website#30).
Plugin MCPs (bundled with Claude Code plugins)
The context7 and supabase plugins each ship a bundled MCP, but both are shadowed and add no separate connection: Context7 is now reached through the managed claude.ai Context7 cloud connector, and the supabase plugin’s MCP is shadowed by the user-scoped supabase entry (same URL) — the plugins are kept for their skills, not a redundant MCP. Per the Supabase guardrail, never remove the user-scoped supabase entry from ~/.claude.json; removing it deletes the only working Supabase MCP (the plugin does not transparently take over).
Related: Claude in Chrome (not registered as an MCP)
Browser automation tools (mcp__claude-in-chrome__*) are provided by the Claude in Chrome browser extension, which speaks Claude Code’s extension protocol — it does not appear in claude mcp list. Used for screenshots, form filling, navigation, and reading web pages.
MCP Launcher Script Pattern
One MCP server (GA4 Analytics) uses a launcher script to inject credentials at runtime, avoiding plaintext on disk:
# Pattern: ~/Documents/storagevalet/Technology/Utility_Scripts/{name}-mcp-launcher.sh
# The script sets the credential path, then exec's the MCP server process.
# GA4: ga4-mcp-launcher.sh → sets ADC path → pipx run analytics-mcp
#
# (Resend retired its launcher Jul 8, 2026; Calendly's local launcher was
# removed Jul 26, 2026 — both now use managed claude.ai connectors.)
GA4 MCP Infrastructure
The GA4 Analytics MCP (mcp__analytics-mcp__*) provides read-only access to GA4 reports. Requires Google Cloud project storage-valet-analytics with ADC credentials. Read-only — cannot inspect admin settings (traffic rules, data filters). Full details →
Claude Code Sessions: Model, Effort, Compaction
Adopted Sep 23, 2026 (Mac Studio; settings are per-machine in ~/.claude/settings.json). The compaction rules below are the In-Session Compaction SOP (short name: Compacting SOP), which replaced the checkpoint protocol. Printable copy: Technology/Reference/claude-compaction-sop_2026-09-23.md.
- Model routing (founder ruling Oct 25, 2026, amended Oct 26): use the cheapest model that does routine work well, and the most capable model for business-critical work. Sessions: Sonnet 5.5 for routine work, Opus 5.5 for deep, strategic, production or business-critical work, Fable 5.1 recommended for the hardest business-critical work (Zach switches); Claude opens with a one-line Model check when the session model does not fit the work, in either direction. Subagents pass a bare alias plus an
effort:haiku/lowfor searches, syncs, renames, captures and summaries;sonnet/medium(the default) for routine code, builds from a spec, fix rounds, copy, docs and QA;opus/highfor the core work of anything business-critical, architecture, money/RLS/migration/auth code, security and the refuter of a production ship;fablefor the hardest, highest-stakes piece of business-critical work (a lead assigns it without asking).CLAUDE_CODE_SUBAGENT_MODELandCLAUDE_CODE_WORKFLOW_SUBAGENT_MODELaresonnetin~/.claude/settings.json, so an agent with no model runs on Sonnet. Older model versions cost more and do worse; never use them. Fix loops stop after 2 rounds; workflows need Zach’s opt-in plus at least 3 independent tracks, 10 agents or fewer. Why: in the week of Oct 19, 98% of tokens were Opus and 85% went to subagents and workflows. - Spend up when it matters (Zach, Oct 26, 2026): “when the project is of high importance, or considered business critical, or would benefit from a more token-expensive but also more capable and advanced model, we absolutely 100% should use those models.” Savings come from routine work only. Business-critical: money, billing, Stripe or pricing; customer data, RLS, migrations or auth; security; production incidents; legal, entity or DNS work; hard-to-reverse architecture; design-system or identity sign-off; customer-facing launches; material going to real prospects or partners. Its plan, build and review start on Opus (never a cheaper first attempt),
xhighormaxwhere correctness is the whole point, Fable for the hardest piece; its chores (search, inventory, capture, sync) still go to Haiku or Sonnet. The test: would a wrong or mediocre result cost money, a customer, a partner or a week of rework? If yes, spend up. - Effort:
highfor deep sessions,mediumfor routine;xhighormaxfor business-critical correctness or when Zach asks, not for routine work (replaces the Oct 11 ruling). - Local model:
sv-local "instruction" < input(canonicalTechnology/Shell/sv-local, installed in~/.local/bin) runs Ollamagemma4:26bfor free text jobs: summaries, sorting, internal first drafts. Never for code, secrets or customer data. Claude Code itself is not run on the local model (connectors drop; the auto-mode safety check would run on Gemma). - Compaction in place: no custom compaction window (founder ruling Oct 11, 2026): sessions auto-compact at the model default (~967K on 1M-context models). Never re-add
autoCompactWindow, run/autocompact <n>, or setCLAUDE_AUTOCOMPACT_PCT_OVERRIDE. - Compact tip: agents cannot run
/compact; Zach runs it by hand. At a clean break (nothing in flight, results committed or recorded) in a large session, the agent ends its response with one line,Good point to /compact: <why>.Never mid-task and never every turn; before a critical sequence in a large session, give the tip rather than holding through it. Every compact tip ships a clipboard snippet (founder ruling Oct 19, 2026): custom compact instructions by default (the live state, IDs, pending rulings and next action; text only, never a leading/compact, so Zach types/compact, a space, then pastes), or the reorientation message to paste after compaction when the default summary already covers it. The agent copies it withpbcopythe same turn and names its opening words plus line and byte count. - After compaction: a SessionStart(
compact) hook,compact-state.sh, re-injects live git state; the global CLAUDE.md Compact instructions section says what the summary must keep. - Compaction hold: before critical work, and from the start of any incident or deep-troubleshooting session,
~/.claude/hooks/compact-hold.sh on "<what>"makes a PreCompact(auto) hook block auto-compaction for that session;offreleases it once work is committed. 4-hour expiry; the status line shows ⏸ HOLD. - Topic switch: start fresh (
/clearor a new session) once state is recorded; the agent’s tip readsGood point to /clear: <why>.with a reorientation snippet (Oct 25, 2026).
Hook sources live in Technology/Reference/claude-hooks/ (install by cp, never ln). The old /checkpoint + /reorient restart protocol is retired. sv-audit flags any drift in this setup.
Claude Code Skills
Skills are packaged units of Storage Valet expertise that Claude Code auto-discovers and loads on demand — each is a single SKILL.md file (occasionally plus support files) with YAML frontmatter describing when it applies. They inject SV-specific context (brand rules, pricing, promo codes, pipeline structure, architecture constraints) so Claude does not have to re-learn the business each session. A skill can be triggered automatically when its description matches the task, or invoked explicitly as /skill-name.
Storage Valet runs 13 shared skills (including sv-files, which acts on local files and Finder tags) and the Claude-Code-only sv-cto pair. All 13 shared skills are uploaded and current on claude.ai since Oct 19, 2026. On Oct 7, 2026 the original 12 were refreshed to current Anthropic authoring practice and current facts (the design system, the standard offer, Return Scheduled labels), uploaded to claude.ai, and the 20 older web-only Storage Valet skills were switched off there (kept in version history, not deleted).
Current library
| Area | Skills |
|---|---|
| Technical / portal | sv-portal-dev, sv-promo-pages |
| Brand & design | sv-brand-voice, sv-visual-design, sv-web-design, sv-email-design, sv-image-gen |
| Growth | sv-growth-experiments, sv-referral-program |
| Files | sv-files |
| General (non-SV, upstream emilkowalski/skills and Leonxlnx/taste-skill) | design-taste-frontend, emil-design-eng, review-animations |
| Claude Code only | sv-cto, sv-cto-overnight |
Partnership outreach has no skill: it resumes from Technology/Reference/Session-Starters/START-sales-engine-v2.txt. The retired web-only skills (copywriting, CRO, SEO, social, sales email, CRM pipeline, ads, finance, ops, legal, customer comms) stay switched off on claude.ai; their zips remain in Technology/claude-skills/ as history only.
Where skills live — four surfaces, one source of truth (updated Oct 7, 2026)
Skills exist in four places that do not stay in step on their own. A fork here is silent: an agent simply acts on stale facts without erroring.
| Surface | Path | Role |
|---|---|---|
| Authoritative | ~/.claude/skills/ | 15 real directories: the 13 shared skills and the Claude-Code-only sv-cto pair. Claude Code reads this. Edit here. |
| Codex read path | ~/.agents/skills/ | 13 symlinks → ~/.claude/skills, so Codex follows every edit automatically. |
| claude.ai upload source | Technology/claude-skills/*.zip | One zip per skill, rebuilt after every edit (cd ~/.claude/skills && zip -q -r -X <zip> <name> -x '*.DS_Store') and uploaded at Settings → Skills → Add → Upload skill. Uploading a skill with an existing name saves a new version; earlier versions stay in its history. |
| claude.ai sync | ~/.claude/skills/synced/ | The skills enabled on claude.ai, loaded into Claude Code (syncClaudeAiSkills, on by default since 2.1.275) as anthropic-skills:<name>. Re-upload after any local edit or the synced copy goes stale; /update Part 3 reports any copy that has drifted (all 13 were re-uploaded and current on Oct 19, 2026). |
Codex scans ~/.agents/skills/ (the documented path) and also the deprecated ~/.codex/skills/ (codex-rs host_roots.rs). ~/.codex/skills/ holds Codex’s own native skills; put SV skills only in ~/.agents/skills/, since a copy in both is discovered twice. Reference incident: the ~/.agents copy of sv-portal-dev told Codex for months that decommissioned v1 sv-portal was “the only ops/admin surface” and “a rollback target”, and lacked the DB-vs-UI vocabulary section.
After editing any skill, re-sync its zip (the symlinks handle Codex automatically):
cd ~/.claude/skills && zip -q -r -X ~/Documents/storagevalet/Technology/claude-skills/<name>.zip <name> -x '*.DS_Store'
Authoring rules (convergent across Anthropic’s docs, the agentskills.io open spec, and OpenAI’s own skill-creator): SKILL.md body under 500 lines — it reloads into context every turn it fires; detail belongs in bundled reference files one level deep. Frontmatter name + description only if the skill is shared with Codex, which forbids every other field (Claude Code’s ~14 extended fields are not portable). And less prescriptive procedure for stronger models, not more — Anthropic’s “degrees of freedom” rule; the default assumption is that the model is already smart, so only add what it does not already know. As of Sep 6, 2026 no vendor has published Opus-5- or GPT-6-Astra-specific skill guidance.
claude.ai upload behaviour: uploading a same-named skill replaces it in place (the confirmation shows a line diff) — no deletion, no duplicates. Custom skills do not sync between the API and claude.ai, so this stays manual browser work.
Tech-Stack Ledger & Modernization Watchlist
Last modernization review: Nov 18, 2026. This is the anchor for the weekly modernization review in the ;update daily-maintenance prompt (Part 5) and the [MODERNIZATION DRIFT] check in sv-audit. Its job: catch a custom/DIY component that an official option has since superseded — instead of letting it run unmaintained for months (as the Google Workspace custom MCP did before this review existed). Nov 18 findings: no changes requiring SV action. Node 24.22.3 (our version) is the Nov 11 security release (HTTP/2, TLS fixes); we are current. Supabase CLI v3.0 (Nov 2) and v3.1 are out and we run 3.2.0; v3 removed deprecated commands and the separate Go binary, hosted projects unaffected. Stripe: newest stable is 2026-09-30.endive, nothing new since; SV stays on 2026-08-26.dahlia. Vercel: no CLI deprecations found since Nov 4 (v66 prints tab-separated output off a TTY). Claude Code connectors negotiate MCP protocol 2026-07-28 by default (Oct 9). Google runs a hosted Analytics Data API MCP endpoint (analyticsdata.googleapis.com/mcp/v1), unconfirmed as officially documented; analytics-mcp stays until Google documents it. Nov 4 findings: none recorded. Oct 24 findings: no changes requiring SV action. Stripe published API version 2026-09-30.endive (breaking: payment_method_types removed from Checkout and PaymentIntents, billing cycle anchor format unified); SV stays on 2026-08-26.dahlia, so no change until we choose to upgrade. Supabase announced removal of four CBC-mode TLS 1.2 ciphers on HTTP APIs no earlier than Nov 10, 2026 (negligible traffic; affected owners are contacted directly) and deprecated the @supabase/server framework adapters (removal Dec 1, 2026; SV does not use them). Vercel Node.js 20 deprecation took effect Oct 1; SV is on Node 24, unaffected. No official hosted GA4 MCP yet (analytics-mcp stays). Oct 15 findings: no changes impacting SV; Node 24 LTS enters maintenance Oct 20, 2026 (EOL Apr 30, 2028), no action; still no official GA4 remote connector (analytics-mcp stays). Prior (Oct 5) findings: no changes impacting SV since Sep 28. Vercel Node.js 20 deprecation (Oct 1) does not affect us (vercel project ls --update-required returns none; local Node 24 LTS). Supabase CLI default schema diffing is now pg-delta (v2.115.0); Stripe API version is 2026-08-26.dahlia. Prior review (Sep 28): no changes since Sep 21. Supabase, Stripe, Vercel, Node.js, and Anthropic have no breaking changes impacting SV. Google Workspace official connectors remain current. analytics-mcp continues as the only tracked custom/DIY item; no official GA4 connector from Anthropic or Google Cloud exists.
The watchlist tracks every self-hosted / custom integration that should be re-evaluated whenever the vendor ships an official, managed, or better-supported alternative. The Anthropic-managed claude.ai * cloud connectors are not on the watchlist — Anthropic maintains them.
| Component | Type | Why custom / what to watch for | Last reviewed |
|---|---|---|---|
GA4 Analytics MCP (mcp__analytics-mcp__*) | Custom — pipx + ADC | Google’s official GA4 MCP (googleanalytics/google-analytics-mcp) is still self-hosted/local + labeled experimental — no managed remote connector, so no improvement over the current launcher. No change; keep watching for a hosted version. (Jul 15 re-check: still v0.6.0, still local-only; Google Cloud’s managed-MCP directory does not list GA4.) Jul 24 re-check: still v0.6.0, still local-only — no change. Aug 18 re-check: upstream released v0.7.0 (Jul 29 — dependency bumps + a CI security fix only), still local-only with no hosted/remote mode; Google Cloud’s managed-MCP directory still does not list GA4 (checked Aug 17). No managed replacement — keep the launcher; an optional routine pipx upgrade to v0.7.0 is available but low-value. Aug 31 re-check: v0.7.0 is still the latest upstream release (no release since Jul 29), still local-only with no hosted/remote mode, and Anthropic’s connectors directory still ships no Google Analytics/GA4 connector. No change. Sep 6 re-check: still v0.7.0 (PyPI analytics-mcp, last upload Jul 29, 2026) — local-only, no hosted/remote mode, and neither Anthropic’s connectors directory nor Google Cloud’s managed-MCP directory lists GA4. No managed replacement exists. New signal this review: the user-ADC credential expired again (caught Sep 6 — the MCP reported “Connected” while every query failed 503 “Reauthentication is needed”). That recurring expiry, not the package version, is the real cost of this component; the durable fix remains a custom OAuth client ID for ADC (--client-id-file) — a service-account key is blocked by org policy constraints/iam.disableServiceAccountKeyCreation, which must stay enabled. Sep 14 re-check: still v0.7.0 (PyPI, last upload Jul 29, 2026) — no new release, no hosted/remote mode, no managed connector in either Anthropic’s or Google Cloud’s directories. No change. | Sep 14, 2026 |
Studio traffic snapshot job (com.storagevalet.metrics-snapshot) | Custom — LaunchAgent + Vercel CLI query API | Vercel Web Analytics is read through the Vercel CLI because the Vercel connector’s analytics tools cannot read it for sv-website; GA4 is tried once per run. The job posts counts-only snapshots to the metrics-briefing function (see Metrics Briefing). A connector or Supabase-side route to Web Analytics would replace it. | Nov 3, 2026 (added) |
Retired (reference cases):
- Resend MCP — migrated Jul 8, 2026. The custom local launcher (
resend-mcp-launcher.sh→npx resend-mcp, 1Password-backed API key) was replaced by Resend’s official remote connector (https://mcp.resend.com/mcp, Streamable HTTP + OAuth, 85 tools). Registered user-scoped in~/.claude.json, authorized via/mcpbrowser OAuth, verified end-to-end (livelist-domainsreturnedmystoragevalet.com, verified/sending-enabled); the launcher script was deleted. The 1Password Resend API key stays — it still backs the SupabaseRESEND_API_KEYsecret for thesend-emailedge function, which is independent of the MCP. (Per-machine: the MacBook Air needs the same/mcp→ resend authorize when next used.) (De-duplicated as of Aug 31, 2026: the Anthropic-managedclaude.ai Resendconnector is now the single live path — the user-scopedresendentry is gone from~/.claude.json, whose only remaining user-scoped servers aresupabase,analytics-mcp, andplaywright. Both pointed atmcp.resend.com, so nothing was lost.) - Playwright MCP — retired Sep 7, 2026. Added Jul 2026 to A/B against Claude-in-Chrome on token cost. It never actually ran: its browser binaries were never installed (
~/Library/Caches/ms-playwrightheld no Chromium), yetclaude mcp listreported “✓ Connected” the whole time — which is exactly why it went unnoticed for ~7 weeks. Lesson: “Connected” in the MCP list only means the launcher starts, not that the tool works. Removed from both~/.claude.jsonand~/.codex/config.toml; the dead cache was deleted. Claude-in-Chrome is the browser-automation path (it drove a 32-skill claude.ai upload run on Sep 6, 2026). Do not re-add without a concrete reason. - Google Workspace custom MCP — retired Jun 22, 2026. (
@alanse/mcp-server-google-workspace+ Google Cloud appclaude-mcp-485220) was replaced by Anthropic’s official Gmail / Calendar / Drive connectors. It had run unmaintained for months after the official connectors shipped (Feb 2026); its Google Cloud app sat in “Testing” mode, so the OAuth token expired every 7 days and a failed re-auth popup fired on nearly every Claude Code launch. This is exactly the drift the watchlist exists to prevent.
Open advisory: @supabase/supabase-js will require TypeScript 5.0+ (announced Jul 10, 2026; effective in a minor release on or after Jan 2027). We are on ^2.49 and already past TS 5.0, so the caret absorbs it. No action.
Superseded reviews: the Jul 15, Aug 31, Sep 6 and Sep 14, 2026 reviews found nothing actionable. Their items (the Vercel Node 20 cutoff on Oct 1, the Supabase logs.all removal on Sep 23, the Stripe API version pins) closed with no SV impact, and the Oct 15 review above supersedes them. Their detail is in git history.
Review cadence: Part 5 of ;update runs weekly (it skips if the date above is < 7 days old). Each review web-searches vendor changelogs (Anthropic, Google, Supabase, Stripe, Vercel, Node LTS) for replacements / deprecations / EOL, outputs a recommendations table (no auto-changes), and bumps the “Last modernization review” date above.
Codex ↔ Claude Code Collaboration (GPT‑6 Astra + Claude Opus 5.5 / Fable 5.1)
This is the standard, canonical way Storage Valet uses OpenAI Codex: as a collaborator inside Claude Code, driven from the terminal. Claude Code (Claude Opus 5.5 / Fable 5.1) is the orchestrator and owns the final result; it delegates specific work to Codex (GPT‑6 Astra) through the official codex@openai-codex plugin. Installed on Mac Studio May 31, 2026.
For future AI agents — read this first
If you are Claude Code (Claude Opus 5.5 / Fable 5.1): you may hand work to Codex for an independent second opinion, adversarial code review, rescue debugging, or a parallel background task. Use the codex-rescue subagent or the /codex:rescue command. You stay the orchestrator and integrate whatever Codex returns.
If you are Codex (GPT‑6 Astra): you are being called as a delegate from within a Claude Code session. Return focused diagnosis or implementation; Claude reconciles it and presents the result to Zach.
The terminal is irrelevant. This is an in-process CLI plugin, not a screen reader — it behaves identically in Ghostty (the default terminal for SV work) and iTerm2. Never assume a specific terminal is required for Codex collaboration.
How to invoke
| Method | Use for |
|---|---|
/codex:rescue | Explicitly hand a problem to Codex — debugging, a fix request, or deeper root-cause investigation |
codex-rescue subagent | Claude invokes Codex proactively when stuck or when a second implementation/diagnosis pass adds value |
| Natural language | “Get a Codex second opinion” / “Have Codex review this” — Claude routes to the subagent |
/codex:setup | Verify the runtime is ready. --enable-review-gate forces a Codex review before each stop (off by default) |
What Codex contributes
- Rescue mode — independent debugging of a stuck problem
- Adversarial code review — a different model architecture examining the same code
- Second opinions — cross-model validation of an approach before committing to it
- Parallel work — background Codex tasks while Claude keeps assisting
Setup & key facts
| Marketplace | openai/codex-plugin-cc (GitHub-verified OpenAI org) |
| Plugin | codex@openai-codex v1.0.4 |
| Runtime | Local Codex CLI, authenticated via ChatGPT login; the shared runtime starts on demand on the first review/task |
| Data boundary | Code and context are sent to OpenAI whenever Codex is invoked. Approved for SV code. Never route secrets (op / .sv-session values) through it. |
| Machines | Installed on Mac Studio. Plugins do not sync between machines — the MacBook Air needs the same install before Codex is available there. |
Install (per machine) — run these inside Claude Code:
/plugin marketplace add openai/codex-plugin-cc /plugin install codex@openai-codex /reload-plugins /codex:setup # wires to the local Codex CLI; sign in with the ChatGPT account if prompted
Do not confuse with ChatGPT “Work with Apps”
That is a separate, unrelated feature where the ChatGPT desktop app passively reads the terminal screen via macOS Accessibility. It supports iTerm2 / Terminal / Warp but not Ghostty, and is not how SV collaborates on code. The Codex plugin above is the chosen path precisely because it is terminal-agnostic and makes Codex an active participant rather than a screen-watcher — which is what lets Ghostty stay the default terminal.
The Friday GPT batch (Codex CLI swarm on the ChatGPT Pro plan)
Since Nov 6, 2026. Every Friday morning, before the ChatGPT Pro weekly agentic reset (about 9:50 AM ET on Nov 6; the exact time is read from the Codex session log), the CTO session launches a swarm of unattended codex exec jobs so the plan’s unused weekly budget goes into design, image generation, copy and research for Storage Valet. Founder authorization: Zach, Nov 6, 2026, “execute the deployment, management, and overall orchestration of ChatGPT agents … with my approval and authorization”. The practice lives in the sv-gpt-batch skill (launch form, folder layout, brief template, the never-list, the verification matrix, usage read-back).
- How it runs. One batch root under
Brand/Design-Exploration/<date>-gpt-batch-<name>/, one folder per job (BRIEF.md,inputs/,out/, logs). Codex 0.166.0 (gpt-6-astra) is launched with a clean environment (env -iplusZDOTDIRpointing at an empty folder, so the shell’s secrets never reach it),--sandbox workspace-write, an explicit effort (xhighdesign,hightext), a perl alarm instead oftimeout, and< /dev/null. Code jobs get a lead-made git worktree; Codex has no git, network or browser, so the lead commits, and research goes to Claude workers with web access. - First run, Nov 6, 2026: 19 jobs. Two 36-icon families (monoline and solid), 26 seasonal cart-mark overlays, terracotta bin renders from the founder’s real totes, 36 interior and 29 street scenes, 9 infographics, the per-platform profile and favicon set, photo-plate templates and 10 story revisions, a design-system audit and studio guide, the December Instagram round, 15 partner outreach drafts, the Google Business Profile pack, the bins business plan, a partner one-pager, a landing-copy proposal, the rollover copy pack, the FAQ rewrite (sv-website #129, live the same morning) and the /join conversion layout (#130). Everything visual was filed in the Design Studio drive (shared with the social-media manager) and the founder’s picks went to the Founder Decisions page.
- Lessons now in the skill. Write every brief in one shell call before launching (a single approval prompt the founder could not see from his phone cost 24 minutes); Codex’s own QA is thorough but the lead re-verifies at full size; brand facts ride in a shared
BRAND-RULES.md; no brand prefix in any file or folder name (founder ruling Nov 6, 2026).
Repository Structure
Integrated System (portal + shared backend)
These repos share the common Supabase backend (project gmjucacmbrumncfnnhua) and must be considered together:
~/code/sv-portal-2026 # LIVE customer portal (Vite 8 / React 19) — native Google Calendar; cut over Jun 10, 2026 ~/code/sv-portal # v1 portal (Vite 5 / React 18) — DECOMMISSIONED Jun 29, 2026 (frontend retired, repo archived) ~/code/sv-edge # Supabase Edge Functions (Deno/TypeScript) — serves the portal and website ~/code/sv-db # Database migrations (SQL) — the one production database ~/code/sv-docs # Ops scripts, runbooks, archives (orchestrates all 7 repos)
Cutover executed Jun 10, 2026 (~20:33 ET): portal.mystoragevalet.com now serves the sv-portal-2026 codebase — the Vercel domain was re-pointed per DEC-020, with the founder waiving the remaining checklist items (signup E2E, Manage-Billing verify, $2,000-cap verify; now post-flip tasks). The first live-domain booking was verified end-to-end the same evening: DB custody + audit trail + Google Calendar event. v1 (sv-portal) was decommissioned Jun 29, 2026 (DEC-021): frontend retired, v1-only edge functions + RPCs + views removed, repo archived. Ops now lives in the v2 portal’s staff /ops surface (W1.4).
The portal runs against this Supabase project. The v2 backend (additive) was merged and applied to prod on Jun 9, 2026; native Google Calendar scheduling is the live booking layer on the customer domain (DEC-0001 executed): service account sv-calendar@sv-scheduling.iam.gserviceaccount.com writes to the founder-owned “SV Bookings” calendar (secrets GOOGLE_SERVICE_ACCOUNT_JSON + GOOGLE_CALENDAR_ID set in Supabase). Availability comes from get-available-slots (plan service windows ∩ 48-hour lead ∩ calendar FreeBusy), with bookings available up to 18 months out (the picker pages one month at a time; the horizon is enforced in the database, SV_HORIZON_EXCEEDED). Calendly remains only for partnership-meeting links and the calendly-webhook function, until Calendly retires (sv-website#30).
Marketing & Docs Sites
| Repo | Purpose | URL |
|---|---|---|
sv-website | Marketing site, signup flow, 62 promo pages | www.mystoragevalet.com |
sv-wiki | Internal docs (AI + human reference) | wiki.mystoragevalet.com |
sv-metrics | Metrics dashboard: the latest stored briefing report plus a Live preview (Vite, React 19, Tailwind v4, shadcn/ui; phone-first) | metrics.mystoragevalet.com |
sv-website is not standalone — its signup/partnership forms call three sv-edge functions (signup-webhook, create-checkout-trial, partnership-inquiry) on the shared Supabase project, so changing those contracts breaks the site. Only sv-wiki is fully standalone (no integrations).
Website menus (Sep 29, 2026): the main-site pages (home, FAQ, Partnerships, Testimonials, Terms, Privacy) show the same menu on phone and laptop, with Partnerships in both (sv-website #46; the laptop menu had been copied from an older kit without it). Promo and landing pages keep a deliberately short menu on both: How it works, Membership, Sign in, Become a member. Promo pages say “bring it back when you schedule a return” (never “whenever you need it”), and every promo page and the homepage carry the checked risk line “$0 today. Cancel within your first 30 days and your membership costs nothing.” (#47).
Customer Portal (sv-portal-2026 — LIVE)
Overview
- Live since: Jun 10, 2026 — portal.mystoragevalet.com serves the
sv-portal-2026codebase (DEC-020 domain re-point) - Tech: Vite 8 + React 19 + TypeScript (strict) + Tailwind 4 (palette status: design-system status by surface)
- Theme: follows the device by default (founder ruling Oct 28, 2026, sv-portal-2026 #94,
4ba064e, replacing “Dark by default” of Oct 19): a member who has never chosen a theme gets System, which follows the device’s light or dark setting. A stored System, Light or Dark choice is kept, and members change it in Account › Appearance. The rule lives insrc/lib/themePref.ts, mirrored by the pre-paint script inindex.html(see CSP theme-script hash). - Item photos: every item photo renders through the shared
PhotoThumbframe (square or 4:3, cover from the centre); the item page shows the whole photo (sv-portal-2026 #95,3c26362). - Visual gate (required):
npm run qa:visualruns every member route and the booking sheet at 440 and 1440 pixels wide, light and dark, writes contact sheets, and fails on overflow, an item photo outside the frame or a console error. It must be run, and its contact sheets looked at, before any UI merge (sv-portal-2026 #95). - Auth: Supabase magic links (email-based, no passwords)
- Write path:
fn_v2_*SECURITY DEFINER RPCs only (sole exception: two-step photo upload) - Scheduling: native Google Calendar — availability via
get-available-slots; bookings up to 18 months out; planned follow-up visits (booking_planned_items) - State: TanStack Query for server state; React Router 7
Customer Surfaces (6)
| Surface | Purpose |
|---|---|
| Login | Magic link authentication |
| Dashboard | Inventory overview + booking management |
| Items + Add Item | Item catalog; photos-first item creation |
| Item Detail | Single-item view — schedule, reschedule, revert, remove |
| Booking | Items-first scheduling flow (native Google Calendar slots) |
| Account | Profile, billing, settings |
Per-item remove on Manage (F5, Jul 2026): the Dashboard Manage view exposes a per-item “Cancel Pickup/Delivery” action that removes a single item from a pending visit via the same revert RPC path as Item Detail; removing the last active item from a visit cancels the visit itself.
Staff operations live in the v2 portal’s /ops surface (shipped W1.4) — staff-gated (is_staff()) and AAL2-stepped-up, reading fn_v2_ops_queue / fn_v2_ops_booking_detail and acting through the staff edge wrappers (complete-service, staff-booking-cancel, staff-booking-reschedule, staff-item-revert).
Bring a friend (live Sep 28, 2026): every running membership (trialing or active) sees the referral card on Home, on Account under Membership, and in the desktop sidebar, with Copy code, Copy link and Share invite (sv-portal-2026 #24). The founder opened it on Sep 28, 2026; #36 set REFERRAL_RELAUNCH_LIVE on. Program rules: Customer Experience > Member referral program.
2026-09-28 polish pass
A pass over every customer flow in the portal, merged and live through the evening of Sep 28, 2026 (sv-portal-2026 PRs #22 to #48, the last of them merged after midnight on Sep 29). What members now see:
- Items: four visible filter toggles under “Filter items” (At Home, In Storage, Scheduled, All) replace the dropdown, and All groups items by state with a count for each. Back from an item returns to the same tile and scroll position. Search matches an item’s name, description, QR code and keywords. Every empty or load-failure state offers a next step, and the first tiles load straight away.
- Adding and editing items: errors stay inline in the dialog and name the concierge; unsaved work asks before it is discarded; the keyboard’s Next key moves between fields; Edit details saves exactly what it shows, including cleared fields, with size errors shown inline.
- Booking: Choose items has Select all for each group and a counted button, “Choose a window for N items”. On a visit with both pickups and returns, the review names each, and confirming lands on the new visit. The window picker jumps to the next open day. Each visit card carries Add to calendar (a Google Calendar link and an .ics file) and a concierge link whose subject names the window. Cancel visit is a visible button with a confirmation step. Schedule offers returns as well as pickups, and the Android Back button closes open sheets.
- Account: the payment action sits directly under the payment notice (past due, or no card on file), save errors stay inline, and when Account or the coverage figures fail to load the message says what is true and offers Try again plus a separate Contact your concierge action (#48). Past the included coverage or space allowance the meters stop repeating the figure (#48). Stripe
unpaidis not yet handled like past due: sv-portal-2026 issue #57. The storage-space meter also appears on Home as a quiet row that links to Account. - Photos: photo links refresh at 50 minutes, and once more if a photo fails to load, so item tiles never go blank.
- Copy: no em dashes anywhere in the product.
2026-09-29 required item measurements
Since Sep 29, 2026 every item needs its length, width, height, weight and estimated value (sv-portal-2026 PR #58, main 4599964). Add an item and Edit details ask for any blank one before Save and never send a clear; older items keep opening, scheduling and returning. The matching database rule (a trigger on public.items plus fn_v2_item_create raising SV_MEASUREMENTS_REQUIRED with the missing columns in its detail) shipped in sv-db PR #19 as migration 20260929055932_item_measurements_required and is live in production since Oct 11, 2026 (applied with sv-db #24, merge 184cebc). Why it matters: the member's space ledger and per-visit truck volume both read items.cubic_feet, which stays null until all three dimensions exist, so an unmeasured item counted as zero space.
2026-09-29 fewer taps
Live since the evening of Sep 29, 2026 (sv-portal-2026 PR #63, main 7d8b305): the window picker opens on the first month that has an open day (the 48-hour lead time makes the current month empty at month end), so the “Next open day” tap is no longer needed; Add an item runs Photos, Name, size and weight, value, Keywords, with Description folded into a closed “Add a description (optional)” disclosure so the phone’s Next key goes from the name straight to Length; the photo help is one line (“Photograph your item. Up to 5, private to you.”); and Enter, or the phone’s Next or Done key, never saves an item: from Keywords it moves focus to Save item, and a held key is ignored. Measurements stay required. A three-card welcome tour and one-tap container sizes (Bin 18×12×10, Tote 24×16×12, Crate 30×20×16 in) are built on a preview (PR #64) and wait for the founder’s word.
2026-10-01 booking-flow fixes
Live since Oct 1, 2026: the booking sheet fits the phone screen (sv-portal-2026 PR #68); Schedule offers a reschedule path and lets a member book a pickup for a single item (PR #69); and the booking_confirmed and booking_rescheduled emails deep-link to /schedule?booking=<id> so the member lands on that visit (sv-edge PR #28; edge functions v2-booking-confirm v22, v2-booking-reschedule v19, staff-booking-reschedule v8).
2026-10-05 Return Scheduled
Founder card M7, shipped the evening of Oct 5, 2026: an item on a scheduled return reads “Return Scheduled” everywhere a member sees it. The founder applied sv-db migration 20261001034859_return_scheduled_label (sv-db PR #23) at 22:44, and the security baseline was re-captured to include the Sep 28 rollover functions. The send-email templates carry the new label (sv-edge PR #27). The portal half is sv-portal-2026 PR #67 (status chip, item state, Items page and visit labels), which closes portal issue #53. Database vocabulary (schedule_delivery, redelivery) is unchanged. Label rules: Brand Identity.
2026-10-07 CSP theme-script hash
Live since the evening of Oct 7, 2026 (sv-portal-2026 PR #73, main 81263f7, header confirmed on the live portal). The portal sends a Content-Security-Policy-Report-Only header, set in the portal repo’s vercel.json: it reports violations and blocks nothing. Its script-src now allows the inline theme bootstrap script in index.html (it picks light or dark before first paint) by that script’s sha256 hash. The hash and the script body are coupled: any edit to the script changes its hash, so the same commit must update the hash in vercel.json, or every page load reports again (a comment above the script says so). Reports go to Sentry, project sv-portal-2026. The inline-script report (SV-PORTAL-2026-C, 20 events) stopped with this change and is resolved. Reports naming vercel.live (SV-PORTAL-2026-9, A and B) come from the Vercel Toolbar, which loads only in team members’ browsers; the policy leaves it out on purpose, and those notices are resolved too. One more inline-script report arrived on Oct 10, 2026 at 10:16 PM EDT from a Mac browser whose reported policy still lacked the hash, so that page was a copy cached before this change; the live header carried the hash at the same hour (curl), and the issue was resolved again with that note. A future report whose policy contains the hash would mean the hash no longer matches index.html.
2026-10-11 day strip and add to a booked visit
Founder cards B2 and B1 (both picked A on Oct 11, 2026), live the same morning and confirmed in the live portal bundle. Day strip (sv-portal-2026 PR #70, merge dbfb7e8): the booking sheet shows the next open days in one row instead of the month grid, so the time windows stay above the footer at iPhone heights; “More dates” opens the full month grid, and “Next open day” sits on an empty grid month. Add to a booked visit (PR #74, merge 5f87913): the item page and Choose items offer “Add to your <window> visit” for the earliest confirmed visit at least 48 hours out; it calls fn_v2_booking_attach_items in edit mode with the visit’s current items plus the new ones (the RPC replaces the whole item set), never calls confirm and never draws a service. Known gaps recorded in PR #74: the edit RPC skips SV_BOOKING_FREEZE (only v2-booking-confirm honors it), the Google Calendar event description is not refreshed after an add (load the truck from /ops, never from the SV Bookings event), and the database has no edit-mode lead-time check or add-only mode. A live test on a real booked visit is still open, and service-rollover PR #20 needs a manual re-seat on this main (six conflicting files).
Add to a booked visit follow-ups (sv-portal-2026 PR #76, merge 1e0f63f, live Oct 11, 2026; frontend only, same RPC path, no confirm call, no service draw): the meter line counts the visit’s existing returns with the additions; the dialog title and success notice name the visit’s current window from a fresh read; after the write the portal reads the visit again and shows success only when every added item is on it in the role it was sent, otherwise the add reads as unconfirmed and Try again writes afresh; a return-only add refused with SV_NOT_ENTITLED because the visit already holds a pickup gets its own copy (“While your membership is not active, this visit can’t take more items because it includes a pickup. Schedule a Return as its own visit instead.”), and Add to visit stays disabled after it; focus returns to the visit card after a handoff to Schedule; the window label no longer wraps mid-range on phones.
2026-10-11 card notice follows the live card state
Live Oct 11, 2026. Checkout collects a card at signup, but customer_profile.card_on_file is only set near trial end or by a paid invoice, so trialing members who had a card saw “add a payment method” on Account and Home. billing-preview now returns card_on_file (true, false, or null when unknown) from the live Stripe subscription and customer, also on its preview_timeout and no_upcoming_invoice answers, with the card lookup capped at 3 s and the invoice preview at 4 s (sv-edge PR #35, deployed as version 6). The portal reads that answer first and the profile flag only when it is null or absent (sv-portal-2026 PR #75, merge 71ef849): the billing-preview call times out at 6 s, Account waits for the first attempt only for a trialing member whose profile flag still says no card, and Home calls the preview only in the last 4 days of the trial and hides the card notice until it answers.
2026-10-30 donations and seasonal plans, built and dark
Two member features are built and in production, switched off. Neither is visible to members: the Donate and Plan for later buttons, the Account › Donations section and the timeline entries stay hidden until the founder turns on the flag for that feature. Verified Oct 30, 2026 at 19:08 EDT: both flags are off with no change logged, and production holds no donation request, run, receipt or plan, and no donated item.
| Piece | What shipped (Oct 30, 2026) |
|---|---|
| Donations database, member side | sv-db #44 (d720ec3), migration 20261030170000_donations_db1: partners, requests and request lines, the member functions, the booking guard. Applied |
| Donations database, runs and receipts | sv-db #45 (033e338), migrations 20261030180000 (the donated item status) and 20261030180100 (runs, receipts, staff functions, the donated view). Applied |
| Seasonal plans database | sv-db #46 (58c11e4), migration 20261030190000_seasonal_plans, applied at 16:05 EDT |
sv-edge #45 (66b24fa) and #47 (135765a): six templates in send-email, version 64 at 16:40 EDT. See Transactional Email | |
| Member donation flow | sv-portal-2026 #115 (9980379): Donate on the Items selection bar, Account › Donations, Withdraw, Home timeline entries. Hidden while donations is off, except that a donation a member already has stays visible with its Withdraw action |
| Plan for later | sv-portal-2026 #117 (43e9c92): the Items selection bar and Home › Coming up. Hidden while seasonal_plans is off |
| Staff donations | sv-portal-2026 #118 (1f3125f): /ops › Donations (Review, Runs, Return to shelf) and the donation steps on the Scan page. No flag; behind the staff and AAL2 gate. The same PR adds the member Items › Donated section and the donated item page, which appear only once a member has a donated item |
| Feature switches | sv-portal-2026 #119 (cab4f05, Oct 31, 2026): /ops › Feature switches lists the launch gates (donations, seasonal_plans) and turns one on or off through fn_v2_staff_feature_set, with a confirm dialog and an optional note. Staff and AAL2 gate; frontend only; nothing member-visible until a switch is turned on |
The staff screens call the fn_v2_staff_donation_* database functions directly, not an edge function. Details: Database (tables and functions), Operations (staff workflow), Customer (what members will see).
Feature flags
Server-side launch gates live in public.feature_flags (key, enabled, description), created by the portal foundation migration on Oct 29, 2026. Two flags exist, donations and seasonal_plans, and both are off. The member function that starts a feature refuses with SV_FEATURE_OFF while its flag is off, and the portal reads fn_v2_read_feature_flags() (key and enabled only) to hide the screens; hiding is never the gate. A donation a member already has, and its Withdraw action, stay available with the flag off, so a paused launch never strands an item. Staff screens do not read the flag.
A flag changes only through fn_v2_staff_feature_set or a migration. The function needs a staff account signed in with the second factor (AAL2), writes the change to feature_flag_events (who, when, from and to) and sends ops an alert. Since Oct 31, 2026 the staff page /ops › Feature switches (/ops/flags, sv-portal-2026 #119) calls it: a staff account at AAL2 presses Turn on or Turn off, confirms in a dialog (an optional note goes into the event), and the page refetches the flags, so the same browser follows the change at once; a member’s open portal follows within about five minutes, and the server refuses a gated action immediately either way. The founder decides when each flag is turned on. donations waits for the partner agreements and counsel’s receipt wording. For seasonal_plans the database, the plan_reminder email and the portal are all deployed, so the technical preconditions are met and the flip is the founder’s call.
v1 (sv-portal) — Decommissioned
v1 was decommissioned Jun 29, 2026 (DEC-021): frontend retired (static placeholder at sv-portal-gamma.vercel.app, git disconnected), its v1-only edge functions + RPCs + views removed from prod, repo archived. Its former staff routes (/ops, /admin/waitlist, /admin/customers) and the get_ops_actions RPC behind them no longer exist — ops moved to the v2 /ops surface above.
Commands
cd ~/code/sv-portal-2026 npm run dev # Vite dev server (mock mode by default — every surface browsable) npm run build # tsc -b && vite build (must pass before any push) npm run typecheck # tsc -b npm run test # vitest run npm run qa:visual # required before any UI merge: 440/1440, light and dark, contact sheets cd ~/code/sv-portal # v1 — DECOMMISSIONED Jun 29, 2026 (archived; reference only, not deployed)
sv-edge (Edge Functions)
Overview
- Runtime: Deno (Supabase Edge Functions)
- Auth: every function deploys with
--no-verify-jwt; security is RLS plus in-function checks (member JWT,is_staff, AAL2, webhook signatures) - Deployment:
./scripts/deploy-customer-facing.sh(every function with--no-verify-jwt;./scripts/deploy-customer-facing.sh send-emaildeploys only the named functions, for hotfixes). Since sv-edge #29 (ccf5306, Oct 6, 2026) each deploy's output is captured to a temp file under a 180 s alarm and passes only on exit 0 plus "Deployed" or "No change"; the old pipe intogrep -qhung on Supabase CLI 2.119.0. - Last deploys: Oct 19, 2026: all 21 live functions except
health-check(outside the deploy script, unchanged since Jan 2026) were redeployed frommainin two runs, the later at 20:18 EDT (sv-edge #38,87d522a). Oct 30, 2026:send-emailwas deployed with the five donation emails (sv-edge #45,66b24fa) and then the plan reminder (#47,135765a); version 64 went live at 16:40 EDT and carries both (see Transactional Email). Each function’s current version is insupabase functions list; this page names a version only to date a deploy. The service-rollover edge changes (Gate A) are on PR sv-edge #14, not yet deployed; the database half (20260926065933_service_rollover) is applied and dark.
Functions (22 active)
Scheduling & v2 Booking (Google Calendar)
| Function | Purpose | Trigger |
|---|---|---|
get-available-slots | Availability in two-hour slots: plan service windows ∩ 48-hour lead ∩ calendar FreeBusy | Portal booking flow |
v2-booking-confirm | Confirm booking; create “SV Bookings” calendar event | Portal |
v2-booking-cancel | Cancel booking; revert items; delete calendar event | Portal |
v2-booking-reschedule | Move booking to a new slot; update calendar event | Portal |
v2-booking-revert | Per-item revert off a scheduled booking | Portal |
Stripe Integration
| Function | Purpose | Trigger |
|---|---|---|
create-checkout-trial | Stripe checkout with a complimentary first month, 30-day trial (LIVE). Returns HTTP 409 for an existing member (trialing/active/past_due) to prevent double-billing (B1, Jun 15, 2026). A checkout that carries a member referral code shows no Stripe promotion-code box; a code that does not resolve is kept as referral_code_unresolved on the session and subscription metadata, ops gets an alert, and the friend continues on the standard offer (sv-edge #15, Sep 28, 2026). If checkout cannot start for a visitor, ops gets an ops_alert (“ACTION: checkout failed, a visitor could not start signup”) with the error and the visitor’s email; the visitor sees the same error message as before, and the alert is sent in the background with an 8-second limit, so it never delays the response (sv-edge #21 and #22, Sep 29, 2026). The request is now checked before any Stripe call: a missing or malformed email returns HTTP 400 SV_INVALID_EMAIL, and an email with no in-area signup record returns HTTP 400 SV_OUT_OF_AREA, so no Checkout Session opens. If that signup lookup itself fails, checkout continues (it fails open). A JSON null body gets a 400 instead of a 500 (sv-edge #23, Oct 11, 2026). | Landing page |
create-portal-session | Stripe billing portal | Portal |
stripe-webhook | Process Stripe events. The cancel email and ops alert count only items in custody (stored, or scheduled for return), and no trial_ending email or invoice preview goes out when a cancel is scheduled at or before trial end (sv-edge #25). The pre-customer row has an explicit null guard, and trial signups no longer log a $99 setup fee (sv-edge #31). Both shipped Oct 11, 2026. On checkout.session.completed it sends an immediate ops_alert titled “NEW MEMBER, Name, City ZIP” (plan, first-month end, promo page, source and code, referral, service-area flag; sv-edge #40, 139c884, Oct 28, 2026) and records the subscription in public.ops_signup_alerts so the database backstop does not send a second one. The alert never delays or fails the webhook. | Webhook |
billing-preview | Next-charge preview for the Account card — reads the member’s upcoming invoice via Stripe invoices/create_preview so displayed amounts include discounts/credits (Jul 14, 2026) | Portal |
referral-code | Issues and reads the member’s personal referral code (public.referral_codes), first built for W4 referral Phase 1 (Jul 10, 2026). Since the relaunch (live Sep 28, 2026) the code only records who referred the friend; no coupon or discount is attached. See Member Referral under Integrations. | Portal |
Calendly (partnership meetings only)
| Function | Purpose | Trigger |
|---|---|---|
calendly-webhook | Receives Calendly events for partnership-meeting links (HMAC verification ENABLED, fails closed); not the booking layer. Stays deployed until Calendly retires (sv-website#30) | Webhook |
Booking Operations
| Function | Purpose | Trigger |
|---|---|---|
complete-service | Mark service completed | Ops UI |
staff-booking-cancel | Staff wrapper: cancel a booking from /ops (AAL2-gated) | Ops UI |
staff-booking-reschedule | Staff wrapper: reschedule a booking from /ops (AAL2-gated) | Ops UI |
staff-item-revert | Staff wrapper: per-item revert from /ops (AAL2-gated) | Ops UI |
Customer & Email
| Function | Purpose | Trigger |
|---|---|---|
signup-webhook | Pre-register, check service area. If pre-registration fails, ops gets an ops_alert (“ACTION: signup failed, a visitor could not reach checkout”) naming the visitor (name, email, ZIP code) for follow-up; the alert never delays the response (sv-edge #21 and #22, Sep 29, 2026). The state follows the ZIP code’s first three digits for both the record and the alert; an unknown prefix keeps the submitted value (sv-edge #26). The 400 and 503 messages are written for members (“Please fill in every required field.”), and the invalid-email log no longer prints the address (sv-edge #25). Both changes shipped Oct 11, 2026. It also reads the optional slug, src and utm_source, utm_medium, utm_campaign fields, validates them (a malformed value is dropped, never an error) and passes them to upsert_pre_customer so the lead row carries its campaign (sv-edge #41, a5b12df, Oct 28, 2026). The form-submit lead alert (“ACTION: new in-area lead”) gains a Campaign row, source first (for example pc-hoboken). | Landing page |
partnership-inquiry | Partnership form submissions | Website |
send-email | Transactional emails via Resend. The database notification sweep posts queued member email here (see Transactional Email) | System |
resend-webhook | Resend delivery-event webhook (bounce/delivery tracking) | Webhook |
email-unsubscribe | One-click unsubscribe target for the getting-started (trial nudge) emails (sv-edge #33). Only a POST records the opt-out, through fn_v2_email_optout; a GET records nothing. Deployed; its database half (sv-db 20261019112000_trial_nudges) was applied by the founder on Oct 24, 2026, shortly before 21:58 EDT. The sending cron job sv-v2-trial-nudges is paused on purpose until Mary’s first item is recorded In Storage (see Scheduled Jobs), so no getting-started email goes out yet | Email link |
Reporting
| Function | Purpose | Trigger |
|---|---|---|
metrics-briefing | Publishes the daily metrics briefing: claims the slot in SQL, computes the database half, reads Stripe (GET only) and Resend, classifies the Stripe rows in SQL, finalizes the stored report and sends one email per slot. Also takes the Studio’s snapshot POST and serves the dashboard’s read. Deployed with --no-verify-jwt; token auth with three scopes (see Metrics Briefing). sv-edge #48 | pg_cron through pg_net (8:02 AM and PM Eastern); Studio job; dashboard |
Utility
| Function | Purpose | Trigger |
|---|---|---|
health-check | Returns status + timestamp (edge function health probe) | System |
Deployment (CRITICAL)
ALWAYS deploy every function with --no-verify-jwt
cd ~/code/sv-edge # Individual function supabase functions deploy stripe-webhook --no-verify-jwt supabase functions deploy calendly-webhook --no-verify-jwt # Or deploy all customer-facing functions (recommended) ./scripts/deploy-customer-facing.sh # 20 functions (all but health-check), all with --no-verify-jwt ./scripts/deploy-customer-facing.sh send-email # only the named functions (each must be in FUNCTIONS) ./scripts/smoke-edge.sh # post-deploy smoke check
Webhook URLs
| Webhook | URL |
|---|---|
| Stripe | https://gmjucacmbrumncfnnhua.supabase.co/functions/v1/stripe-webhook |
| Calendly | https://gmjucacmbrumncfnnhua.supabase.co/functions/v1/calendly-webhook |
Incident Log
| Date | Incident | Root Cause | Resolution |
|---|---|---|---|
| Oct 6, 2026 | Studio Chrome work profile looked rolled back (bicycle avatar, old theme, bookmarks gone) and the work Google account was split into two new duplicate profiles. CleanMyMac gained Gmail access on both Google accounts (gmail.modify; Drive too on the personal one). About 4 to 5 founder hours lost. No customer impact. | CleanMyMac (Mac App Store) privacy cleanup wiped the work profile's cookies, which signed Chrome out. Re-signing in the managed Workspace account shows a data prompt that pre-selects “Create a new profile”; accepting it twice moved the account out of its profile. CleanMyMac's new Email Cleanup feature requested Gmail access in the browser. | CleanMyMac access removed from both accounts and blocked org-wide (Admin console → Security → API controls → App access control, client 111036074399-ro1elk15orq4v38sk23eqacjiauhouvj, Blocked for all of My Storage Valet LLC). Duplicate profiles deleted; original profile re-signed in with “Continue to work in this profile” (all bookmarks verified against the pre-incident backup). App being uninstalled, refund requested. Rules: never connect an email or cloud account to a cleaner app, never let one clear browser data, and on Chrome's profile-data prompt always pick “Continue to work in this profile.” Second CleanMyMac incident after the July 2026 runaway temp folder. |
| Feb 18-19, 2026 | update-booking-items and booking-cancel returning CORS errors and HTTP 401 from portal. Item attachment and booking cancellation completely blocked for customers. |
Two bugs: (1) CORS preflight Access-Control-Allow-Headers missing apikey and x-client-info — browser blocked POST after OPTIONS. (2) Auth called getUser() without token argument on a stateless Supabase client, so JWT was never verified (always 401). |
Commit a32c6d3: added apikey, x-client-info to CORS headers; switched to getUser(token) pattern (matching create-portal-session). Both functions redeployed. Verified via production logs: POST 200 on v44/v16. |
| Feb 11-15, 2026 | stripe-webhook returning HTTP 500 for all event types. 6 unique events failed (34 total retry attempts). 1 subscription stuck as past_due. |
Two overloaded versions of update_subscription_status existed in the database (one accepting text, one accepting subscription_status_enum). PostgREST could not disambiguate (error PGRST203). Created by Nov 25 + Jan 7 migrations using CREATE OR REPLACE with different param types (PostgreSQL treats as separate functions). |
Migration 20260215000001 drops the subscription_status_enum overload, leaving only the text version. No edge function changes needed. Failed events replayed from Stripe Dashboard. |
Lesson Learned: Function Overloading + PostgREST
PostgreSQL's CREATE OR REPLACE FUNCTION does NOT replace a function when the parameter types differ — it creates a second overload. PostgREST cannot disambiguate overloaded functions with the same parameter names but different types. Always DROP FUNCTION the old signature before creating a new one with different parameter types.
Promo Page Architecture
Property-Specific Promo Landing Pages
62 promo pages (59 property pages and 3 city pages, since Sep 29, 2026) are served as generated static files (sv-website/promo/{slug}.html), each derived from the canonical template sv-website/promo/index.html by promo/generate.py (stdlib Python, run manually, output committed). The PROPERTIES map inside the template remains the single source of truth. Generation exists so each page carries a property-specific <title>, meta description, Open Graph tags, and canonical URL — before Jul 21, 2026 every share preview and search result was identical and generic. See Partnerships > Promo Landing Pages for the business context.
Website Changes, Oct 28, 2026
All merged to sv-website main and live on www.mystoragevalet.com the same day:
- Pricing timeline and signup grouping (#101,
4f0cbba). - Homepage portal preview, three tabs, with a v9 capture on the Advance Realty variant (#103,
8896c5c). - Service-area map, checkout success and cancel pages, linkable FAQ anchors, and a pause control on the clip (#104,
71c5ccd). - v9 link preview card (og:image) with an Advance Realty variant (#97,
4d4d94d). - Campaign tracking:
analytics.jsmapssrcto GA4 campaign fields and firescampaign_landing(#105,095a156); the signup form postsslug,srcandutm_*to the lead record (#106,eb25f31). See Analytics. - Hoboken promo reads “Join by November 15.” (#95); 1404 Willow is shown as “Willow House” (Advance Realty; #102).
How Routing Works
Vercel serves the filesystem first: /promo/beacon matches the generated promo/beacon.html (via cleanUrls: true). A rewrite rule in sv-website/vercel.json remains as the fallback for anything with no generated file:
{ "source": "/promo/:code", "destination": "/promo" }
Since Sep 29, 2026 (sv-website #48) the same file also holds 11 temporary (307) redirects for retired slugs, applied before any file is served: avenue1800 and lincolnharbor to /promo/weehawken; gallery, provost10 and thejames to /promo/jerseycity; hobokenconnect and urby to /promo/hoboken; grandview, moorings, riverroad615 and ironstate to /.
The fallback serves the template for unknown slugs and for /promo/sample (deliberately never generated). On every page — generated or fallback — client-side JavaScript:
- Reads the URL slug (e.g.,
beaconfrom/promo/beacon) - Looks it up in the
PROPERTIESobject embedded in the HTML (63 entries = 62 live pages +sample) - If found: populates the page with the property name, the standard offer, share links, and QR code (no promo code is shown). The entry’s
offerfield picks the rate promise: the default shows the standard offer and its 12-month Price-Lock Promise,"city"gives a city-style title, and"property"(the 9 participating partner properties only) adds the Exclusive Rate Guarantee - If not found: hides the promo content and shows a “Page Not Found” message with a link back to the main site
File Structure
| File | Purpose |
|---|---|
sv-website/promo/index.html | Canonical template + the PROPERTIES map (inline JS; styles from /styles-v8.css) — the single source of truth |
sv-website/promo/{slug}.html | 62 generated pages (property-specific head) — never hand-edit; regenerate instead |
sv-website/promo/generate.py | Generator + --check drift guard (runs in sales-engine-check.sh) |
sv-website/vercel.json | Fallback rewrite: /promo/:code → /promo; 11 temporary redirects for retired slugs (since Sep 29, 2026) |
sv-docs/archive/2026-10-19-docs-sweep/guides/promo-landing-pages.md | Former operational guide, archived Oct 19, 2026 (history only); this section and the template are current |
Design Characteristics
- Brand-consistent: styled from the same shared
/styles-v8.cssas the main site. See Brand Identity and the design-system status by surface. - Mobile-first responsive: Tested at 390px (iPhone), 600px (tablet), and desktop widths. Two-column layouts collapse to single-column on mobile.
- Shared assets: styles from
/styles-v8.css; scroll reveals from/site-v8.js(GSAP ScrollTrigger from/vendor/gsap/), the same as the main site. - Accessibility:
prefers-reduced-motionsupport,focus-visibleoutlines, semantic HTML, sufficient color contrast
Analytics Events
Promo pages fire events to both Vercel Web Analytics and GA4:
| Event Name | Trigger | Data |
|---|---|---|
promo_page_view | Page loads with a valid slug | slug, property, view, src, offer |
promo_share_copy | User clicks “Copy to clipboard” on the share snippet | slug |
promo_link_copy | User clicks the copy icon on the direct link | slug |
Events use the window.va?.('event', ...) script-tag API pattern (not .track()). GA4 captures page views and scroll depth automatically via Enhanced Measurement.
QR Code Generation
QR codes are generated dynamically via api.qrserver.com (external API). Each encodes the full promo URL (e.g., https://mystoragevalet.com/promo/beacon). The QR image uses Ink Navy (#0E1A2B). Suitable for lobby flyers, elevator screens, move-in packets, and digital signage.
Dual-View: Resident vs Property Manager
Promo pages support two view modes controlled by a URL parameter:
| View | URL | Behavior |
|---|---|---|
| Resident (default) | /promo/beacon | Clean page with property name, the standard offer, and signup CTA. Share tools are hidden. |
| Property Manager | /promo/beacon?pm=true | Adds “Share with Residents” section: copy-paste email snippet, direct link with copy button, and printable QR code for lobby signage. |
When PM mode activates, the ?pm=true parameter is stripped from the URL bar via history.replaceState so the clean URL can be shared, and PM mode is on only while the current URL carries ?pm=true: a reload or a later visit shows the resident view, and any leftover svPromoPm key from the old sticky flag is removed on every load (since Sep 29, 2026, sv-website #44; the Jul 21 localStorage persistence turned the toolkit on for every later promo visit in that browser). The toggle is client-side — the .share-section element is hidden by default and displayed only when isPM is true. PM share outputs carry real attribution tokens: the copied email snippet links with ?src=email, the copy-link button with ?src=link, and the QR code with ?src=pm-qr; a visit with no token attributes as direct. (An earlier version of this page documented a ?src=pm token that the code never emitted.)
Slug Convention
- Lowercase only, no spaces, no hyphens, no special characters
- Must be unique across all entries in the
PROPERTIESobject - Should be recognizable (e.g.,
beacon,greyson,sable)
Adding a New Property (Technical Steps)
- Add to the PROPERTIES object in
sv-website/promo/index.html(alphabetical by slug). No Stripe promotion code is needed: the page link carries the slug, which checkout records aspromo_slug(DEC-025)."newproperty": { name: "New Property Name" },The entry gets the standard offer by default. Add
offer: "property"only for a participating partner property (DEC-025). - Regenerate the per-property pages:
python3 promo/generate.py(createspromo/newproperty.htmland updates the sitemap). - Commit and push the template plus the regenerated files to main. Vercel auto-deploys within ~60 seconds.
- Verify: Visit
mystoragevalet.com/promo/newpropertyand confirm property name, offer, QR code, and share tools render correctly.
Removing a Property
- Remove the entry from the
PROPERTIESobject inpromo/index.html - Run
python3 promo/generate.py— it deletes the orphaned generated page and updates the sitemap - Commit and push — the URL will then show the “Page Not Found” fallback
- To send the old URL somewhere useful instead, add a temporary redirect for it in
vercel.json, as the 11 pages retired on Sep 29, 2026 do
Planned Enhancements
Future phases (documented in the archived spec, sv-docs/archive/2026-06-05-cleanup/promo-landing-pages.md) would add:
- Embedded signup form with address fields pre-filled from property data
- Additional analytics events:
promo_signup_submit,promo_checkout_redirect,promo_signup_waitlist
Integrations
Stripe
| Item | Value |
|---|---|
| Mode | LIVE |
| Product | $279/month subscription |
| Monthly price | price_1UWHoQCLlNQ5U3EWFlRwAfI5 ($279.00, 27900 cents) on the default membership product prod_TIBy5Y60WUaqPo; the Supabase secret STRIPE_PRICE_MONTHLY points at it; plans.price_cents is 27900 (DEC-035, Oct 30, 2026). The previous monthly price price_1SLbacCLlNQ5U3EWLXmhyXTe was retired Oct 30, 2026. |
| Trial | Complimentary first month (30 days) on all new subscriptions |
| Setup Fee | None (eliminated) |
| Checkout Branding | v9 since Oct 28, 2026: Bone background, Terracotta pill button, script wordmark logo (see design-system status by surface). Receipts and the Stripe Customer Portal share these settings. |
| Webhook Handler | stripe-webhook edge function (current version in supabase functions list) |
| Events Processed | checkout.session.completed, customer.subscription.created, customer.subscription.updated, customer.subscription.trial_will_end, customer.subscription.deleted, invoice.payment_succeeded, invoice.payment_failed |
| Idempotency & Recovery | Claim-first dedup; on handler failure the claim is released (release_stripe_webhook_event_v2, migration 20260612233000) so Stripe’s retry re-processes, and an ops alert fires (Jun 14, 2026). A $0-invoice guard skips payment stamping on the trial-activation invoice so trial members are not mis-marked as paid. |
| Ops Alerts | fireOpsAlert on payment failure, membership cancellation (customer.subscription.deleted), and unresolved-profile billing events (Jun 15, 2026). |
| Duplicate-Bill Guard | An existing member re-running the unauthenticated signup is blocked (HTTP 409) before a second subscription is created; a belt-and-suspenders check in the webhook alerts ops if one ever slips through (B1, Jun 15, 2026). |
| Next-Charge Preview | The portal Account card shows the member’s real upcoming charge (discounts/credits included) via the billing-preview edge function — POST /v1/invoices/create_preview with API version pinned 2025-03-31.basil (the old GET /v1/invoices/upcoming is deprecated). Falls back to the plan price/read-model label if the preview is unavailable (Jul 14, 2026). |
| 2025+ Payload Shape | On 2025+ Stripe API versions, subscription.current_period_end lives on the subscription items — the webhook reads it with an items.data[0].current_period_end fallback. (Root-caused Jul 14, 2026: the top-level field was null so customer_profile.current_period_end was never stamped; fixed + backfilled.) |
| Member Referral | Live since Sep 28, 2026 (founder decision Sep 26, 2026; portal card opened on the founder’s word Sep 28, 2026). Each member has a personal referral code (format NAME-XXXX, in public.referral_codes), shared from the portal’s Bring a friend card; the share link www.mystoragevalet.com/?code=CODE, or the code typed into the signup’s referral-code field, records who referred the friend and applies no discount. Referral checkouts show no Stripe promotion-code box; a code that does not resolve is recorded as referral_code_unresolved and alerts ops. Friend: the standard offer (complimentary first month, then $279/month), no coupon. Referring member: an account credit equal to one month of the membership fee at the rate the member pays at that time (list price × quantity minus the active discount, computed when the friend’s first paid invoice succeeds; a MARYVIP member paying $179 earns $179; a comped member earns none, recorded as skipped_no_charge; an unreadable rate is recorded as pending_manual and ops adds the credit by hand), applied as a Stripe customer balance credit when the friend’s first paid invoice succeeds (invoice.payment_succeeded with amount_paid > 0), never at signup; Stripe takes it off the member’s next invoice automatically (the portal’s next-charge preview shows it), and the member gets an email, “Your next month is on us.” Conditions: the referring member’s membership is active; no cap; the only guard is that the friend is not the same person or email as the referrer; idempotent per referred membership, so a webhook retry never credits twice. The two codes already issued (Jul 10 and Aug 1, 2026) work under the new rule. Retired: coupon REFERRAL100 ($100 off the first month) and the manual $100 referrer credit; two legacy referral codes remain active in Stripe until the founder deactivates them. |
Google Calendar (Native Scheduling — LIVE)
The live booking layer on the customer domain since Jun 10, 2026 (DEC-0001 executed). Booking confirm creates the calendar event; cancel/revert deletes it. Custody never mutates without a calendar event (block-on-outage).
| Item | Value |
|---|---|
| Calendar | “SV Bookings” (Google, founder-owned) |
| Service Account | sv-calendar@sv-scheduling.iam.gserviceaccount.com |
| Secrets | GOOGLE_SERVICE_ACCOUNT_JSON + GOOGLE_CALENDAR_ID (Supabase secrets) |
| Availability | plans.service_windows ∩ 48-hour lead ∩ calendar FreeBusy (via get-available-slots) |
| Booking Horizon | Up to 18 months: month panel, date field and month paging; database guard |
| Signal vs Truth | The calendar is signal; the database stays canonical |
Calendly (partnership meetings only)
Customer scheduling is native Google Calendar (DEC-0001); Calendly is not the booking layer. It remains only for partnership-meeting links, and the calendly-webhook function stays deployed until Calendly retires (sv-website#30), with HMAC verification ENABLED (fails closed — keep CALENDLY_WEBHOOK_SIGNING_KEY set in Supabase secrets). Events: invitee.created, invitee.canceled. Webhook only, no outbound API calls.
Supabase Storage
| Item | Value |
|---|---|
| Bucket | item-photos (private) |
| Access | Signed URLs (1-hour expiry) |
| Max Size | 20MB per file |
| Allowed Types | image/jpeg, image/png, image/webp |
| HEIC Handling | iPhone HEIC/HEIF library photos are transcoded to JPEG on-device before upload (imageTranscode.ts, I1 Jun 15, 2026) so they render outside Safari; the bucket allowlist stays JPEG/PNG/WebP (HEIC is never stored). |
| Max Photos | 5 per item |
Transactional Email (Resend)
All transactional mail renders via the send-email edge function (Resend). Customer-facing types, plus the internal ops_alert:
| Type | Sent on |
|---|---|
welcome | New member (checkout completed) — carries the magic sign-in link |
booking_confirmed | Booking confirmed (with .ics + Google Calendar link) |
booking_rescheduled | Booking moved (monotonic ICS SEQUENCE updates the saved event) |
booking_canceled | Booking canceled OR last item reverted off a booking; attaches a METHOD:CANCEL invite (E3/E4, Jun 15, 2026) |
trial_ending | ~3 days before trial end; a no-card variant tells card-less members to add one (E6). Skipped when a cancel is scheduled at or before trial end (stripe-webhook, sv-edge #25, Oct 11, 2026) |
membership_canceled | Membership ended; branches on items-in-storage to prompt the complimentary final delivery (Jun 15, 2026); says included coverage continues until every item is returned (Sep 25, 2026) |
payment_failed | Failed charge (member now past_due) |
donation_requested | Sent to the member when they submit a donation request. Dark until the donations flag is on (see Feature flags) |
donation_reviewed | Sent to the member when staff have decided the last undecided item of a donation request: approved, not approved, or a mix. Dark until the donations flag is on |
donation_scheduled | Sent to the member when approved items are added to a donation run for a partner. Dark until the donations flag is on |
donation_complete | Sent to the member when their last item on a run is final: donated, or not accepted by the partner. A receipt attached before this email goes out is merged into it. Dark until the donations flag is on |
donation_receipt_ready | Sent to the member when the partner-signed receipt is attached, or a corrected one replaces it. Dark until the donations flag is on |
plan_reminder | Seasonal plan reminder, sent once per plan per target date. The 10:12 a.m. New York job (sv-v2-plan-reminder) queues it when the plan’s reminder window has opened (its date less the reminder lead, 14 days by default) and an item is still unbooked. Transactional stream, no price. Dark until the seasonal_plans flag is on |
ops_alert | Internal — routed to OPS_ALERT_EMAIL (scheduler/calendar/billing anomalies, and since Sep 29, 2026 any visitor who could not reach or start checkout). Since Oct 28, 2026 it also carries NEW MEMBER (sent by stripe-webhook the moment checkout completes) and NEW MEMBER (backstop) (sent by the sv-ops-monitor cron when the immediate alert was missed; see Database). Separately, signup-webhook sends “ACTION: new in-area lead” on form submit, before payment. Since Oct 30, 2026 it also carries donation alerts (a request to review, a scheduled donation withdrawn, a partner that did not accept an item, a run still open 24 hours after departing, a receipt pending 7 days); none fires until a donation exists. |
Deliverability (Jun 15, 2026): every customer email send is wrapped in EdgeRuntime.waitUntil across all 7 sending functions, so the Supabase isolate cannot freeze before the Resend POST completes (previously these fire-and-forget sends could silently never deliver). send-email also fires an ops_alert when a customer send returns non-200. Booking emails + their ICS now include the service address (LOCATION).
Templates: send-email and partnership-inquiry render the transactional email shell (sv-edge main at 87d522a; palette status in design-system status by surface). The partnership thank-you names the building when the form gave one, otherwise it says “your property”. The Supabase Auth magic-link template is separate (applied in the Supabase dashboard on Oct 28, 2026).
v9 email (live Oct 28, 2026): sv-edge #39 (f651fc7) deployed send-email, partnership-inquiry, v2-booking-confirm, v2-booking-reschedule and staff-booking-reschedule on the v9 shell (_shared/email-shell.ts). Emails set no background colour of their own (founder ruling), so the recipient’s mail app supplies the page; the action is a Terracotta pill button with an Ink Navy label and no outline, with a text-link fallback under it; the header is the script wordmark.
Notification outbox (since Oct 29, 2026): member email that the database triggers is queued in public.notification_outbox (sv-db 20261029035912_portal_foundation). A producer adds the row in the same transaction as the state change, and the event key is unique per recipient, so one event sends at most one email. The cron job sv-v2-notification-sweep (every 5 minutes) posts due rows to send-email. A 2xx answer marks the row sent. A 401, 403, 408, 429, a 5xx, a timeout or no answer retries 10 minutes later and then 60 minutes after that, three attempts in all, and then fails with an ops alert. Any other 4xx is final. In particular send-email answers HTTP 400 for a payload it cannot render, and fn_v2_notification_sweep treats that 400 as final: one failed attempt, one ops alert, and the event key is used up, so that event is not queued again. It is not retried three times. Deploy a template to send-email before turning on the flag whose feature sends it. The donation emails and the plan reminder are the only producers so far; booking, reminder and getting-started emails do not use the outbox. Production holds 0 outbox rows (verified Oct 30, 2026 at 19:08 EDT).
Plan and quota: Resend is on the Free plan (100 emails a day, 3,000 a month), shared with Supabase Auth, which sends magic links through Resend SMTP. Limits and open decisions: Sign-in email route and limits.
Website Analytics
GA4 (G-9SBYJ8QEC1) and Vercel Web Analytics Plus ($10/month) run on all sv-website pages. GA4 handles behavioral analytics, acquisition channels, and UTM attribution. Vercel handles custom event tracking and privacy-friendly visitor counts. Vercel Speed Insights tracks Core Web Vitals.
Full analytics documentation → — configuration, internal traffic filtering, custom events, UTM attribution, the daily metrics briefing, and GA4 MCP tools.
Metrics Briefing (live Nov 3, 2026)
One stored report, computed in production, is the single source for the daily numbers. What the numbers mean, the email, the dashboard and how to read the report by hand: Analytics › Daily Metrics Briefing.
| Piece | Detail |
|---|---|
| Table | sv.metrics_snapshots (sv-db migration 20261103090000_metrics_briefing.sql): traffic snapshots from the Studio and one report row per slot and revision. RLS on, service role only. Counts only: no emails, names, phones, notes, referral codes or Stripe ids ever leave the database; pgTAP asserts the payload text carries none. |
| Cron jobs | Migrations 20261103090100_metrics_briefing_cron.sql and 20261105220000_metrics_briefing_6am_6pm.sql. sv-metrics-briefing: 6:02 AM and 6:02 PM Eastern since Nov 5, 2026 (schedule 2 10,11,22,23 * * * with an Eastern-hour guard on the 6 and 18 o'clock hours; 8:02 before), runs sv.fn_sv_metrics_dispatch('publish'), which POSTs through pg_net to the metrics-briefing function. sv-metrics-briefing-retry: at :22, re-publishes a missing or failed slot once and records delivery; a second failure raises an ops alert. sv-metrics-retention: daily 09:37 UTC, deletes rows older than 90 days. |
| Edge function | metrics-briefing (sv-edge supabase/functions/metrics-briefing/, deployed with --no-verify-jwt, token auth). It claims the slot in SQL (public.fn_sv_briefing_publish_v1), computes the database half in SQL (sv.fn_sv_briefing_compute, run read-only), reads Stripe (GET only) and Resend (counts by template kind and last event), classifies the Stripe rows back in SQL (public.fn_sv_classify_stripe_v1), finalizes the stored row (public.fn_sv_finalize_report_v1) and sends one email per slot to zach@ from concierge@. The text part carries the SV-BRIEFING-JSON v1 block (contract_version 1) that Dot, Zach’s ChatGPT assistant, reads from Gmail. |
| Token scopes | Publish (the ops alert token or the service role), ingest (METRICS_INGEST_TOKEN, the Studio snapshot POST) and read (METRICS_READ_TOKEN, the dashboard). A token in a query string is refused (HTTP 400). Every response is Cache-Control: no-store. |
| Studio job | User LaunchAgent com.storagevalet.metrics-snapshot at 5:45 AM and 5:45 PM Eastern (since Nov 5, 2026; 7:45 before) runs ~/.claude/skills/sv-daily-metrics/scripts/publish-snapshot.sh (log ~/Library/Logs/sv-metrics-snapshot.log): Vercel Web Analytics for fixed windows with a status each, GA4 tried once, then the snapshot POST with the ingest token. It emails the snapshot only as a fallback when the POST fails twice. A report uses the newest snapshot generated before its cutoff. |
| Dashboard | Live since Nov 4, 2026 at sv-metrics.vercel.app (first production deploy cf3a4f1). Private repo StorageValet/sv-metrics; Vercel project sv-metrics, git-connected to main. Vite, React 19, Tailwind v4 and shadcn/ui on the v9 Copper Patina tokens; phone-first, light and dark. Shows the latest stored report plus a Live preview (database and snapshot only, no Stripe). It is token-gated: the read token (METRICS_READ_TOKEN, set in the Supabase edge secrets Nov 4, 2026) is pasted once per browser and sent only as an Authorization header. The metrics-briefing function answers ?view=latest with 401 without the token and 200 with it. The custom name metrics.mystoragevalet.com is attached on Vercel and follows the registrar move (see Domain and DNS). |
| Verification | pgTAP supabase/tests/39_metrics_briefing.sql (337 tests; the suite is 42 files, 2099 passing); sv-edge scripts/verify-metrics-briefing.ts (557 checks); outside review by Codex (three rounds) and Opus refuter rounds. The first live publish on Nov 3, 2026 reached the founder’s inbox. PRs: sv-db #47, sv-edge #48. |
Error Monitoring (Sentry)
Sentry error monitoring is LIVE on the v2 portal since Jul 11, 2026 — org my-storage-valet-llc (us.sentry.io), project sv-portal-2026.
- Wiring: all Sentry code lives in
src/lib/sentry.ts(the only module importing@sentry/react); init is gated onPROD && VITE_SENTRY_DSN— dev and mock mode never initialize. - Privacy:
sendDefaultPii: falseplus a deep scrubber (src/lib/sentryScrub.ts) that strips auth tokens, magic-link hashes, emails, phones, and street addresses from every event and breadcrumb. User correlation is the opaque auth user id only — never email. No Session Replay (deliberate). - DSN: write-only ingest key in Vercel env
VITE_SENTRY_DSN(Production target only, build-time embedded — changing it requires a redeploy). - CSP reports: the portal’s report-only Content Security Policy sends its violation reports to this project (2026-10-07 CSP theme-script hash).
- Deferred (reviewer-gated): source-map upload, release tagging, and the Deno edge SDK in sv-edge.
Uptime Probe (GitHub Actions, since Oct 7, 2026)
An external uptime check runs from sv-docs (PR #22, main 19a1bc5): the workflow .github/workflows/uptime.yml runs scripts/uptime-probe.sh every hour at minute 37 (cron 37 * * * *), and can be started by hand (workflow_dispatch, with a simulate_failure input that probes a nonexistent host to test the alert path). The first run, 37707925866, passed on Oct 7, 2026 with all five targets up.
- Targets: one GET each (never POST), 15-second timeout, up to 2 retries: www, portal and wiki (200), the edge runtime through
health-check(200 or 401) and PostgREST at/rest/v1/without a key (401). No secrets, read-only. - Vercel bot challenge counts as up: a 403 or 429 with
x-vercel-mitigated: challengeon a Vercel host is reported as challenged, not down. Any other mitigation value counts as down. - Alerts: one GitHub issue per outage in sv-docs, labeled
uptime. Later failing runs comment only when the set of failing targets changes; the first run with everything up comments “Recovered” and closes the issue. The job stays green while a target is down (the issue is the alert). - Probe-side fault: when nothing answers at all (DNS, connect or timeout on every target), the fault is the runner’s network, so the job fails without opening or changing an issue.
- Cost: about 720 Actions minutes a month, shared with the sv-edge and sv-db CI. The GitHub plan could not be read, so the workflow assumes the Free plan’s 2,000 minutes. Upgrade path: a managed uptime monitor on a founder account.
Partnership Record
The canonical target workbook, Strategic_Partnerships/SV-Master-Target-List_CANONICAL.xlsx, is the partnership record: the property universe, contacts and outreach status. The outreach engine’s log, Strategic_Partnerships/Outreach-Engine/outreach-log.jsonl, holds the send history. The hub stays lightweight; Airtable is the fallback if the workbook stops being enough. Workflow: Partnerships.
HubSpot retired Sep 24, 2026 (DEC-028). Do not log to, BCC, sync with or build on it. A one-time read-only extract (226 deals, 168 contacts, 142 companies, 447 engagements) is in Strategic_Partnerships/CRM/hubspot-extract-2026-09-25/; its EXTRACT-README.md maps the old pipeline stages and ids.
E-Signature & Contracts (Jun 2026)
Go-to stack for generating and sending Storage Valet agreements (partners, customers, vendors). Decided Jun 12, 2026: Google Workspace eSignature is primary; PandaDoc Free eSign is the backup for recipient preference or outages. No additional paid tool. Full step-by-step workflow → Legal § Contracts & E-Signature.
| Item | Value |
|---|---|
| Primary | Google Workspace eSignature — included in the Business Standard plan ($0 incremental); 200 requests/user/month; up to 10 signers/doc; works on Google Docs and Drive PDFs; recipients need no Google account; auto-generates signed PDF + audit trail |
| Backup | PandaDoc Free eSign (zach@mystoragevalet.com) — 60 sends/year, 2 recipients/doc, 5 templates, no integrations, no hyperlinks inside sent docs |
| Retained cloud workflow home | Google Drive → Storage Valet — Contracts/ (01 Templates / 02 Out for Signature / 03 Executed; see its _README.txt). Use manual web access; existing cloud objects and sharing remain in place after desktop sync retirement. |
| Single-archive rule | Every executed contract is filed in 03 Executed regardless of which tool collected the signature |
| Where it lives | Open the PDF/Doc in Drive preview → Request eSignature toolbar button (or the ⋮ menu). NOT in Drive’s right-click “Open with” menu. Verified in-product Jun 12, 2026 on the zach@ account — no admin enablement was needed |
SEO & Performance (Feb 2026)
| Item | Detail |
|---|---|
| JSON-LD Structured Data | Since Oct 7, 2026 (sv-website PR #59, main bf28e89, confirmed on the live site): index.html carries an Organization with the stable @id https://www.mystoragevalet.com/#organization, a contactPoint and the 15 served municipalities as areaServed; a Service that references it, with hoursAvailable taken from the service availability hours and one Offer (279 USD, UnitPriceSpecification with unitCode MON, description naming the complimentary first month); and a FAQPage that mirrors the visible questions and answers. faq.html carries the same Organization and a FAQPage of its visible Q&A. There is no LocalBusiness block: Google requires a street address for it, and the registered address never goes on the website. Partnerships, testimonials, privacy and terms still carry an older Organization block without the @id. Open in sv-website #27: section B and the founder-gated LocalBusiness items. |
| Canonical URLs | <link rel="canonical"> on all 6 main pages. No trailing slash (matches cleanUrls: true). |
| Cache Headers (vercel.json) | Images: 1 year immutable. CSS: max-age=0, must-revalidate (browser always revalidates; Vercel returns 304 if unchanged). Favicon: 1 year immutable. |
| Security Headers (vercel.json) | Since Oct 5, 2026 every path on the website and the wiki sends X-Content-Type-Options: nosniff, X-Frame-Options: DENY and Referrer-Policy: strict-origin-when-cross-origin, matching the portal. HSTS stays at Vercel’s default (no includeSubDomains or preload); widening it is a separate decision. |
| WCAG Text Contrast | The site’s text, link and footer colors come from styles-v8.css. Contrast ratios and prohibited pairings for new work are set by the v9 palette — see Brand §V0. |
| Skip-to-Content | Visually-hidden skip link on all 6 main pages (WCAG 2.4.1 Level A). |
| robots.txt | Permits all crawlers. Points to /sitemap.xml. |
| sitemap.xml | Lists the 5 main pages (with <priority> and <lastmod>) plus the 62 live promo pages, which promo/generate.py rewrites in lockstep (67 entries since Sep 29, 2026). Auto-deployed via Vercel. |
| Heading Hierarchy | Footer headings converted from <h4>/<h5> to <p class="footer-heading"> on all pages. Eliminates skipped heading levels flagged by Lighthouse without changing visual appearance. |
| Main Landmark | All subpages (terms, privacy, faq, testimonials, partnerships, signup/*) wrapped in <main> element. Landing page already had one. Enables screen reader "skip to main content" navigation. |
| Lighthouse Scores | Accessibility 100/100 on all pages (up from 93 landing, 91 partnerships). Best Practices 100/100 after adding favicon.ico. |
Security
Authentication
- Method: Magic links (email-based, no passwords)
- Provider: Supabase Auth
- Email link format (since Jul 14, 2026): magic-link emails land at
/auth/confirm?token_hash=…&type=emailand the portal completes sign-in viaverifyOtp— the same pattern as the welcome email. This replaced the PKCE?code=flow in magic-link emails, which structurally failed when the link was requested in one browser context and opened in another (QA finding F5). The token-hash pattern is prefetch-safe and works cross-context. Do not revert the GoTrue mailer template to{{ .ConfirmationURL }}. - Input normalization: the login form and
signInstrip a pastedmailto:prefix and whitespace before validating or submitting (QA finding F4). - Token: JWT with user ID
- Session: Persisted to localStorage; survives new tabs, refresh, and browser restart. Auth guard (
ProtectedRoute) gates on SupabaseINITIAL_SESSIONevent before rendering redirects. An 8-second boot timeout fails open to signed-out (clean/login) if session restoration hangs — the app can never sit on an infinite splash.
Sign-in email route and limits (as of Oct 7, 2026)
Read from the live project through the Supabase Management API on Oct 7, 2026. Supabase Auth does not use its built-in mailer: magic links go out through custom SMTP on Resend.
| Setting | Live value | Note |
|---|---|---|
| SMTP | smtp.resend.com, port 465 | Sender “Storage Valet” <concierge@mystoragevalet.com> |
rate_limit_email_sent | 25 emails per hour, project-wide | The repo’s supabase/config.toml says 2; that file configures the local stack only |
smtp_max_frequency | 1 second | Minimum gap between emails to one address (Supabase default 60) |
Other rate_limit_* | Supabase defaults: otp 30, verify 30, token_refresh 150, sms_sent 30, anonymous_users 30, web3 30 | Scope differs by limit: verify, token refresh and anonymous sign-ins count per IP address. Supabase’s Auth rate-limits guide has each limit’s scope and window |
| CAPTCHA | Off | |
| OTP expiry | 3600 seconds | Every sign-in link, including the one in the welcome email, expires after one hour; a member who opens it later requests a new link at /login |
- Only
/loginmagic links draw on the hourly auth budget. A new signup does not:stripe-webhookcreates the user withauth.admin.createUser, generates the sign-in token withauth.admin.generateLink(which sends nothing), and thewelcomeemail carrying that link goes out through the Resend API viasend-email. - Resend account: Free plan, 100 emails a day and 3,000 a month. That quota is shared by auth SMTP, the welcome and transactional email and the ops alarms (usage read on Oct 7, 2026: 1 of the daily 100 and 52 of the monthly 3,000). Resend shows the domain verified (DKIM, and SPF on the send subdomain). Public DNS has no SPF TXT record on
send.mystoragevalet.comas of Oct 7, 2026 (only Resend’s bounce MX); adding it is a founder item. DMARC onmystoragevalet.comisp=none. - Open founder decisions (CTO board): raise the hourly limit to 60 with a 60-second interval per address; move Resend to the Pro plan. Until either is decided the values above stand.
Row Level Security (RLS)
All customer tables are protected by RLS:
- Users can only see/modify their own data
auth.uid()used in all policies- Service role bypasses RLS (edge functions only)
Billing Protection
Billing fields on customer_profile are protected:
- Users CANNOT update
subscription_status,stripe_customer_id,subscription_id - Updates only via SECURITY DEFINER functions from webhooks
Secrets Management
Policy (Non-Negotiable)
Never paste secrets into chat, docs, or commits. Never ask a human to paste secrets into chat. 1Password CLI (op) is the approved source of truth for all credentials.
Secret Inventory
| Secret | 1Password Item | Field | Consumers |
|---|---|---|---|
| Supabase DB Password | Supabase Production | password | Local psql only |
| Stripe Live Secret Key | Stripe Live | secret_key | Supabase secrets (STRIPE_SECRET_KEY), local Stripe CLI |
| Stripe Webhook Secret | Stripe Live | webhook_secret | Supabase secrets (STRIPE_WEBHOOK_SECRET) |
| Resend API Key | Resend API | credential | Supabase secrets (RESEND_API_KEY) for the send-email edge function. (No longer used by the Resend MCP — that migrated to OAuth Jul 8, 2026.) |
| GA4 OAuth Client ID | Google Cloud - GA4 Analytics MCP | client_id | GA4 MCP (via ga4-mcp-launcher.sh; ADC at ~/.config/gcloud/application_default_credentials.json) |
| Calendly PAT | Calendly | PAT | Manual Calendly API calls only. The local MCP launcher that used it was removed Jul 26, 2026; the managed claude.ai Calendly connector uses OAuth, not this PAT. Candidate for retirement at Calendly sunset. |
| Calendly Webhook Signing Key | Calendly | webhook_signing_key | Supabase secrets (CALENDLY_WEBHOOK_SIGNING_KEY) |
| Supabase Service Role Key | Supabase Production | service_role_key | Supabase-managed; used by all edge functions |
Approved Patterns
# Fetch a secret (never prints to terminal)
OP_BIOMETRIC_UNLOCK_ENABLED=true op read 'op://Storage Valet/Stripe Live/secret_key'
# Push to Supabase without exposing the value
OP_BIOMETRIC_UNLOCK_ENABLED=true op read 'op://Storage Valet/Stripe Live/secret_key' \
| xargs -I {} supabase secrets set STRIPE_SECRET_KEY="{}" --remote=gmjucacmbrumncfnnhua --yes
# Shell env vars — sv-env caches them once; ~/.zshenv sources that cache in every zsh
# Run sv-env after a reboot or a secret rotation, never once per session
# Secrets are NOT resolved at shell startup to avoid macOS permission popups
sv-env # loads SUPABASE_ACCESS_TOKEN, STRIPE_SECRET_KEY, RESEND_API_KEY
# also caches to ~/.sv-session (chmod 600) for sub-agent inheritance
# session file PERSISTS across shells; run sv-env-clear to wipe manually
Never Do This
Never run secrets inline in commands (e.g., PGPASSWORD="actual_password" psql ...). Claude Code's permission caching stores the literal command string, persisting the secret to disk. Always use op read or $ENV_VAR references instead.
Rotation Procedures
- Generate/rotate the credential in the service's dashboard
- Update the value in 1Password (Storage Valet vault)
- If the secret is in Supabase secrets, push via:
op read '...' | xargs -I {} supabase secrets set KEY="{}" --yes - Verify the dependent service still works (e.g., test checkout, test email)
Deferred: Supabase service role key rotation. High blast radius (breaks all 20 edge functions). Requires planned maintenance window. See DEC-011.
Tripwire (Automated Detection)
sv-final-audit.sh includes a secrets tripwire that scans ~/.zshrc, ~/.claude/settings.json, and ~/.claude/settings.local.json for plaintext credential patterns at the end of every session. It also flags any .env files in ~/code/ repos. Additionally, the audit script includes a GitHub hygiene layer that detects stale PRs (open >7 days) and orphan remote branches (>30 days with no associated PR) across all 7 repositories.
Deployment
Design-System Status by Surface
v9 Copper Patina (DEC-033) is the only design system. The website, the customer portal and staff /ops, transactional and magic-link email, Stripe Checkout branding and the wiki are live on v9 (all 2026-10-28). Favicons and app icons are the valet-cart mark (2026-10-29), and partner kits and the older promo-card print templates are still to come and carry the previous palette in their own code until each ships with founder approval. Photoreal images come from ChatGPT or Gemini, never Claude Code. Each go-live, email send and print release needs its own founder approval (ROLLOUT-PLAN.md section 6). The identity release ships the script wordmark, Outfit headlines and the v9 palette together. Brand authority: Brand Identity.
| Surface | State | Notes |
|---|---|---|
/join (the postcard QR page on www.mystoragevalet.com) | v9 live | Oct 28, 2026, sv-website #75 (80a3d32); the first page on v9 |
| Website (www.mystoragevalet.com) | v9 live | Oct 28, 2026: sv-website #79 (d2cd8c9), new hero photo #84 (c9a6d15), hero line #83 |
| Customer portal (portal.mystoragevalet.com) and staff /ops | v9 live | Oct 28, 2026: sv-portal-2026 #93 (58f5805), pill buttons. The theme follows the device by default; Account › Appearance offers System, Light or Dark (#94, 4ba064e) |
| Transactional email | v9 live | Oct 28, 2026: sv-edge #39 (f651fc7) deployed send-email, partnership-inquiry, v2-booking-confirm, v2-booking-reschedule and staff-booking-reschedule, all with --no-verify-jwt |
| Magic-link sign-in email (Supabase Auth template) | v9 live | Templates applied Oct 28, 2026; subject “Your Storage Valet sign-in link” |
| Stripe Checkout branding | v9 live | Oct 28, 2026: Bone background, Terracotta pill button, script wordmark logo. The brand-settings API ignores hex, so colours are written as rgb(...). Receipts and the Customer Portal share these settings |
| Favicon and app icons | Valet-cart mark, Ink Navy on Bone | Live on the website, portal and wiki since Oct 29, 2026 (founder ruling); the luggage tag is retired from them. Audited Nov 3, 2026: every live icon matches the Oct 29 export byte for byte; the browser tab shows the compact cut, the home-screen icons and the Instagram picture the solid cut. Cart mark v2 approved; Gemini round 2 passed with notes (8/10), micro-cut pending |
| Link cards (Open Graph and Twitter) | Script wordmark alone, Bone on Ink Navy | og-card-v9_2026-10-28.png on every website page and the portal since Oct 28, 2026; the cart is never paired with the script |
| SV-Wiki (wiki.mystoragevalet.com) | v9 live | styles.css uses the 16 v9 colours with job-named tokens; check-v9-tokens.py guards it |
| Partner kits and promo-card templates | Awaiting a v9 print pass | Print builds come from a proofed print pass; the Hoboken postcard (released for print Sep 28, 2026) has its counter proof pending |
Copy shipped with the go-live (founder rulings): plan wording is “2 scheduled services a month: pickup, return, or both in one visit” (a visit that does both counts as one service); the FAQ security answer says items are kept in a secure facility in our care, with up to $2,000 of included coverage per membership, and no longer lists 24/7 monitoring or controlled access; items come back “in the condition we received them in”; and after cancellation, included coverage continues until every item is returned (FAQ and membership-ended email).
Portal (Vercel)
cd ~/code/sv-portal-2026 npm run build # tsc -b && vite build — must pass before any push vercel # Preview deploy (NOT --prod)
sv-portal-2026 auto-deploys from its GitHub main branch; the customer domain has pointed at it since Jun 10, 2026. AI commits, pushes, and merges PRs to main directly to ship — no manual promotion step. Do not run vercel --prod directly. The project’s Vercel “Protection Bypass for Automation” token was removed on Sep 26, 2026; nothing used it.
There is no frontend rollback target
v1 (sv-portal) was decommissioned Jun 29, 2026 and its Vercel project now serves only a static “portal has moved” placeholder that links back to the live portal. Re-pointing portal.mystoragevalet.com at it would cause an outage, not a rollback — and its v1-only edge functions, RPCs and views were removed from prod, so there is no working backend behind it either. Roll forward instead: promote a known-good sv-portal-2026 deployment in Vercel, or revert the offending commit and push. Corrected Jul 28, 2026; the same stale instruction was removed from sv-db/CLAUDE.md the same night.
PR validation: sv-portal-2026 has no CI (no .github/workflows). Its pre-push gate is local and manual: npm run build (which runs tsc -b first) plus npm run test. sv-edge and sv-db run CI: see Continuous Integration. No repo requires a status check before a merge to main.
Edge Functions
cd ~/code/sv-edge ./scripts/deploy-customer-facing.sh # Deploy all 19 customer-facing functions ./scripts/deploy-customer-facing.sh send-email # only the named functions ./scripts/smoke-edge.sh # Post-deploy smoke test # OR manually: supabase functions deploy <function-name> --no-verify-jwt
Always run ./scripts/check-deps.sh before deploying. Since sv-edge #31 (Oct 11, 2026) a type error is no longer discarded: the script prints it and exits 1, which also stops the deploy script before anything deploys. Deploy ALL customer-facing functions together to avoid version drift.
Database Migrations
The Supabase CLI is 3.0.0 since Nov 4, 2026. --remote replaces --linked and --project-ref (--remote targets the linked project; --remote=<ref> another; a ref after a space is refused). The old flags still work with a warning until v4. Database commands (db push, db dump, db query, db reset, migration list, test db) now default to the local stack, so supabase db reset alone is the local rebuild and supabase db reset --remote would wipe production. functions deploy and secrets are remote only: with no flag they still target the linked production project. Hosted writes (db push --remote, secrets set, db query --remote without --read-only) ask for confirmation and stop in a non-interactive run unless --yes is passed.
cd ~/code/sv-db supabase db push --remote
Requires: Docker Desktop running
One tree, one push line (Oct 7, 2026, sv-db #24)
- A push needs every applied migration in its tree.
supabase db push --remoterefuses a tree that is missing a migration production already has (DbPushMissingLocalError: Remote migration versions not found in local migrations directory). The CLI checks this before it considers--include-all, so that flag does not get past it. A worktree branched before another migration landed therefore fails before applying anything. - Never run
supabase migration repair --status reverted, even though that error suggests it: it removes an applied production migration from the migration history, so a later push would run it again. - Worktrees are unlinked until
supabase/.temp/project-ref(gitignored) is copied in from the main checkout; without it the CLI stops withCannot find project ref. Have you run supabase link? - The founder gets one push line, from one tree that holds every pending migration. Add
--include-allonly when a pending file sorts before production’s newest version. After the push, merge that PR tomainat once, so every later push comes from a tree with all the files, then confirmsupabase migration list --remoteshows local and remote 1:1.
Explicit grants on new objects (from Oct 30, 2026). Supabase no longer auto-grants Data API access to new tables, views and sequences in the public schema on existing projects (ours: gmjucacmbrumncfnnhua). Existing objects keep their grants. The change also applies to preview branches, local supabase db reset and CI that replays migrations (Supabase discussion 45329, final-notice email of Oct 20, 2026). Our rule (sv-db CLAUDE.md): every migration that creates such an object states its grants explicitly for anon, authenticated and service_role in the same migration. Revoke what a role must not have and grant exactly what it needs, including service_role for anything edge functions touch. Never rely on default privileges. RLS still governs rows, and writes stay in SECURITY DEFINER fn_v2_* RPCs. A pgTAP guard checks it. See Database.
The Oct 7 S1 correction: held PRs sv-db #19, #20 and #21 each carried only their own migration, so the three-line runbook would have stopped after the first push (and their worktrees had no project-ref). sv-db #24 combines them, plus #25 below, in one linked worktree (.worktrees/s1-combined-2026-10-07, head 91c06b4; local reset plus pgTAP: Files=26, Tests=571, PASS) for one founder push with --include-all. Applied Oct 11, 2026: the founder ran the one push line from that one linked worktree at 05:45 EDT, and all four migrations are in production (verified by the CLI and the Supabase MCP): 20260929055932_item_measurements_required (the item-measurement trigger is live), 20260929183500_referral_codes_revoke_anon_grants (referral_codes has no anon or PUBLIC grant), 20260929183600_ops_monitor_webhook_ingestion_check (the ops monitor’s ingestion-freshness check is live) and 20261007232348_reconcile_gate_a_quiet (the Gate A reconciler quiet fix is live). The security baseline was updated (sv-db c230b5c), sv-db #24 merged to main as 184cebc with CI green, #19, #20, #21 and #25 are merged or closed, and the S1 worktrees and branches are removed.
Reconciler During Rollover Gate A (fix live Oct 11, 2026)
The reconciler (fn_v2_reconcile, cron sv-v2-reconcile every 20 minutes, checks in fn_v2_reconcile_invariants) reported svc_missing_grant for every running member (trialing, active or past due) while service rollover sits in Gate A (DEC-029): plans.service_allowance_enforced is false and nothing writes period grants yet (the grant writer is the held sv-edge #14). Every run therefore emailed ops a reconciliation alert, about 72 a day. The fix is sv-db #25, migration 20261007232348_reconcile_gate_a_quiet, folded into #24: it gates the two allowance checks (svc_missing_grant and svc_draw_missing) on plans.service_allowance_enforced and leaves every other invariant unchanged. Live in production since Oct 11, 2026 (applied with sv-db #24, merge 184cebc). Once the flag is true both checks report as before, so Gate B must seed current-period grants for every running member before or with the flag flip, or every member reports at once.
Continuous Integration
Since Oct 7, 2026 sv-edge and sv-db run GitHub Actions CI (.github/workflows/ci.yml) on every pull request and every push to main. Neither job links a Supabase project, deploys or reads a production secret, so CI cannot reach production. The first runs on main passed. CI is not a required status check: a red run does not block a merge. sv-portal-2026, sv-website and this wiki have no CI.
| Repo | Runs | Pinned | Not run |
|---|---|---|---|
sv-edge (PR #32, main 74e21ba) | ./scripts/check-deps.sh (dependency pins and deno check; since sv-edge #31, Oct 11, 2026, a type error fails the script and turns CI red); the verify-*.ts unit tests (referral reward, checkout session params, subscription end state, trial_ending render, visit window formatting); render-email-previews.ts with the email checks | Deno 2.9.7, matching the Mac Studio | deno fmt --check and deno lint are not gates yet (the repo does not format or lint cleanly); smoke-edge.sh and the staff-gate test call the live project |
sv-db (PR #26, main e852dbf) | supabase db start, supabase db reset --local (rebuilds from every migration on a throwaway Postgres in the runner), then the full pgTAP suite (supabase test db --local) | Supabase CLI 2.120.0, matching the Mac Studio | No project link: no project ref, no --linked, nothing that can push a migration |
Git Configuration
| Setting | Value |
|---|---|
| Author Email | zach@mystoragevalet.com |
| Author Name | Zachary Brown |
Use only real, verified email addresses. Fabricated emails cause Vercel permission failures.
Architecture Constraints (Non-Negotiable)
- 6 customer surfaces only: Login, Dashboard, Items + Add Item, Item Detail, Booking, Account
- Staff routes live in the v2 portal’s
/opssurface (portal.mystoragevalet.com/ops), staff-gated (is_staff()) and AAL2-stepped-up - Supabase backend only — no custom API servers
- Stripe Hosted flows only — no custom card UI
- Single pricing tier: $279/month
- Magic links only — no password auth
- Portal is authentication-only — account creation happens exclusively through the website registration flow (Stripe Checkout). The portal login does not create new users.
- RLS on all tables — zero cross-tenant access
- Private storage bucket — signed URLs, 1h expiry
Architecture Notes
Insurance Coverage & Capacity (one custody predicate)
Included insurance coverage ($2,000 per customer) and plan capacity (200 cu ft) are enforced server-side. Both meters derive from the single shared custody predicate fn_v2_item_in_custody — an item counts toward space and coverage when it is stored or scheduled for delivery (still in SV’s hands). The portal binds to the v_v2_insurance_coverage read-model; no limits are hardcoded in the frontend (F13, Jul 13, 2026).
Per-customer overrides & the four-reader cap contract (F13.1, Jul 15, 2026): effective caps are coalesce(customer_profile.insurance_cap_cents_override, plans.insurance_cap_cents) and coalesce(customer_profile.storage_capacity_cubic_feet, plans.cubic_feet_limit). Overrides are ops-set only — customer UPDATE on the override column is revoked. Exactly four readers resolve the coverage cap: the v_v2_insurance_coverage view, fn_v2_read_meter_preview, sv.fn_v2_meter_thresholds_check, and fn_v2_ops_booking_detail. Any future cap change must touch all four in the same migration. Crossing plans.meter_warn_threshold_pct (80%) records a meter_threshold_crossed event — an ops signal, never a customer upsell. Portal meter copy states what is and routes to a human; product mechanics and pricing are banned (guard-tested in meterStrings.test.ts).
Ops missing-dimensions counts (F1, Jul 17, 2026): the /ops booking-detail surface shows two measurement-gap counts from fn_v2_ops_booking_detail: items_missing_dims is manifest-scoped (the unmeasured items on this visit — the work-prompt staff act on at pickup) and account_items_missing_dims is the account-wide backfill count (every unmeasured item the member owns, independent of the current booking). Migration 20260717170000.
Scheduled-in space preview (F4, Jul 19, 2026): the dashboard space meter now previews inbound pickup-scheduled items from two append-only view columns (scheduled_in_cubic_feet, scheduled_in_has_unmeasured; the view is now 16 columns). The render is annotation-primary — “space is measured at pickup” in membership voice — with a hatched +N% segment only when a measured sum exists; the number is suppressed when the known sum is 0 and unmeasured items remain. Customer copy stays percent-only (never cubic feet), guard-tested in meterStrings.test.ts.
Common Issues & Solutions
| Issue | Solution |
|---|---|
| Webhook 401 | Deploy with --no-verify-jwt |
| CORS blocking POST (OPTIONS 200, POST never fires) | Ensure Access-Control-Allow-Headers includes apikey, x-client-info alongside authorization, content-type |
| Edge function auth 401 despite valid JWT | Use getUser(token) with explicit token arg, not getUser() on a stateless client |
| Migration not applied | Run supabase db push --remote |
| Docker not running | Start Docker Desktop |
| RLS blocking query | Check user_id matches auth.uid() |
| Preview auth redirects fail | Supabase Auth requires preview domains to be allowlisted in URL Configuration (Redirect URLs). If not allowlisted, magic links may redirect to production or fail. |
| React Query key mismatch | Bookings list cache uses query key ['bookings-list']. Do not invalidate ['bookings'] expecting it to refresh the dashboard; ensure key alignment. |
| Mac Studio disk filling up — Photos ignoring “Optimize Mac Storage” | macOS purges evictable iCloud content on demand only, never on a schedule or threshold — so it will sit on 130 GB+ of local originals indefinitely while free space looks comfortable. Force it: write a ballast file with mkfile <N>g, then request more space than remains free (e.g. mkfile 32g with 12 GB free) so macOS must purge to satisfy it; repeat, then rm every ballast file in a separate command (a trailing cleanup line in a long loop can be killed by a timeout, stranding the ballast). Verify the evictable pool first via read-only SQL on Photos.sqlite (ZINTERNALRESOURCE: ZLOCALAVAILABILITY=1 AND ZREMOTEAVAILABILITY=1 is safe to purge). Recovered 120 GB with zero data loss Jul 28, 2026. CleanMyMac does not block native purging (tested); never accept its offer to remove Photos Library.photoslibrary — that deletes the whole library, unverified, while the Photos daemons are live. |
Platform Operations Toolkit
A tiered toolkit for session integrity, repository hygiene, and infrastructure observability. Introduced March 2026 after an orphaned PR went undetected for 35 days. See DEC-017 for rationale.
Commands
| Command | Purpose | When to Use |
|---|---|---|
sv-audit |
Session integrity and repo hygiene detection. Checks git status, stale PRs (>7d), orphan branches (>30d), secrets tripwire, root directory policing, Claude Code compaction setup (default window with no override, hold + git-state hooks, no overrides), leaked code-sign clone detection (apps like Chrome that crash-loop and accumulate temp copies of themselves), 1Password socket cleanup. Non-destructive. | End of every session (mandatory) |
sv-hygiene |
Deletes remote branches already merged into main. Never deletes unmerged work. | Weekly, or after audit flags stale branches |
sv-health |
Platform observability: Supabase migration drift, Vercel deployment failures, GitHub Actions failures, Stripe webhook backlog. | Weekly, or when verifying production health |
sv-check |
Unified command: runs audit, auto-triggers hygiene if ATTENTION, runs health checks, then the Sales-Engine smoke test. | The "is everything OK?" command |
sales-engine-check.sh |
Non-destructive smoke test of the Sales-Engine across every layer: data source-of-truth + drift, local asset generation + QR decode, send-pipeline safety gates (no email sent), and live promo-page reachability. Drive desktop distribution was retired Sep 16, 2026; a missing mount must not trigger a client relaunch or publisher run. Standalone: bash ~/Documents/storagevalet/Marketing/Collateral/promo-cards-v6/sales-engine-check.sh; also runs automatically inside sv-check. |
After changing the Sales-Engine; runs in every sv-check |
uptime.yml (sv-docs) |
Hourly external probe of www, portal, wiki, the edge runtime and PostgREST; an open uptime issue in sv-docs means an outage. Details: Uptime Probe. |
Automatic, hourly; by hand with gh workflow run uptime.yml -R StorageValet/sv-docs |
All Shell Shortcuts
Defined in ~/.zshrc. Run sv-help to see this list in the terminal.
| Command | What It Does |
|---|---|
sv <repo> | Navigate to a repo (e.g., sv portal) |
sv-status | Git status across all 7 repos (SV_REPOS) |
sv-pull | Pull latest across all 7 repos (SV_REPOS) |
sv-audit | Run the end-of-session audit script |
sv-hygiene | Weekly repo cleanup (merged branches) |
sv-health | Platform health check (migrations, deploys, webhooks) |
sv-check | Full platform check (audit + hygiene + health) |
sv-remote | Pre-flight checks for remote Claude Code sessions (1Password unlock, secrets, Docker, 1Password biometric agent socket for git signing, GitHub CLI) |
sv-issues | Open GitHub issues across all repos |
sv-env | Load secrets from 1Password (cached for sub-agents) |
sv-env-clear | Clear cached secrets and remove session file |
sv-help | Show all available commands |
gt-help | Show Ghostty keyboard shortcuts and tips |
title <name> | Set iTerm2 tab title (no args = reset to auto directory name) |
stripe | Authenticated via STRIPE_API_KEY env var (from sv-env); auto-detects live mode. For test mode: env -u STRIPE_API_KEY stripe <cmd>. |
iTerm2 Tab Auto-Naming
Tabs automatically show the current directory name via a precmd hook in ~/.zshrc. Use title "My Topic" to set a custom title, or title (no args) to reset to auto. Claude Code also sets the tab title to the chat name when running.
Setup (one-time per machine): Disable custom tab titles in iTerm2’s plist (quit iTerm2 first, run via Terminal.app), then add the _update_tab_title precmd function and title() helper to ~/.zshrc. Both machines were configured March 2026.
Ghostty Config Sync
Ghostty configuration lives in iCloud at ~/Documents/storagevalet/Technology/Ghostty/config and is symlinked to ~/.config/ghostty/config on each machine.
Clickable folder paths — use file:// URLs, not Ghostty config. Agents render folder/file deliverables as bare file:// URLs (absolute path, spaces as %20) so Zach can Cmd+click straight to Finder — verified working in Ghostty 1.3.1 on Jul 15, 2026. This works because link-url = true already matches URL schemes. It must be a bare URL: a markdown link hides the URL text and the matcher never sees it. Do not attempt to configure this via Ghostty’s link option (custom regex → clickable file paths) — it is documented but stubbed out (TODO: This can’t currently be set! as of 1.3.1), so any such config silently does nothing. Re-check link on major Ghostty upgrades; a real regex matcher would supersede the convention. Enforced as rule 8 in the global CLAUDE.md.
1Password SSH Agent
The 1Password SSH agent is configured on both machines for any SSH-based operations (ssh to other hosts, SSH-backed git clones, etc.). Git commit signing is intentionally disabled — 1Password’s signing-authorization prompts appear on the Mac Studio screen and cannot be answered when working remotely via the Claude app’s code tab. Sole-developer context plus private repos means signing has no practical benefit to offset that friction.
| File | Purpose |
|---|---|
~/.zshrc | Exports SSH_AUTH_SOCK pointing to the 1Password agent socket |
~/.ssh/config | Sets IdentityAgent to the same socket for all hosts |
~/.config/1Password/ssh/agent.toml | Tells the 1Password SSH agent which key to serve (required — auto-discovery is unreliable) |
SSH_AUTH_SOCK (in ~/.zshrc):
export SSH_AUTH_SOCK="$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
agent.toml (in ~/.config/1Password/ssh/):
[[ssh-keys]] item = "Github SSH Key (SV)" vault = "Storage Valet"
Key details: The SSH key is a single ed25519 key named “Github SSH Key (SV)” stored in the Storage Valet vault. Both machines share the same key via 1Password vault sync. The key is registered on GitHub for authentication on any SSH-based git remotes.
Script Locations
All scripts are canonical in ~/code/sv-docs/scripts/ (git-tracked). A convenience symlink at ~/code/sv-final-audit.sh points to the canonical audit script for manual use, but no script depends on this symlink.
| Script | Canonical Path |
|---|---|
| Session audit | ~/code/sv-docs/scripts/sv-final-audit.sh |
| Repo hygiene | ~/code/sv-docs/scripts/repo-hygiene.sh |
| Platform health | ~/code/sv-docs/scripts/platform-health-check.sh |
| Unified check | ~/code/sv-docs/scripts/sv-check.sh |
| Retired Drive backup (Sep 16, 2026) | ~/code/sv-docs/scripts/sv-backup.sh — historical path; do not schedule or relaunch |
Backups and Desktop-Sync Retirement
Current status — founder decision, Sep 16, 2026
Google Drive and Dropbox desktop sync, the daily 03:00 Drive backup, and local Drive publishing are retired. Do not automatically relaunch either desktop client, re-enable com.storagevalet.backup, or run the retired Drive publisher during setup, maintenance, audits, or asset generation.
This is a desktop-workflow retirement. Google and Dropbox accounts, existing cloud files and sharing permissions remain unchanged. Gmail, Google Calendar, and provider connector availability are unchanged. Existing cloud-only documents, shared objects and contract workflows remain available through manual web access; desktop retirement does not mean their links are broken.
Current business source: ~/Documents/storagevalet/. Start with its START-HERE.md for working locations. Preserved local cloud exports are filed at ~/Documents/storagevalet/_Archive/2026-09-16-cloud-retirement/preserved/; the retained cloud accounts remain the access path for cloud-only objects.
Replacement backup status: a local restore ZIP was created and verified on Sep 17, 2026 at ~/Library/Application Support/Storage Valet/Backups/Storage-Valet-local-restore-20260917T072833Z.zip (5,237 regular files; 6,963,218,581 ZIP bytes). Every archive member passed CRC and SHA-256 checks, and the postcard PDFs and source files passed sample restore checks. The capture had no dataless or read gaps; regenerable caches and Git metadata were excluded, and symbolic links were preserved without following them. This is a file-data restore point, not a complete Mac image. An off-device backup replacement is not configured. iCloud is sync, not backup — deletions can propagate. A local restore point alone does not protect against losing the Mac. GitHub separately retains pushed repository history.
Superseded — Drive backup pipeline, retired Sep 16, 2026
The daily sv-backup.sh job (launchd com.storagevalet.backup at 03:00, a ZIP of ~/Documents/storagevalet moved to Google Drive) and the Sep 1, 2026 decision that accepted Drive as the only off-device backup are both superseded by the Sep 16 retirement. Neither is evidence of current off-device coverage (tracking: sv-docs#5). Do not restart the retired agent to test anything. Its two silent-failure incidents (Jun 7 to Jul 12 and Aug 7 to Aug 26, 2026) are in git history.
Lesson retained: a backup can fail silently by producing unusable output or by never running. zip -T proves structure, not contents, and a terminal run cannot prove a scheduled job can read its sources. Validate any replacement in its real execution context and check the newest artifact’s age, contents, size and ability to restore.
Design Principles
- Non-destructive audits:
sv-auditreads only (except 1Password socket cleanup). It never modifies git state, GitHub, or infrastructure. - Explicit cleanup:
sv-hygieneis a separate, opt-in command. It only deletes branches confirmed merged into main. - Canonical paths: Scripts reference
~/code/sv-docs/scripts/directly. Symlinks exist for convenience but are not dependencies. - Dual observability: Stale PRs are detected at session start (bootstrap snippet) and session end (audit script).
Developer Setup
Code Repositories
~/code/ ├── sv-portal-2026/ # LIVE customer portal (Vite 8 / React 19 / Tailwind 4) — cut over Jun 10, 2026 ├── sv-portal/ # v1 portal (Vite 5 / React 18 / Tailwind 3) — DECOMMISSIONED + archived Jun 29, 2026 ├── sv-edge/ # Supabase Edge Functions (Deno/TypeScript) ├── sv-db/ # Database migrations (SQL) ├── sv-docs/ # Operational scripts, runbooks, and archive ├── sv-website/ # Landing page (www.mystoragevalet.com) ├── sv-metrics/ # Metrics dashboard (Vite / React 19 / Tailwind 4); private GitHub repo StorageValet/sv-metrics └── sv-wiki/ # Internal wiki (wiki.mystoragevalet.com)
Sync Strategy
Mac Studio (primary): iCloud Desktop & Documents sync ON, all files stored locally.
MacBook Air (secondary, out of commission since Sep 23, 2026): iCloud sync ON + "Optimize Mac Storage" ON (auto-offloads when space is tight).
Google Drive / Dropbox desktop sync: Retired Sep 16, 2026; no automatic relaunch. Cloud accounts, files, sharing and manual web access remain available. See current backup status and the retired workflow. iCloud remains sync, not backup.
File organization (Jun 2026): ~/Documents has two domains — storagevalet/ (all business files) and personal/ — documented on disk in ~/Documents/_README.md. Machine tooling must stay at storagevalet/Technology/{Brewfile, Shell/, Ghostty/, Raycast/}: Raycast script registration, the Ghostty config symlink, and sv-audit drift checks hard-code these paths on both machines. Relocating them breaks tooling everywhere (happened Jun 10, 2026 via an automated Documents cleanup; restored same day).
New Machine Setup
When setting up Claude Code on a new machine:
- Ensure iCloud Desktop & Documents sync is enabled (System Settings → Apple ID → iCloud → iCloud Drive)
- Create symlinks:
ln -sf ~/Documents/storagevalet/Technology/Reference/CLAUDE.md ~/.claude/CLAUDE.md ln -sf ~/Documents/storagevalet/Technology/Reference/code-CLAUDE.md ~/code/CLAUDE.md
- Clone repos to
~/code/:sv-portal-2026,sv-edge,sv-db,sv-docs,sv-website,sv-wiki - Install Node.js via Homebrew:
brew install node@24(do NOT use .pkg installer) - Install CLI tools:
brew install supabase gh stripe deno pipx - Install Homebrew-managed casks:
brew install --cask 1password-cli appcleaner bettermouse claude-code@latest cleanshot codex cursor font-jetbrains-mono framer gcloud-cli ghostty hazel loom miro obsidian rectangle-pro spotify textexpander typora visual-studio-code whimsical wispr-flow
Note:claude-codecask is used on Mac Studio. On MacBook Air, Claude Code is installed via the native installer (claude install, installs to~/.local/bin/claude). Do NOT install via npm — the npm package@anthropic-ai/claude-codeis deprecated in favor of native installers. - Install remaining apps directly: Docker Desktop (required for Supabase CLI), 1Password (biometric agent for
opCLI), iTerm2 (custom Dock icon; has reliable built-in updater), Google Chrome — these must NOT be installed via Homebrew as replacement can break system integrations - Do not install or enable Google Drive / Dropbox desktop sync or the retired 03:00 Drive backup as part of default machine setup. Use manual web access to retained cloud files until a replacement workflow is approved.
- Run
op signinto authenticate 1Password
App Update Strategy
Desktop apps are managed in three tiers:
- Homebrew casks (the Brewfile lists them): Updated via
brew upgrade --greedy. The--greedyflag is required because most casks are markedauto_updates, which plainbrew upgradeskips. Includes desktop apps, CLI tools, and fonts. - App Store apps: Updated via
mas upgrade(requires password in terminal). - Direct-install apps (1Password, Docker, iTerm2, Google Chrome): Self-update or update via their own mechanisms. These are excluded from Homebrew to avoid breaking system-level integrations (biometric auth, Docker VM). Retired Drive / Dropbox desktop clients must not be relaunched or re-enabled by maintenance.
Daily maintenance is the Claude Code command /update (canonical file Technology/Reference/claude-commands/update.md, since 2026-07-08): tooling updates (Homebrew, npm globals, plugins, App Store), MCP/connector health, platform health (sv-health), stale-session cleanup and background-session review, in one compact table. Zach also runs the Raycast script SV Update All (sv-update-all.sh) daily for a quick pass outside Claude Code: Homebrew (--greedy + cleanup), the App Store check, Docker cleanup (guarded), Claude Code plugin updates and a disk check. The other old Raycast maintenance scripts (Claude Plugin Update, SV Git Status, SV Pull All Repos, SV Final Audit, SV Migration Status, SV Edge Functions) were retired 2026-10-19, after the ;update snippet (2026-07-08); the shell functions sv-audit, sv-health, sv-pull and sv-check cover them. Raycast keeps SV Update All, launch shortcuts (sv-open-*), small utilities and the Adventure Quest launchers in Technology/Raycast/Scripts/. Note for agents: the plugin-update loop must pipe through while read because zsh does not word-split unquoted variables.
A shared Brewfile at ~/Documents/storagevalet/Technology/Brewfile (iCloud-synced) is the canonical source for all Homebrew-managed packages. On a new machine, run brew bundle install --file=~/Documents/storagevalet/Technology/Brewfile then skip machine-specific packages as needed (see per-machine notes above).
Machine Topology & Machine-Aware Maintenance (single source of truth)
Why this exists: the MacBook Air is disk/RAM-constrained, so apps it doesn’t use locally get removed. The old uniform maintenance routine assumed both machines were identical, so every removal broke it. Per-machine divergence is now declared data, not implicit state.
- Status (since Sep 23, 2026): the MacBook Air is out of commission and the Mac Studio is the only working machine. Skip MBA parity and follow-ups until the founder says otherwise; the MBA configuration notes on this page stay correct for when it returns.
- Mac Studio = canonical dev environment (always-on, caffeinated, RC host). Runs the FULL daily SV maintenance protocol.
- MacBook Air = thin-ish client; dev work happens via RC into the Studio, with light local upkeep only. Aggressive local app removal is expected and fine.
- Selector:
~/.sv-machine(local, non-synced,studio|mba) — deliberately a local marker, not the hostname, because both machines report hostnameMac. - Data:
~/Documents/storagevalet/Technology/machine-profiles.md(iCloud, shared). Read both before treating any absence as a problem. - Intentionally-absent tools are intentional — do NOT reinstall or flag as drift. MBA: Docker (reinstall on-demand, only where a migration runs) + GitHub Desktop. Studio: GitHub Desktop (removed Jun 29, 2026; redundant with Claude Code, Codex,
ghCLI, web UI). Docker IS present on the Studio (the dev/migration machine) — keep it.
The ;update routine now carries a Part 0: Machine awareness preamble: read the selector + profile first, never flag declared-absent tools, run only light upkeep on a thin client, and never let one failed formula abort the whole brew upgrade batch.
Stripe CLI = homebrew-core stripe-cli on BOTH machines. The legacy stripe/stripe-cli tap was removed Jun 29, 2026 after a completion-file collision aborted a --greedy upgrade (silently blocking every step queued behind it). The Brewfile no longer taps it — do not re-add the tap.
A “successful” brew upgrade can leave the package uninstalled. On Sept 1, 2026 brew upgrade pipx printed Upgraded 1 requested outdated package / pipx 1.16.7 -> 1.17.1 and exited 0, but afterwards /opt/homebrew/Cellar/pipx did not exist and brew info pipx reported Not installed. Because the GA4 MCP launcher ends in exec pipx run analytics-mcp, the analytics connector died instantly — the only symptom being analytics-mcp … ✘ Failed to connect in claude mcp list. Fix: brew install pipx, then re-run claude mcp list to confirm ✔ Connected. Same family as the stripe-tap and stuck-cask-metadata incidents: brew's own success output is not evidence the tool is on disk. When a maintenance run upgrades a formula that something else execs, verify the binary resolves (which <tool>) rather than trusting the upgrade summary.
Portability Rule
~/.claude/CLAUDE.md must never contain absolute paths starting with /Users/ or /Library/. Use ~/ and symlink resolution instead. Both CLAUDE.md files are iCloud-synced via symlinks:
~/.claude/CLAUDE.md→~/Documents/storagevalet/Technology/Reference/CLAUDE.md(global context)~/code/CLAUDE.md→~/Documents/storagevalet/Technology/Reference/code-CLAUDE.md(cross-repo session startup)
Session Startup Checklist
Run these steps at the beginning of each Claude Code session (human or agent):
- Check for CLAUDE.md sync conflicts:
CLAUDE_DIR="$(cd "$(dirname "$(readlink ~/.claude/CLAUDE.md || echo ~/.claude/CLAUDE.md)")" && pwd)" ls "$CLAUDE_DIR" 2>/dev/null | grep -i conflict && echo "CLAUDE.md CONFLICT — resolve before continuing"
- Pull latest for all repos:
for repo in sv-portal-2026 sv-edge sv-db sv-docs sv-website sv-wiki; do (cd ~/code/$repo && git pull); done
- Verify migrations:
supabase migration list --remote - Read context:
~/.claude/CLAUDE.mdand~/code/CLAUDE.md - Docker Desktop must be running for Supabase CLI
Session End Protocol
- Run
sv-audit(orsv-checkfor full platform verification) — do not declare clean untilAudit: CLEAN - If the audit flags GitHub hygiene issues (stale PRs, orphan branches): review and resolve
- If session was significant (deploy, E2E verification, architecture decision): update the relevant SV-Wiki pages and bump each page’s
Last updated:line - Run
python3 ~/code/sv-wiki/generate-llms.py— skipping it leavesllms.txtandllms-full.txtstale even when the HTML is correct, and those endpoints are what most agents actually read - Commit the HTML plus both regenerated endpoints together and push to
main(instant production; there is no CI)
See Platform Operations Toolkit for the full command reference.