Skip to content

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

Merged
AnkanMisra merged 6 commits into
AnkanMisra:mainfrom
shrutig-blip:docs/env-vars-verifier-config
Jul 9, 2026
Merged

docs: add missing env vars documentation (verifier config)#251
AnkanMisra merged 6 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
Contributor

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 and configuration docs to include NEXT_PUBLIC_VERIFIER_URL for a frontend verifier warm-up banner.
    • Documented MAX_REQUEST_BODY_BYTES (default: 1MB) and clarified behavior for invalid/non-positive values.
    • Refreshed .env.example to reflect the new verifier-related settings.
  • Deployment
    • Added MAX_REQUEST_BODY_BYTES and NEXT_PUBLIC_VERIFIER_URL wiring to the container setup via compose/Docker configuration.

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e2eaf8ba-bf7c-4863-9533-ba66aa9986c8

📥 Commits

Reviewing files that changed from the base of the PR and between 0cb3464 and 786eae2.

📒 Files selected for processing (4)
  • .env.example
  • docker-compose.yml
  • web/Dockerfile
  • web/README.md
✅ Files skipped from review due to trivial changes (2)
  • web/README.md
  • .env.example

📝 Walkthrough

Walkthrough

This PR adds NEXT_PUBLIC_VERIFIER_URL and MAX_REQUEST_BODY_BYTES to the project’s env examples, README guidance, and deployment configuration. The frontend variable is documented for verifier warm-up usage, and the verifier variable is wired with a 1048576 default.

Changes

Environment variable documentation and wiring

Layer / File(s) Summary
Docs and examples
.env.example, README.md, web/README.md
Adds MAX_REQUEST_BODY_BYTES and NEXT_PUBLIC_VERIFIER_URL to the canonical example env file and README configuration docs, including defaults and the frontend warm-up note.
Deployment wiring
docker-compose.yml, web/Dockerfile
Passes MAX_REQUEST_BODY_BYTES into the verifier service and exposes NEXT_PUBLIC_VERIFIER_URL through the web build and runtime environment.

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

Possibly related PRs

Suggested labels: enhancement

Suggested reviewers: AnkanMisra

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also changes docker-compose.yml and web/Dockerfile, which goes beyond the docs-only scope in the linked issue. Remove the Docker/compose wiring changes or update the issue scope if deployment exposure of the env vars is intended.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: documenting missing verifier environment variables.
Description check ✅ Passed It covers the core sections—summary, changes, reason, and verification—so the template is mostly satisfied despite a few omitted checklists.
Linked Issues check ✅ Passed The PR documents both env vars in .env.example, README, and web/README.md with the requested defaults and warm-up note.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 Outdated
Comment thread README.md Outdated
@shrutig-blip

Copy link
Copy Markdown
Contributor 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 9, 2026 1:15pm

@shrutig-blip

Copy link
Copy Markdown
Contributor 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 Outdated

# 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 Outdated
- `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
Contributor 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

@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: 1

🤖 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 `@web/README.md`:
- Around line 23-26: The markdown table entry for NEXT_PUBLIC_VERIFIER_URL is
broken because the row is split across multiple lines without proper
leading/trailing pipes, which can merge into the NEXT_PUBLIC_EXPECTED_CHAIN_ID
row. Update the README table so the NEXT_PUBLIC_VERIFIER_URL row is kept on a
single line with consistent pipe delimiters, matching the surrounding table
entries.
🪄 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: 762863ea-fdcd-4a29-9f0e-0cac8c62c062

📥 Commits

Reviewing files that changed from the base of the PR and between 08318fa and 0cb3464.

📒 Files selected for processing (3)
  • .env.example
  • README.md
  • web/README.md
✅ Files skipped from review due to trivial changes (2)
  • .env.example
  • README.md

Comment thread web/README.md Outdated
@shrutig-blip

Copy link
Copy Markdown
Contributor Author

@AnkanMisra Thanks for the review! I realized my latest commit hadn't been pushed. I've now pushed the requested changes.
I'd appreciate it if you could take another look. Thank you!

@github-actions github-actions Bot added the TypeScript TypeScript code label Jul 9, 2026
@AnkanMisra

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b12e7a799

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .env.example
Comment thread .env.example Outdated
Comment thread web/README.md Outdated
Co-authored-by: codex <codex@users.noreply.github.com>
@github-actions github-actions Bot added the type:devops Deployment, observability, operations, CI, or infrastructure work. label Jul 9, 2026
@AnkanMisra AnkanMisra added level:beginner Small, well-scoped work suitable for newer contributors. gssoc:approved Approved for GSSoC contribution labels Jul 9, 2026
@AnkanMisra AnkanMisra merged commit a231c50 into AnkanMisra:main Jul 9, 2026
17 checks passed
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 gssoc:approved Approved for GSSoC contribution level:beginner Small, well-scoped work suitable for newer contributors. type:devops Deployment, observability, operations, CI, or infrastructure work. type:docs Documentation, API docs, examples, or contributor docs. TypeScript TypeScript code

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