pcbjam/site/.env.example
Viktor Vaczi 37a1df2315 fix(site): wire Resend waitlist via astro:env, fix TS errors + deprecations
- Move secrets to Astro's typed astro:env/server (schema in astro.config.mjs);
  removes process.env usage and the 3 TS2580 "Cannot find name 'process'" errors
  without adding @types/node.
- Replace deprecated contacts.create({ audienceId }) with segments: [{ id }]
  (env var RESEND_AUDIENCE_ID -> RESEND_SEGMENT_ID).
- Check the { error } return on both Resend calls: contact add is best-effort
  (non-fatal); a failed confirmation send now returns 502 instead of a false 200.
- Type the waitlist fetch result in WaitlistForm.astro.
- Add @astrojs/check + typescript devDeps and an `npm run check` script.

Verified: npm run check (0 errors), npm run build, secret not inlined into the
build output, and a runtime smoke test of the validation/honeypot/GET paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 14:26:54 +02:00

15 lines
679 B
Shell

# PCBJam marketing site — server-side secrets for the waitlist endpoint.
# Copy to `.env` for local dev, and set these in the Vercel project settings.
# Without RESEND_API_KEY the endpoint still accepts submits (logs + no email),
# so the form UX is testable locally without keys.
# Resend API key (https://resend.com/api-keys). Server-only — never PUBLIC_.
RESEND_API_KEY=
# Resend Segment to add waitlist contacts to (https://resend.com/segments).
# (Resend renamed "Audiences" → "Segments"; this is the Segment ID.)
RESEND_SEGMENT_ID=
# Optional: confirmation sender. Domain must be verified in Resend.
# Defaults to "PCBJam <hello@pcbjam.com>".
WAITLIST_FROM_EMAIL=