Skip to content

Ops/contribution - #2

Merged
AnkanMisra merged 3 commits into
mainfrom
ops/contribution
Dec 23, 2025
Merged

AnkanMisra merged 3 commits into
mainfrom
ops/contribution

Conversation

@AnkanMisra

@AnkanMisra AnkanMisra commented Dec 23, 2025 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Documentation
    • Added CONTRIBUTING guidelines and RULES for project practices
    • Added MIT LICENSE
    • Expanded main README with Getting Started, Environment, Docker Deployment, API reference, Troubleshooting
    • Added configuration docs for Gateway, Verifier, and Web (env vars and runtime notes)
    • Added/updated component READMEs (gateway, verifier, web, tests) with setup, testing commands, and E2E guidance
    • Clarified testing prerequisites and helper scripts across the repo

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 23, 2025 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds comprehensive project documentation: new CONTRIBUTING.md and LICENSE (MIT), expanded README content across root and component directories, plus new RULES.md and tests guidance covering setup, configuration, testing, and API references.

Changes

Cohort / File(s) Summary
Root documentation
CONTRIBUTING.md, LICENSE, RULES.md, README.md
New CONTRIBUTING.md with contribution workflow, testing and PR checklist; added MIT LICENSE; RULES.md with project guidelines; README.md substantially expanded with getting-started, env/docker deployment, testing, troubleshooting, and API reference.
Gateway docs
gateway/README.md
Added Configuration section documenting env vars (OPENROUTER_API_KEY, OPENROUTER_MODEL, VERIFIER_URL, RECIPIENT_ADDRESS, CHAIN_ID), default behavior, port (3000), and go test instructions.
Verifier docs
verifier/README.md
Documented EIP-712 domain parameters (name, version, chainId, verifyingContract), health and verify endpoints examples, and cargo test instructions.
Web docs
web/README.md
Added Configuration env vars, Payment Flow walkthrough (in-browser EIP-712 signing + retry headers), and testing notes referencing E2E tests.
Tests docs
tests/README.md
Added Go/Rust toolchain prerequisites, updated E2E instructions to use run_e2e.sh, and notes about OPENROUTER_API_KEY behavior and required free ports (3000, 3002).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Ops/contribution' is vague and uses a branch-naming format rather than clearly describing the main changes, which are comprehensive documentation additions (CONTRIBUTING.md, LICENSE, README updates across multiple modules). Consider using a more descriptive title like 'Add contribution guidelines and comprehensive documentation' to clearly convey that this PR adds setup guides, testing instructions, API references, and contribution guidelines across the project.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4cac0a and 7536aa6.

📒 Files selected for processing (2)
  • CONTRIBUTING.md
  • RULES.md

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 and usage tips.

@greptile-apps

greptile-apps Bot commented Dec 23, 2025

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds comprehensive documentation to the MicroAI Paygate project, including a new CONTRIBUTING.md file, MIT LICENSE, and enhanced README files across all services. The changes establish clear contribution guidelines, licensing, and operational documentation for developers and users.

Changes Overview:

  • Added CONTRIBUTING.md with development workflow, PR checklist, coding standards, and commit hygiene guidelines
  • Added MIT LICENSE file for proper licensing attribution
  • Enhanced main README.md with documentation index, getting started guide, troubleshooting section, and references
  • Updated service-specific READMEs (gateway, verifier, web, tests) with configuration details and testing instructions

Issue Identified:

  • CONTRIBUTING.md contains duplicate sections (Coding Standards and Commit Hygiene appear twice), which should be consolidated

Confidence Score: 4/5

  • This PR is safe to merge with minor corrections needed for documentation quality. No code changes are present, only documentation additions.
  • The PR consists entirely of documentation changes with no functional code modifications. The content is well-structured, accurate, and helpful. The main issue is a minor duplication in CONTRIBUTING.md that impacts readability but not functionality. All other files are properly formatted and provide clear guidance. The LICENSE file follows standard MIT format, and the README enhancements are comprehensive and well-organized.
  • CONTRIBUTING.md needs the duplicate sections removed before merging (lines 37-40 should be deleted)

Important Files Changed

Filename Overview
CONTRIBUTING.md New file with contribution guidelines. Contains duplicate sections (Coding Standards and Commit Hygiene appear twice) that should be consolidated.
LICENSE Standard MIT License file added. Content is accurate and follows conventional MIT license format.
README.md Enhanced main README with documentation index, Getting Started section, troubleshooting, references, and contributing/license links. Content is well-organized and accurate. Links to CONTRIBUTING.md and LICENSE are correct.
gateway/README.md Added configuration section documenting environment variables and ports, plus testing instructions. Content is accurate and helpful.
tests/README.md Updated with clarifications about helper script functionality, toolchain requirements, and notes about missing API keys. Improved documentation of E2E test setup.
verifier/README.md Added configuration documentation for EIP-712 domain values, health/verification endpoints, and testing instructions. Clear and accurate.
web/README.md Added configuration section with environment variables, payment flow explanation, and testing guidance. Well-documented and helpful.

