[DX] Clean up .env.example: remove duplicates, add source comments, improve onboarding#212
[DX] Clean up .env.example: remove duplicates, add source comments, improve onboarding#212udaycodespace wants to merge 2 commits into
Conversation
|
Warning Review limit reached
More reviews will be available in 50 minutes and 57 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. 📝 WalkthroughWalkthroughThis PR updates ChangesEnvironment Configuration Refresh
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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:
- Line 58: Add a single trailing newline at the end of the .env.example file so
the file ends with a blank line (this fixes the dotenv-linter EndingBlankLine
warning); locate the RAZORPAY_WEBHOOK_SECRET line and ensure there is one
newline character after it (no extra characters or spaces).
- Around line 21-24: The ENCRYPTION_KEY guidance is inconsistent with how the
code decodes it (Buffer.from(..., 'hex') in
packages/common/src/utils/encryption.js); update the .env.example ENCRYPTION_KEY
line to instruct generating a hex string (e.g., use openssl rand -hex 32) and
specify the expected length (64 hex chars for a 32-byte key) so the env value
matches Buffer.from(..., 'hex') at runtime. Also briefly clarify that
JWT_SECRET/API_KEY_SALT can remain base64 if desired, but ENCRYPTION_KEY must be
hex.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
d3da05a to
2c868fb
Compare
|
i created secrets from crypy.randombytes(32).tostring('hex') |
|
Tip For best results, initiate chat on the files or code changes.
Since this project likely uses Node.js, it might be worth adding it as an inline alternative in the # Generate a random secret: openssl rand -base64 32
# Or with Node.js: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"That way, Windows users without |
PR Description
Summary
This PR cleans up
.env.exampleto improve first-time contributor onboarding by removing duplicate entries, adding concise source comments, and including cross-platform setup instructions.Changes
.env.example#207)opensslexamplecp .env.example .envCopy-Item .env.example .envWhy this matters
Testing
Closes #207
Summary by CodeRabbit