Skip to content

Conversation

@Rehan959
Copy link
Contributor

@Rehan959 Rehan959 commented Nov 9, 2025

Description
Adds a .env.example file to streamline developer onboarding. New developers can now simply copy the template file to .env and fill in their credentials, eliminating the need to reference documentation repeatedly. This improves setup efficiency and reduces configuration errors.

Type of Change

  • New feature (non-breaking change which adds functionality)

Checklist

  • My code follows the project's style guidelines

  • I have performed a self-review of my own code

  • I have commented my code, particularly in hard-to-understand areas

  • I have made corresponding changes to the documentation

  • My changes generate no new warnings

  • I have added tests that prove my fix is effective or that my feature works

  • New and existing unit tests pass locally with my changes

  • Any dependent changes have been merged and published in downstream modules

Related Issues
Closes #139

Summary by CodeRabbit

  • Documentation
    • Added a backend environment example file listing required and optional variables plus guidance for enabling integrations (DB, auth, GitHub, payments, email, Slack, encryption).
    • Updated README setup instructions to tell users to copy the example into a local .env and edit it.
    • Adjusted Docker/run guidance to reference using the copied .env from the example.

@vercel
Copy link

vercel bot commented Nov 9, 2025

@Rehan959 is attempting to deploy a commit to the AJEET PRATAP SINGH's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Added apps/api/.env.example and updated README instructions to instruct copying that example into .env for backend setup; no runtime code changes.

Changes

Cohort / File(s) Summary
Environment template
apps/api/.env.example
Added .env.example documenting required and optional environment variables (e.g., DATABASE_URL, JWT_SECRET, PORT, CORS_ORIGINS, NODE_ENV, GITHUB_PERSONAL_ACCESS_TOKEN, Razorpay keys & webhook secret, SLACK_INVITE_URL, ZEPTOMAIL_TOKEN, ENCRYPTION_KEY) with placeholder defaults and setup guidance.
Documentation update
README.md
Updated backend and Docker run instructions to recommend copying the example .env into .env (replaces previous directive to create the file directly or reference an explicit path).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Verify env var names align with application config and do not contain typos.
  • Confirm placeholders, comments, and any GitHub integration guidance are accurate and safe to commit.
  • Check README wording matches the intended file path (apps/api/.env.example) and that copy instructions are unambiguous.

Possibly related PRs

Poem

🐰
A tiny file, a tidy trail,
Copy me over — you will prevail.
Fill the blanks, then run with glee,
Hops of setup, quick and free. 🥕

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 The title accurately describes the main change: adding a .env.example file to streamline developer setup, which aligns with the primary objective.
Linked Issues check ✅ Passed The PR successfully implements all coding requirements from issue #139: provides a .env.example file with required environment variables, updates README with setup guidance, and enables developers to copy the template and populate credentials.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #139 objectives: .env.example file creation and README updates for setup guidance; no extraneous modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 991ceb4 and 7c5afda.

📒 Files selected for processing (1)
  • apps/api/.env.example (1 hunks)

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
Contributor

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 12eb954 and 46ae0cd.

📒 Files selected for processing (1)
  • apps/api/.env.example (1 hunks)
🧰 Additional context used
🪛 dotenv-linter (4.0.0)
apps/api/.env.example

[warning] 3-3: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)


[warning] 7-7: [UnorderedKey] The CORS_ORIGINS key should go before the PORT key

(UnorderedKey)


[warning] 8-8: [UnorderedKey] The NODE_ENV key should go before the PORT key

(UnorderedKey)

🔇 Additional comments (1)
apps/api/.env.example (1)

1-13: Well‑structured .env.example with clear guidance.

The file effectively serves its purpose as a developer onboarding tool:

  • Clear separation of required vs. optional variables
  • Sensible defaults for optional settings
  • Helpful comments and security guidance for sensitive tokens (GitHub integration)
  • Appropriate placeholders that guide developers on what to replace

