Code audit: fix Gmail sync persistence, remove Vercel, clean up for Vapron-only #4059
ccantynzcommented Jun 15, 2026
Originally written by @vercel[bot] on GitHub.
Deployment failed with the following error:
There is no GitHub account connected to this Vercel account.ccantynzcommented Jun 15, 2026
Originally written by @vercel[bot] on GitHub.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| alec-rae-com-admin | Jun 15, 2026 2:03pm |
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/AlecRae.com/pull/72
$(cat <<'EOF'
Summary
Full codebase audit across 6 parallel agents covering infrastructure, Google auth, business email, API routes, frontend, and database. Three code fixes applied from audit findings:
fetchAndStoreGmailMessage()previously only didconsole.log; it now callsstoreReceivedEmail()with proper base64url decoding and recursive MIME-part walking for Gmail payloads. Connecting Gmail will now populate the inbox.vercel.json(root,apps/web,apps/admin). Vapron is the only deployment target.vercel env pullsteps fromstandalone-deploy.yml. Thedeploy-vapronjob now usesVAPRON_API_KEYsecret directly with no Vercel fallback..env.example— Added Google OAuth vars (GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,GOOGLE_AUTH_REDIRECT_URI,GOOGLE_REDIRECT_URI,MICROSOFT_*); added Vapron section; removed SES/MailChannels relay and S3/MinIO examples.CLAUDE.md— Infrastructure stack table updated: Vapron replaces Cloudflare Pages/R2 and Fly.io.Audit Findings (for Craig — action required on box)
🔴 Blocking — must set these env vars on 149.28.119.158
# API won't boot in production without all 4: DATABASE_URL=postgresql://... JWT_SECRET=$(openssl rand -base64 48) # must be ≥32 chars, stable WEBAUTHN_RP_ID=alecrae.com WEBAUTHN_ORIGIN=https://mail.alecrae.com # Google login (silent fail if missing): GOOGLE_CLIENT_ID=<from Google Cloud Console> GOOGLE_CLIENT_SECRET=<from Google Cloud Console> GOOGLE_AUTH_REDIRECT_URI=https://api.alecrae.com/v1/auth/callback/google GOOGLE_REDIRECT_URI=https://api.alecrae.com/v1/connect/callback/gmail # Vapron (transactional email, AI, storage): VAPRON_API_KEY=vpk_... VAPRON_WELCOME_EMAIL=true🔴 Google Cloud Console (one-time setup)
https://api.alecrae.com/v1/auth/callback/googlehttps://api.alecrae.com/v1/connect/callback/gmailGOOGLE_CLIENT_ID+GOOGLE_CLIENT_SECRETfrom downloaded JSON🔴 DNS (for business email)
alecrae.comA →149.28.119.158(apex still points to Vercel legacy)mx1.alecrae.comA →149.28.119.158mx2.alecrae.comA →149.28.119.158149.28.119.158→mail.alecrae.com(set via Vultr panel)🔴 Run DB migrations after pulling
bun run -C packages/db build bun run db:migrate # creates 149 tablesTest plan
alecrae-apimail.alecrae.com/login→ click "Sign in with Google" → should complete without errorhttps://claude.ai/code/session_017mhAkS4qhMjcvVnyFi61xp EOF
Generated by Claude Code