Sequence Diagram

sequenceDiagram
    participant Developer
    participant Documentation
    participant Contributing
    participant PR Process

    Developer->>Documentation: Reads main README.md
    Documentation-->>Developer: Learns architecture & setup
    
    Developer->>Documentation: Checks service READMEs
    Documentation-->>Developer: Gets config & testing info
    
    Developer->>Contributing: Reads CONTRIBUTING.md
    Contributing-->>Developer: Understands dev workflow
    
    Developer->>Developer: Sets up local environment
    Developer->>Developer: Makes code changes
    Developer->>Developer: Runs tests (gateway, verifier, E2E)
    
    Developer->>PR Process: Opens PR with proper commit message
    PR Process-->>Developer: PR created
    PR Process->>Contributing: Reviewer checks guidelines
    Contributing-->>PR Process: Validates against standards
    PR Process-->>Developer: Feedback or approval

Loading

@greptile-apps greptile-apps 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.

7 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread CONTRIBUTING.md Outdated
Comment on lines +25 to +44
## Coding Standards
- Keep changes minimal and focused; avoid large, unrelated refactors.
- Add tests for new behavior; update existing tests if logic changes.
- Prefer clear, concise documentation alongside code changes.
- Follow existing language idioms: Go fmt/go vet style; Rust fmt/clippy where applicable.
- New features must include tests (unit and/or E2E) covering the added behavior.

## Commit Hygiene
- Use meaningful commit messages (e.g., `fix: ...`, `feat: ...`, `docs: ...`).
- Ensure `git status` is clean before opening a PR.
- Squash locally only if it clarifies history; otherwise let reviewers guide.

## Coding Standards
- Keep changes minimal and focused; avoid large, unrelated refactors.
- Add tests for new behavior; update existing tests if logic changes.
- Prefer clear, concise documentation alongside code changes.

## Commit Hygiene
- Use meaningful commit messages (e.g., `fix: ...`, `feat: ...`, `docs: ...`).
- Ensure `git status` is clean before opening a PR.

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.

style: Duplicate sections found. Lines 25-29 and 37-40 repeat "Coding Standards" and "Commit Hygiene" sections. Remove the second occurrence (lines 37-40).

Suggested change
## Coding Standards
- Keep changes minimal and focused; avoid large, unrelated refactors.
- Add tests for new behavior; update existing tests if logic changes.
- Prefer clear, concise documentation alongside code changes.
- Follow existing language idioms: Go fmt/go vet style; Rust fmt/clippy where applicable.
- New features must include tests (unit and/or E2E) covering the added behavior.
## Commit Hygiene
- Use meaningful commit messages (e.g., `fix: ...`, `feat: ...`, `docs: ...`).
- Ensure `git status` is clean before opening a PR.
- Squash locally only if it clarifies history; otherwise let reviewers guide.
## Coding Standards
- Keep changes minimal and focused; avoid large, unrelated refactors.
- Add tests for new behavior; update existing tests if logic changes.
- Prefer clear, concise documentation alongside code changes.
## Commit Hygiene
- Use meaningful commit messages (e.g., `fix: ...`, `feat: ...`, `docs: ...`).
- Ensure `git status` is clean before opening a PR.
- New features must include tests (unit and/or E2E) covering the added behavior.
## Commit Hygiene
- Use meaningful commit messages (e.g., `fix: ...`, `feat: ...`, `docs: ...`).
- Ensure `git status` is clean before opening a PR.
- Squash locally only if it clarifies history; otherwise let reviewers guide.
## Pull Requests
Prompt To Fix With AI
This is a comment left during a code review.
Path: CONTRIBUTING.md
Line: 25:44

Comment:
**style:** Duplicate sections found. Lines 25-29 and 37-40 repeat "Coding Standards" and "Commit Hygiene" sections. Remove the second occurrence (lines 37-40).

```suggestion
- New features must include tests (unit and/or E2E) covering the added behavior.

## Commit Hygiene
- Use meaningful commit messages (e.g., `fix: ...`, `feat: ...`, `docs: ...`).
- Ensure `git status` is clean before opening a PR.
- Squash locally only if it clarifies history; otherwise let reviewers guide.

## Pull Requests
```

How can I resolve this? If you propose a fix, please make it concise.

@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

🧹 Nitpick comments (4)
tests/README.md (1)

9-10: Fix list item indentation.

Lines 9–10 should align with line 8 at the same indentation level (no leading space). Correct the indentation to match the preceding list item.