Once the quote and ordering issues are resolved, this will be a solid addition to the project.

Copy link
Contributor

@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

♻️ Duplicate comments (1)
apps/api/.env.example (1)

6-7: Remove unnecessary quotes from DATABASE_URL and JWT_SECRET.

These values don't contain spaces or special characters requiring escaping and should follow the same unquoted format as lines 2–4 for consistency. Dotenv-linter flags this with a QuoteCharacter warning.

Apply this diff:

-DATABASE_URL="postgresql://USER:PASSWORD@localhost:5432/your_database_name?schema=public"
-JWT_SECRET="replace-with-a-strong-random-secret"
+DATABASE_URL=postgresql://USER:PASSWORD@localhost:5432/your_database_name?schema=public
+JWT_SECRET=replace-with-a-strong-random-secret
🧹 Nitpick comments (1)
apps/api/.env.example (1)

18-19: Polish comment text for consistency and professionalism.

Minor capitalization and style inconsistencies:

  • Line 18: Consider capitalizing "Slack" (product name)
  • Line 19: Begin with a capital letter ("It'll be similar to...")
  • Line 23: Begin with a capital letter ("Get one from here...")

Apply this diff:

-# to send slack invite.
-# it'll be similar to : https://join.slack.com/t/name-of-ur-org/shared_invite/invite-id
+# to send Slack invite
+# It'll be similar to: https://join.slack.com/t/name-of-ur-org/shared_invite/invite-id

-# get one from here: https://www.zoho.com/zeptomail/pricing.html?src=pd-menu
+# Get one from here: https://www.zoho.com/zeptomail/pricing.html?src=pd-menu

Also applies to: 23-23

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 46ae0cd and 521d0f9.

📒 Files selected for processing (2)
  • README.md (2 hunks)
  • apps/api/.env.example (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • README.md
🧰 Additional context used
🪛 dotenv-linter (4.0.0)
apps/api/.env.example

[warning] 7-7: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)

@apsinghdev
Copy link
Owner

@Rehan959 thanks for the contribution. ive made some changes.

Copy link
Contributor

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

♻️ Duplicate comments (1)
apps/api/.env.example (1)

31-31: Fix incomplete shell command in ENCRYPTION_KEY comment.

The command is still malformed with a missing closing quote and closing parenthesis. Developers copying this command would encounter a syntax error.

Apply this diff:

-# can be created by running this : echo "$(openssl rand -hex 32)opensox$(openssl rand -hex 16)
+# can be created by running this: echo "$(openssl rand -hex 32)opensox$(openssl rand -hex 16)"
🧹 Nitpick comments (1)
apps/api/.env.example (1)

1-3: Fix typos and improve header clarity.

Lines 1–3 contain typos ("pls" → "please", "becuase" → "because") and the formatting could be more professional.

Apply this diff:

-# Note: pls don't use values as strings for the below variables, if you wanna run using docker becuase in this case, docker build fails.
+# Note: do not use quoted values for environment variables below when running with Docker,
-# simply use a format like this: name-of-the-variable=variable-value
+# as quoted strings can cause Docker build failures. Use the format: KEY=value
-# for example: PORT=8080
+# Example: PORT=8080
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 521d0f9 and 991ceb4.

📒 Files selected for processing (1)
  • apps/api/.env.example (1 hunks)
🔇 Additional comments (1)
apps/api/.env.example (1)

1-32: Overall structure and content look good.

The .env.example file effectively documents all required and optional environment variables with helpful comments and setup guidance. The unquoted format and alphabetical ordering of variables align with the project's linting standards.

@vercel
Copy link

vercel bot commented Nov 9, 2025

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

Project Deployment Preview Comments Updated (UTC)
opensox-website Ready Ready Preview Comment Nov 9, 2025 2:49pm

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@apsinghdev apsinghdev merged commit 0d10582 into apsinghdev:main Nov 9, 2025
1 of 4 checks passed
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.

[FEATURE] Having a .env.example file

2 participants