Services and delivery
The hosted services the site depends on, and what each one does. Resend and Turnstile have no package in the app, because I call them over plain HTTP. The packages for the others are in Application.
Hosting: Vercel
Four Vercel projects, all connected to the one GitHub repository:
| Project | Builds from | Serves |
|---|---|---|
| Production | The production branch | antmejia.com |
| Staging | The main branch | staging.antmejia.com, marked noindex |
| Storybook | The repository root, Storybook build | storybook.antmejia.com |
| Docs | docs-site/, production branch only | docs.antmejia.com |
Only production, main and branches named preview/* create deployments, which keeps the Hobby plan’s daily deployment limit free for releases. Ignored-build-step scripts skip builds when nothing relevant changed. Details and rollback are in Release process.
CI: GitHub Actions
| Workflow | When it runs | What it does |
|---|---|---|
ci.yml (Check PR) | Pull requests that are not drafts | Commit messages, types, formatting, lint, app build, then Storybook and docs jobs when their files changed |
pr-type-label.yml | A PR is opened, retitled or reopened | Applies one type label from the Conventional Commits prefix of the PR title |
release-please.yml | Pushes to main | Keeps the release PR open, and creates the tag and GitHub Release when it merges |
promote-production.yml | After a release, or by hand | Moves the production branch to a tag. Also the rollback path |
The jobs and their order are in Quality gates.
Releases: Release Please
Release Please reads the Conventional Commits since the last tag, opens a release PR that bumps package.json and CHANGELOG.md, and creates the vX.Y.Z tag and GitHub Release when that PR merges. feat is a minor bump, fix a patch, and a breaking change a major. Those two files are owned by Release Please, so do not edit them by hand.
Dependency updates: Renovate
Renovate opens pull requests for outdated packages, waiting three days after a release before it does. Its rules are in renovate.json.
Analytics and errors: PostHog
PostHog (US region) receives cookieless events and scrubbed exceptions from the browser, and receives source maps at build time so stack frames are readable. Browser calls go through a first-party proxy configured in next.config.ts (analyticsRewrites). The setup, the events and what is switched off are in Analytics. Vercel Analytics also counts page views.
Email: Resend
The resume request route sends two emails through Resend’s HTTP API: the visitor’s copy of the resume, and a notification to me. Nothing is stored. The sender and recipient are environment variables.
Bot check: Cloudflare Turnstile
The resume dialog carries a Turnstile widget in interaction-only mode, so it stays hidden unless Cloudflare needs the visitor to act (the widget mode in the Cloudflare dashboard should be Managed or Non-interactive to match). The assistant has no Turnstile check. The API route verifies the token with Cloudflare’s siteverify endpoint, and in production refuses the request if the secret is missing. A small per-instance rate limiter in src/lib/resume-request/rate-limit.ts only blunts bursts; Turnstile is the real abuse control.
Bot check: Vercel BotID
BotID is the gate for POST /api/chat, POST /api/chat/session and POST /api/resume-request. src/instrumentation-client.ts calls initBotId() with the list in src/lib/botid/protectedRoutes.ts, which makes the browser attach BotID headers to fetch calls on those paths. Each handler starts with rejectBots() (src/lib/botid/rejectBots.ts), which returns 403 when checkBotId() flags a bot. A route has to be in both places: a route missing from the client list fails the server check.
Outside production checkBotId() reports a human, so local work is unaffected. If the check itself throws, the request goes on to the rate-limit gates (and Turnstile on the resume request). A real classification only happens on a Vercel deployment, from a page’s fetch; curl against a protected route is blocked in production. Deep Analysis is a dashboard setting (Firewall, Rules) on Pro and Enterprise plans, not something the code turns on.
Content: Sanity
The blog lives in Sanity, a hosted CMS on the Free plan, and I write posts in a Studio deployed to a *.sanity.studio URL. The app reads posts through the Sanity API and Sanity calls a signed webhook to refresh them. Everything else on the site is TypeScript in src/content/. The details and the Free plan limits are in Blog.
Model: Google Gemini
The assistant calls Google’s Gemini API through the AI SDK, on the free tier. The model ID is one line in src/config/assistant.ts. Visitor questions go to Google, and I say so on the Assistant page.
Limits and knowledge: Upstash Redis
An Upstash Redis database from the Vercel Marketplace holds the assistant’s rate-limit counters and the versions of the knowledge the assistant may draw on. Without it the assistant answers with its fallback.
Fonts: Google Fonts, self-hosted
next/font/google downloads the font files at build time and serves them from the site’s own origin.
Search: Pagefind
The docs site is indexed at build time and searched in the browser, with no search service. See This documentation site.