full-stack-service-previews
AGENTS.md2 starsChanged 4 months agoMITView on GitHub
Instructions for AI coding agents (and new contributors) working in this repository. A Vercel Services template: three services in one project, deployed together as one immutable deployment for each Git-triggered commit deployment. vercel.json is the source of truth for service roots, the private binding, and public routing. If you add, rename, or re-route a service, change it there first. Use Node.js 24.x, Vercel CLI 59.0.0 or newer, Python 3.12 or newer, and Docker Desktop. Go 1.26 or newer is only…
- Reads credentials
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Use Node.js 24.x, Vercel CLI 59.0.0 or newer, Python 3.12 or newer, and Docker Desktop.
- Distinctive: line 47
Run the checks for every service you touched.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent guide
Instructions for AI coding agents (and new contributors) working in this repository.
What this repository is
A Vercel Services template: three services in one project, deployed together as one immutable deployment for each Git-triggered commit deployment.
| Path | Service | Language / runtime | Exposure |
apps/web/ | Storefront and preview inspector | Next.js (App Router, TypeScript) | Public: all routes except /api/v1/checkout/* |
services/checkout/ | Checkout API | Python, FastAPI (main:app) | Public: /api/v1/checkout/* via rewrite |
services/reservations/ | Reservations engine | Go, Gin, built from Dockerfile.vercel | Private: reachable only through the service binding |
vercel.json is the source of truth for service roots, the private binding, and public routing. If you add, rename, or re-route a service, change it there first.
Invariants to preserve
- The reservations service has no public route. FastAPI reaches it through
RESERVATIONS_SERVICE_URL, which Vercel injects from thebindingsentry invercel.json. It is not a secret and must never be added to.envfiles or Vercel project env vars by hand. - The public API is versioned. Browser-facing checkout routes live under
/api/v1/checkout/; the rewrite invercel.jsonand the FastAPI route prefixes must stay in sync. - Successful backend responses report service identity (service name, runtime, environment, branch, commit). Git metadata comes from
VERCEL_GIT_COMMIT_REFandVERCEL_GIT_COMMIT_SHA. The services fall back tolocalin development andCLI deploymentfor hosted CLI deployments without Git metadata. Don't strip these fields; the preview inspector inapps/webrenders them. - State is in-memory by design. The Go service guards its catalog with a mutex inside one process. This is a deliberate demo simplification, documented in the README; don't "fix" it by adding a database unless asked.
Commands
Use Node.js 24.x, Vercel CLI 59.0.0 or newer, Python 3.12 or newer, and Docker Desktop. Go 1.26 or newer is only required when editing or testing the reservations service.
npm install # root + apps/web workspace
# Run the full stack through the public rewrite and private binding
vercel dev -L # serves everything at http://localhost:3000
# End-to-end smoke test against a running server
npm run smoke:services # override target with BASE_URL=https://... ;
# protected deployments need VERCEL_AUTOMATION_BYPASS_SECRET
# Per-service checks
npm run check # Next.js typecheck + build
python3 -m venv .venv && \
.venv/bin/pip install -r services/checkout/requirements-dev.txt && \
.venv/bin/pytest services/checkout # FastAPI tests
cd services/reservations && go test ./... # Go tests
docker build -f services/reservations/Dockerfile.vercel services/reservations # container build checkRun the checks for every service you touched; run the smoke test if you changed routing, the binding, or a request/response contract.
Gotchas
npm run dev:webruns only the Next.js workspace. Checkout calls will fail without the other services; usevercel dev -Lfor anything involving the API path.- The Python virtualenvs (
.venv/,services/checkout/.venv/) and__pycache__/are local artifacts and gitignored; never commit them. GUIDE_OUTLINE.md,VERIFICATION.md, anddraft-v2.mdare gitignored local working documents for the companion guide. They are not part of the published template; don't reference them from tracked files.- Git deployments require the Vercel project's Framework Preset to be Services; another preset ignores the services configuration.
- Enable Automatically expose System Environment Variables when the preview inspector must show the Git branch and commit.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

