Skip to content

Conversation

@shubham5080
Copy link

@shubham5080 shubham5080 commented Nov 15, 2025

Summary

This PR improves the onboarding experience for new contributors.

Changes Made

  • Added blockchain/.env.example with required environment variables.
  • Added client/.env.example for frontend environment handling.
  • Updated README to clearly explain setup steps for both backend and frontend.
  • Clarified dummy vs real keys and folder structure.

Why This Is Needed

The project did not include .env.example files and the README was unclear for new contributors.
These improvements make the project easier to set up locally and reduce confusion for first-time contributors.

Related Issue

Fixes #183

Summary by CodeRabbit

  • Documentation

    • Updated README with improved setup instructions including explicit clone steps, clearer development guidance, enhanced formatting, and distinct Docker vs. manual setup flows.
  • Chores

    • Enhanced environment configuration examples with concrete sample values, header comments, and explanatory guidance to streamline initial project setup and configuration.

…le examples

- Updated README.md with your final version including:
  - Cleaner Development Guide section
  - Comprehensive 🔐 Environment Files notice with local/production guidance
  - Docker Setup (Option 1) and Manual Setup (Option 2) instructions
  - Improved "About Smart Contracts" section with proper heading hierarchy

- Updated blockchain/.env.example with detailed comments and dummy values
- Updated client/.env.example with simplified structure and helpful comments
@coderabbitai
Copy link

coderabbitai bot commented Nov 15, 2025

Walkthrough

Documentation and environment configuration updates to improve new contributor onboarding. README reorganized with clearer local development guidance, and .env.example files added with concrete configuration examples and explanatory comments. Environment variables consolidated and clarified across blockchain and client packages.

Changes

Cohort / File(s) Summary
Documentation
README.md
Reformatted with adjusted headings, bullet points, and section ordering; enhanced local development guidance with explicit clone steps, environment file references, Docker vs. manual setup flows, and copy commands; refined "About Smart Contracts" section with bolded features.
Blockchain Environment Configuration
blockchain/.env.example, blockchain/.env.local
blockchain/.env.example: Replaces placeholder values with concrete examples for PRIVATE_KEY, RPC_URL_AMOY, RPC_URL_SEPOLIA, RPC_URL_FUJI, RPC_URL_BSC, and ETHERSCAN_KEY; added header comments. blockchain/.env.local: Added NEXT_PUBLIC_PINATA_JWT environment variable.
Client Environment Configuration
client/.env.example
Removed NEXT_PUBLIC_SEPOLIA_RPC_URL, NEXT_PUBLIC_AMOY_RPC_URL, NEXT_PUBLIC_FUJI_RPC_URL, and previous Pinata JWT configuration; replaced with single commented example line: NEXT_PUBLIC_PINATA_JWT=your_pinata_jwt_here with explanatory comments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify that no real secrets, private keys, or API keys are exposed in the example files
  • Cross-check consistency between blockchain/.env.example, blockchain/.env.local, and client/.env.example configurations
  • Confirm all RPC URLs and keys mentioned in examples align with actual project usage patterns

Poem

🐰 With whiskers twitching, I hopped with glee,
Environment configs now clear as can be!
Documentation blooms, examples abound,
New contributors won't stumble around!
Setup's a breeze—hip, hip, hooray! 🌟

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title describes the main changes (environment file examples and README updates) which align with the changeset's primary focus.
Linked Issues check ✅ Passed All coding objectives from issue #183 are met: .env.example files added to blockchain and client directories, README updated with setup guidance, and environment documentation improved.
Out of Scope Changes check ✅ Passed All changes are scoped to issue #183 requirements: documentation, environment examples, and README updates; no unrelated functional code changes detected.
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
  • Post copyable unit tests in a comment

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.

Copy link

@coderabbitai coderabbitai bot left a comment

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 (3)
blockchain/.env.example (1)

11-14: Reorder RPC URLs for consistency.

The RPC URL environment variables are not in alphabetical order. Alphabetizing these keys improves consistency and readability. Reorder them: AMOY, BSC, FUJI, SEPOLIA.

Apply this diff:

- RPC_URL_AMOY=http://127.0.0.1:8545
- RPC_URL_SEPOLIA=http://127.0.0.1:8545
- RPC_URL_FUJI=http://127.0.0.1:8545
- RPC_URL_BSC=http://127.0.0.1:8545
+ RPC_URL_AMOY=http://127.0.0.1:8545
+ RPC_URL_BSC=http://127.0.0.1:8545
+ RPC_URL_FUJI=http://127.0.0.1:8545
+ RPC_URL_SEPOLIA=http://127.0.0.1:8545
README.md (2)

112-113: Wrap bare URLs in markdown syntax.

Lines 112 and 113 contain bare URLs that should be wrapped for proper markdown rendering. Use backticks or markdown link syntax:

- - Frontend: http://localhost:3000
- - Blockchain Node: http://localhost:8545
+ - Frontend: `http://localhost:3000`
+ - Blockchain Node: `http://localhost:8545`

68-68: Add language specifiers to fenced code blocks.

Fenced code blocks should specify their language for proper syntax highlighting. The blocks at lines 68, 78, 149, and 179 are missing language identifiers. Add the appropriate language specifiers:

  • Line 68 & 78: Use ```plaintext (or omit if showing config structure)
  • Line 149 & 179: Use ```plaintext (or omit if showing config structure)

Alternatively, if these blocks represent shell/bash examples, use ```bash.

Example for line 68:

- ```
+ ```plaintext
  PRIVATE_KEY=<your_real_private_key>
  RPC_URL_AMOY=<your_amoy_rpc>
  ...
- ```
+ ```

Also applies to: 78-78, 149-149, 179-179

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49aa080 and 0af6c37.

⛔ Files ignored due to path filters (1)
  • client/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • README.md (1 hunks)
  • blockchain/.env.example (1 hunks)
  • blockchain/.env.local (1 hunks)
  • client/.env.example (1 hunks)
🧰 Additional context used
🪛 dotenv-linter (4.0.0)
blockchain/.env.example

[warning] 13-13: [UnorderedKey] The RPC_URL_FUJI key should go before the RPC_URL_SEPOLIA key

(UnorderedKey)


[warning] 14-14: [UnorderedKey] The RPC_URL_BSC key should go before the RPC_URL_FUJI key

(UnorderedKey)

🪛 markdownlint-cli2 (0.18.1)
README.md

68-68: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


78-78: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


112-112: Bare URL used

(MD034, no-bare-urls)


113-113: Bare URL used

(MD034, no-bare-urls)


149-149: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


179-179: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (3)
client/.env.example (1)

1-6: Clean example file structure.

The consolidated client environment file is well-documented with clear placeholder and explanatory comment. The removal of RPC URL variables (now handled in blockchain/.env.example) aligns with the PR objective of consolidating backend configuration.

README.md (2)

38-84: Excellent environment setup documentation.

The new environment files section clearly explains the distinction between dummy values for local development and real keys for deployments, with concrete copy commands. This significantly improves onboarding clarity and directly addresses the PR objective. The structure and tone are appropriate for contributor guidance.


86-189: Well-organized setup instructions.

The separation of Docker and manual setup flows with clear step-by-step instructions (clone, environment setup, install, run) provides excellent guidance for new contributors. Both paths are comprehensive and the examples are concrete and actionable.

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.

docs: improve environment setup and add .env.example files

1 participant