feat: contact form — method selector, zod validation, Nostr delivery

ContactForm wires vee-validate + zod against the inquiry payload:
optional name, required method (Email/WhatsApp/Signal/Telegram/Nostr),
contact value validated per method (email regex, phone-or-handle,
@handle, npub1 prefix), and a 10-2000 char message. On submit the
form calls submitInquiry() from the Nostr feature and toasts the
result — partial relay acceptance still counts as success and is
surfaced to the visitor.

PrivacyBlurb sits above the form explaining the model in plain
language: encrypted in the browser, delivered through Nostr, no
server in between. Lock icon plus terse copy — the goal is to put a
non-Nostr-native visitor at ease without a wall of jargon.

.env.example documents the two build-time vars (VITE_OWNER_NPUB,
VITE_NOSTR_RELAYS) the form depends on.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-05-27 11:24:32 +02:00
commit def88eacad
4 changed files with 252 additions and 4 deletions

15
.env.example Normal file
View file

@ -0,0 +1,15 @@
# Earth Walker Design — site env vars
#
# Both are inlined at build time by Vite. To rotate either, edit
# values here, then rebuild + redeploy.
# The Nostr public key that receives encrypted inquiry submissions.
# Bech32 npub1... form. Generate via `nak key generate` (fiatjaf/nak)
# or any Nostr client.
VITE_OWNER_NPUB=
# Optional. Comma-separated wss:// relay URLs the inquiry form
# publishes to. If unset, defaults to:
# wss://relay.damus.io,wss://nos.lol,wss://relay.nostr.band
# The submission succeeds if at least one relay accepts the event.
VITE_NOSTR_RELAYS=