Skip to content

docs: add missing env vars documentation (verifier config)#251

Open
shrutig-blip wants to merge 2 commits into
AnkanMisra:mainfrom
shrutig-blip:docs/env-vars-verifier-config
Open

docs: add missing env vars documentation (verifier config)#251
shrutig-blip wants to merge 2 commits into
AnkanMisra:mainfrom
shrutig-blip:docs/env-vars-verifier-config

Conversation

@shrutig-blip

@shrutig-blip shrutig-blip commented Jul 5, 2026

Copy link
Copy Markdown

Summary

This PR documents missing environment variables used in the project but not previously included in the canonical configuration docs.

Changes

  • Added NEXT_PUBLIC_VERIFIER_URL to .env.example, README config table, and web/README.md
  • Added MAX_REQUEST_BODY_BYTES to .env.example and README config table

Reason

These variables were being used in code and deployment configs but were missing from documentation, which could lead to misconfiguration for new contributors.

Verification

  • Cross-checked usage via grep in codebase
  • No changes to runtime logic or defaults

Summary by CodeRabbit

  • Documentation
    • Updated setup docs with two new environment settings for verifier warm-up and request size limits.
    • Added the same configuration details to the example environment file, including default values and guidance.

Closes #212

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

@shrutig-blip is attempting to deploy a commit to the ankanmisra's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Hi @shrutig-blip, thanks for opening this PR.

Every contribution helps MicroAI-Paygate grow. If you find the project useful, consider starring the repository — it helps others discover it.

Star MicroAI-Paygate on GitHub

Looking forward to reviewing this PR.

@github-actions github-actions Bot added documentation Improvements or additions to documentation type:docs Documentation, API docs, examples, or contributor docs. labels Jul 5, 2026
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds two new environment variables, NEXT_PUBLIC_VERIFIER_URL and MAX_REQUEST_BODY_BYTES, to .env.example with documentation comments, and updates README.md's Configure instructions and Configuration table to describe both variables.

Changes

Environment variable documentation

Layer / File(s) Summary
Add and document new env variables
.env.example, README.md
Adds NEXT_PUBLIC_VERIFIER_URL (blank default) and MAX_REQUEST_BODY_BYTES (1048576 default) to .env.example with comments, and adds corresponding bullets and table rows in README.md.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary, changes, reason, and verification, but omits several required template sections. Add the missing template sections: Type Of Change, Affected Areas, Contributor Checklist, and Notes For Reviewers, and include exact verification commands and results.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the documentation-only env var update for verifier config.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.env.example:
- Around line 57-63: The new NEXT_PUBLIC_VERIFIER_URL example entry is out of
dotenv order in the env sample. Move the NEXT_PUBLIC_VERIFIER_URL block in
.env.example so it appears above the existing VERIFIER_URL section, keeping the
environment variable examples sorted in the same order expected by
dotenv-linter.

In `@README.md`:
- Line 246: Update the MAX_REQUEST_BODY_BYTES documentation in README to
explicitly state that the verifier only accepts values greater than 0 and will
fall back to the default on zero or invalid input. Make the same wording change
for the other MAX_REQUEST_BODY_BYTES mention as well, so the docs match the
behavior enforced by the verifier configuration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0d60e52e-8274-4282-ba5f-108f612e6cb0

📥 Commits

Reviewing files that changed from the base of the PR and between 33e7fc3 and 08318fa.

📒 Files selected for processing (2)
  • .env.example
  • README.md

Comment thread .env.example
Comment thread README.md Outdated
@shrutig-blip

Copy link
Copy Markdown
Author

Addressed the CodeRabbit review suggestions. Thanks!

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
microai-paygate Ready Ready Preview, Comment Jul 6, 2026 2:03pm

@shrutig-blip

Copy link
Copy Markdown
Author

Hi @AnkanMisra , I have added NEXT_PUBLIC_VERIFIER_URL to .env.example, README config table, and web/README.md and MAX_REQUEST_BODY_BYTES to .env.example and README config table. I have also cross-checked usage via grep in codebase and have submitted a PR. I'd appreciate it if you could take a look when you have time. Thanks!

