Receives OpenPGP ciphertext from approved website origins, stores only ciphertext in val-scoped blob storage, and emails the armored ciphertext plus a downloadable .asc backup. The optional sender name remains cleartext for the email subject. Message-management routes require a bearer token and are intended for the local GPG reader.
main.tsx — public submission API and protected reader routesshared.ts — validation and record typesstorage.ts — val-scoped blob storage and retention logiccleanup.ts — scheduled retention cleanupRequired for every deployment:
ALLOWED_ORIGINSEXPECTED_KEY_IDINBOX_TOKENEmail delivery:
EMAIL_TO_SELF=trueNOTIFICATION_EMAIL=recipient@example.com and omit or set EMAIL_TO_SELF=falseOptional:
RETENTION_DAYS (default 30)SUBMISSION_LIMIT_PER_10_MINUTES (default 10)The private OpenPGP key and plaintext are never uploaded to Val Town or included in email.