Vercel Logo

Deploy Your Docs

The Vercel project from lesson 1.1 still contains the starter stubs. Push the API and documentation changes to update the deployment.

This lesson publishes and verifies those changes.

Outcome

Push your changes to redeploy the feedback API, then verify that an agent-style fetch can reach and read its documentation.

Fast Track

  1. Commit your changes and push to your repo
  2. Vercel redeploys automatically
  3. Inspect the status, content type, and body returned by the live documentation endpoints

Push and redeploy

Since your project is already connected to Vercel from the deploy button in lesson 1.1, every push to main triggers a new deployment automatically. Commit your latest changes and push:

git add -A
git commit -m "feat: add feedback API, docs, and llms.txt endpoints"
git push

Open the Vercel dashboard to follow the build. When it finishes, the live URL will serve the new routes.

Try It

Replace the URL below with your deployment URL and verify each endpoint.

Fetch the llms.txt file with redirects enabled and an agent user-agent string:

curl -iL -A 'Claude-User/1.0' \
  https://your-project-name.vercel.app/llms.txt

The final response should be 200 with Content-Type: text/plain; charset=utf-8. Its body should contain the project name, summary blockquote, and links to your endpoints. A successful status without the expected content does not prove that the documentation is readable.

Fetch the API docs via the markdown endpoint:

curl -iL -A 'Claude-User/1.0' \
  https://your-project-name.vercel.app/api/docs.md

The final response should be 200 with Content-Type: text/markdown; charset=utf-8. The body should contain the endpoint signatures, parameter tables, and examples without requiring JavaScript to add them later.

Fetch some feedback:

curl https://your-project-name.vercel.app/api/feedback

You should see the JSON array of seed feedback entries.

What this curl test can prove

This request confirms what your network receives for one agent-style user-agent string. Bot protection also considers where a request originates, so a successful request from your laptop cannot prove that every production agent can fetch the page. Use deployment and firewall logs when you need to verify real agent traffic.

Optional: scan the deployment

Is Agentic runs an Ora readiness scan against a public URL. Enter your deployment URL, then review the evidence for Essential checks such as reachability, content without JavaScript, HTTP behavior, and recoverable errors.

Treat the report as a diagnostic snapshot. The scanner also evaluates website and capability-specific surfaces that this small API project does not implement. Fix findings that apply to the API rather than changing the project to chase a perfect score.

Troubleshooting:

  • If you get a 404 on /llms.txt, check that the folder is named exactly llms.txt inside app/. The deployment mirrors your local file structure.
  • If the final response is 403, inspect Vercel Firewall and Bot Management rules before changing the documentation itself.
  • If the response is 200 but the expected headings are missing, confirm the deployed route returns the Markdown string directly rather than an empty client-rendered shell.
  • If the deploy fails with a build error, check the Vercel build logs for TypeScript errors. The production build runs next build, which is stricter than the dev server about type checking.
Data doesn't persist in production

The feedback data lives in a JSON file bundled with the function. A warm instance may observe a file it wrote, but those writes are not durable or shared: a later request can run on another instance or a fresh deployment. This is fine for testing the seed data. For production writes, use Vercel Blob or a database.

Commit

You already committed and pushed in the exercise above. If you made any additional fixes during troubleshooting, commit those too:

git add -A
git commit -m "fix: resolve build issues for production deploy"
git push

Done-When

  • Your latest code is pushed and Vercel has redeployed
  • An agent-style fetch of <your-url>/llms.txt ends with 200 and returns the plain-text llms.txt content
  • An agent-style fetch of <your-url>/api/docs.md ends with 200 and returns the full Markdown API documentation
  • The expected documentation is present in the raw response body without JavaScript
  • Curling <your-url>/api/feedback returns the seed feedback data as JSON

Solution

No new code is required for this lesson. Push triggers a redeploy:

git push

Vercel detects the Next.js App Router project without an additional configuration file. Confirm the deployment by testing the live routes rather than relying only on the local build.

Was this helpful?

supported.