@AnkanMisra AnkanMisra left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for filling the docs gap here. I checked the current code paths before reviewing, and I think this still needs one more pass before merge:

  1. NEXT_PUBLIC_VERIFIER_URL is genuinely used by the warm-up banner, but the PR still does not document it in web/README.md, which is part of the stated scope in both issue #212 and the PR description.
  2. The new bullets under Edit .env before starting the gateway. At minimum: are misleading because neither variable is a minimum gateway startup requirement. NEXT_PUBLIC_VERIFIER_URL is an optional frontend build-time var, and MAX_REQUEST_BODY_BYTES is an optional verifier tuning knob with a default fallback.

Once those are fixed, this should be in much better shape.

Comment thread .env.example

# Verifier warm-up endpoint used by frontend banner
# Default: see DEPLOY.md (used for frontend warm-up banner)
NEXT_PUBLIC_VERIFIER_URL=

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NEXT_PUBLIC_VERIFIER_URL belongs with the other frontend NEXT_PUBLIC_* examples later in this file. Leaving it here next to VERIFIER_URL means the canonical env sample still stays internally inconsistent: contributors scanning the dedicated frontend block will still miss it.

Comment thread README.md
- `SERVER_WALLET_PRIVATE_KEY`: required for signing receipts. Use an unfunded development key locally.
- `RECIPIENT_ADDRESS`: recipient address embedded in payment contexts.
- `CHAIN_ID` and `EXPECTED_CHAIN_ID`: must match. The default is `84532` for Base Sepolia.
- `NEXT_PUBLIC_VERIFIER_URL`: frontend verifier warm-up endpoint used by the banner to pre-warm the verifier (improves UX; optional).

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These entries do not fit under Edit .env before starting the gateway. At minimum:. NEXT_PUBLIC_VERIFIER_URL is optional and only used by the web warm-up banner, and MAX_REQUEST_BODY_BYTES is an optional verifier limit with a built-in default fallback. Please keep them in the configuration reference, but remove them from the minimum gateway startup list so the setup docs stay accurate.

@AnkanMisra

Copy link
Copy Markdown
Owner

Requesting changes for the full remaining scope here:

  1. Add NEXT_PUBLIC_VERIFIER_URL to web/README.md.
    It is already used by the warm-up banner in web/src/components/cold-start-warmup.tsx, and both issue Document NEXT_PUBLIC_VERIFIER_URL and MAX_REQUEST_BODY_BYTES env vars #212 and this PR description say it should be documented there.

  2. Remove NEXT_PUBLIC_VERIFIER_URL and MAX_REQUEST_BODY_BYTES from the Edit .env before starting the gateway. At minimum: list in README.md.
    Neither is a minimum gateway startup requirement: NEXT_PUBLIC_VERIFIER_URL is an optional frontend build-time variable, and MAX_REQUEST_BODY_BYTES is an optional verifier limit with a default fallback.

  3. Move NEXT_PUBLIC_VERIFIER_URL into the dedicated frontend NEXT_PUBLIC_* block in .env.example.
    Right now it is documented near VERIFIER_URL, but contributors scanning the frontend section will still miss it there.

  4. Keep both variables in the root configuration reference table.
    That part of the PR is useful and should stay once the placement/scope issues above are fixed.

Issue link for tracking: #212

@shrutig-blip

shrutig-blip commented Jul 8, 2026

Copy link
Copy Markdown
Author

Thanks @AnkanMisra for the review! I've addressed the requested changes:

-Moved NEXT_PUBLIC_VERIFIER_URL to the frontend NEXT_PUBLIC_* section in .env.example.

-Removed both variables from the "At minimum" setup list in README.md.

-Added NEXT_PUBLIC_VERIFIER_URL documentation to web/README.md.

-Kept both variables in the configuration reference table as requested.

@AnkanMisra

Copy link
Copy Markdown
Owner

Thanks @AnkanMisra for the review! I've addressed the requested changes:

-Moved NEXT_PUBLIC_VERIFIER_URL to the frontend NEXT_PUBLIC_* section in .env.example.

-Removed both variables from the "At minimum" setup list in README.md.

-Added NEXT_PUBLIC_VERIFIER_URL documentation to web/README.md.

-Kept both variables in the configuration reference table as requested.

i dont see no new commit after i ask for changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation type:docs Documentation, API docs, examples, or contributor docs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document NEXT_PUBLIC_VERIFIER_URL and MAX_REQUEST_BODY_BYTES env vars

2 participants