🔎 Proposed indentation fix
 - [Bun](https://bun.sh) installed
 - The MicroAI Paygate stack running (`bun run stack` in the root directory)
- - Go toolchain (for gateway build in helper script)
- - Rust toolchain (for verifier build in helper script)
+ - Go toolchain (for gateway build in helper script)
+ - Rust toolchain (for verifier build in helper script)
web/README.md (1)

42-42: Wrap bare URL in angle brackets.

Line 42 contains a bare URL that should be wrapped for proper Markdown formatting.

🔎 Proposed fix
- `NEXT_PUBLIC_GATEWAY_URL` — gateway base URL (e.g., http://localhost:3000)
+ `NEXT_PUBLIC_GATEWAY_URL` — gateway base URL (e.g., <http://localhost:3000>)
README.md (2)

69-69: Convert bold text to proper Markdown headings.

Lines 69, 75, 87, and 92 use bold text (**...**) as section headers instead of proper Markdown heading syntax (###). This is flagged by markdownlint as MD036. Convert these to heading level 3 or 4 depending on your document hierarchy.

🔎 Proposed heading fixes
-**Prerequisites**
+### Prerequisites

-**Clone & Install**
+### Clone & Install

-**Configure Environment**
+### Configure Environment

-**Run the Stack**
+### Run the Stack

-**Run Tests**
+### Run Tests

Also applies to: 75-75, 87-87, 92-92


183-185: Wrap bare URLs in angle brackets or markdown link syntax.

Lines 183–185 contain bare URLs that should be wrapped for proper Markdown formatting. Use angle brackets <url> or markdown link syntax [text](url).

🔎 Proposed URL fixes
-- HTTP 402 Payment Required (MDN): https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402
-- RFC 7231 Section 6.5.2 (Payment Required): https://www.rfc-editor.org/rfc/rfc7231#section-6.5.2
-- EIP-712 Typed Structured Data: https://eips.ethereum.org/EIPS/eip-712
+- HTTP 402 Payment Required (MDN): <https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402>
+- RFC 7231 Section 6.5.2 (Payment Required): <https://www.rfc-editor.org/rfc/rfc7231#section-6.5.2>
+- EIP-712 Typed Structured Data: <https://eips.ethereum.org/EIPS/eip-712>
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f5f12fe and d4cac0a.

📒 Files selected for processing (7)
  • CONTRIBUTING.md
  • LICENSE
  • README.md
  • gateway/README.md
  • tests/README.md
  • verifier/README.md
  • web/README.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
web/README.md

42-42: Bare URL used

(MD034, no-bare-urls)

CONTRIBUTING.md

37-37: Multiple headings with the same content

(MD024, no-duplicate-heading)


42-42: Multiple headings with the same content

(MD024, no-duplicate-heading)

tests/README.md

9-9: Inconsistent indentation for list items at the same level
Expected: 0; Actual: 1

(MD005, list-indent)


9-9: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


10-10: Inconsistent indentation for list items at the same level
Expected: 0; Actual: 1

(MD005, list-indent)


10-10: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)

README.md

69-69: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


75-75: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


87-87: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


92-92: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


183-183: Bare URL used

(MD034, no-bare-urls)


184-184: Bare URL used

(MD034, no-bare-urls)


185-185: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (3)
LICENSE (1)

1-19: Standard MIT License text approved.

The license file follows the standard MIT License format. No issues detected.

gateway/README.md (1)

32-49: Clear configuration and testing documentation.

The new Configuration and Testing sections are well-organized and clearly document environment variables with their defaults. No issues detected.

verifier/README.md (1)

33-54: Well-documented configuration and endpoints.

The Configuration section clearly explains hardcoded EIP-712 domain values and the importance of syncing with gateway/frontend. Health and Verification endpoint examples are clear and actionable.

Comment thread CONTRIBUTING.md Resolved
@AnkanMisra
AnkanMisra merged commit 2a9585d into main Dec 23, 2025
1 check was pending
@AnkanMisra
AnkanMisra deleted the ops/contribution branch December 23, 2025 15:56
@coderabbitai coderabbitai Bot mentioned this pull request Feb 4, 2026
6 tasks done
AnkanMisra added a commit that referenced this pull request May 19, 2026
Addresses Claude review on PR #169 (findings #2 medium + #3 low).

The normalization path was previously exercised only by the deployed
smoke test (and indirectly by the wallet rejecting bad-case during the
live demo). Adds TestNormalizeRecipientAddress with three subtests:

- empty RECIPIENT_ADDRESS returns nil and leaves env unset (handlers
  fall back to the hardcoded canonical default)
- a valid lowercased address gets rewritten in-place to its EIP-55
  canonical form (the exact bug the live demo surfaced — a typo'd-case
  RECIPIENT_ADDRESS made the browser wallet reject with
  `bad address checksum`)
- genuinely invalid hex returns an error so validateConfig fails fast

Also updates TestValidateConfig_MissingRequiredEnv to set VERIFIER_URL
to empty and include it in expectedVars, so a future refactor that
accidentally drops VERIFIER_URL from the required slice would fail
this test instead of going undetected.

Co-Authored-By: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant