Skip to content

chore: add .env.example with all required backend variables#462

Merged
ryzen-xp merged 1 commit into
Alien-Protocol:devfrom
Michvista:chore/backend-env-example
Apr 29, 2026
Merged

chore: add .env.example with all required backend variables#462
ryzen-xp merged 1 commit into
Alien-Protocol:devfrom
Michvista:chore/backend-env-example

Conversation

@Michvista
Copy link
Copy Markdown
Contributor

@Michvista Michvista commented Apr 29, 2026

I have completed the audit of the backend and updated the .env.example with all required variables, including clear placeholders and descriptive comments.

Note on Build Verification: I attempted to run npm run build to verify the environment, but encountered 44 TypeScript errors and a Prisma validation error (P1012). These appear to be pre-existing issues related to dependency version mismatches (specifically Prisma 7 vs. the project schema) and are unrelated to the documentation changes. The .env.example has been verified against the source code via Select-String audits.

Summary by CodeRabbit

  • Documentation
    • Reorganized environment configuration file with improved inline documentation and clearer section labeling
    • Added SOROBAN_RPC_URL and DATABASE_URL configuration variables for enhanced setup flexibility

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

📝 Walkthrough

Walkthrough

The backend/.env.example configuration file was reorganized with clearer section headings and inline descriptions. Two new environment variables—SOROBAN_RPC_URL and DATABASE_URL—were introduced. Existing variables were grouped under descriptive comment sections and a trailing newline was added.

Changes

Cohort / File(s) Summary
Configuration File Reorganization
backend/.env.example
Added labeled sections with inline descriptions for environment variables. Introduced new variables SOROBAN_RPC_URL and DATABASE_URL. Consolidated existing variables under organized comment headings for improved clarity and maintainability.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

  • Alien-Protocol/Alien-Protocol#444: Directly addresses the same objective of updating and documenting required environment variables in backend/.env.example, including additions of new configuration entries with supporting comments.

Poem

🐰 A burrow of configs, now neat and so clean,
With labels and pathways between and between,
New tunnels for SOROBAN, DATABASE too,
This rabbit approves of the organizational brew!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: reorganizing and enhancing the backend/.env.example file with clearer sections, new variables (SOROBAN_RPC_URL, DATABASE_URL), and descriptive comments for all required backend environment variables.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

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

Copy link
Copy Markdown

@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 (2)
backend/.env.example (2)

12-12: Use obvious placeholders in DATABASE_URL to prevent accidental credential reuse.

Line 12 currently includes concrete-looking credentials. In .env.example, placeholder tokens are safer and clearer.

Suggested diff
-DATABASE_URL=postgres://alien:alienpassword@localhost:5432/alien_gateway
+DATABASE_URL=postgres://<DB_USER>:<DB_PASSWORD>@<DB_HOST>:<DB_PORT>/<DB_NAME>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/.env.example` at line 12, Replace the concrete-looking DATABASE_URL
value in the .env example with obvious placeholder tokens so users can't
accidentally reuse credentials; update the DATABASE_URL entry (the
"DATABASE_URL" variable) to use generic placeholders for username, password,
host, port, and database name (e.g.,
postgres://<DB_USER>:<DB_PASS>@<DB_HOST>:<DB_PORT>/<DB_NAME>) and ensure the
documented example remains valid-looking but contains no real secrets.

3-3: Default TYPEORM_SYNCHRONIZE=true is a risky baseline.

Line 3 sets schema sync to true in the example file; this can cause destructive schema drift if copied into non-local environments. Prefer a safe default (false) and let local dev override explicitly.

Suggested diff
-TYPEORM_SYNCHRONIZE=true # Auto-sync database schema (Set to false in production)
+TYPEORM_SYNCHRONIZE=false # Keep false by default; enable only in local dev if needed
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/.env.example` at line 3, The example sets TYPEORM_SYNCHRONIZE=true
which is unsafe as a default; change the example value to
TYPEORM_SYNCHRONIZE=false and update the inline comment to state that schema
sync is disabled by default and should only be enabled explicitly for local
development (e.g., “Set to true for local dev only; keep false in
staging/production”), and ensure any documentation or README that references
TYPEORM_SYNCHRONIZE reflects this safe default.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@backend/.env.example`:
- Line 17: Remove the trailing whitespace after the SOROBAN_RPC_URL value in
.env.example (the line with the SOROBAN_RPC_URL variable) so the value ends
exactly with the URL and no extra space; update the SOROBAN_RPC_URL entry to
"https://soroban-testnet.stellar.org" with no trailing characters and save the
file to eliminate the lint warning.

---

Nitpick comments:
In `@backend/.env.example`:
- Line 12: Replace the concrete-looking DATABASE_URL value in the .env example
with obvious placeholder tokens so users can't accidentally reuse credentials;
update the DATABASE_URL entry (the "DATABASE_URL" variable) to use generic
placeholders for username, password, host, port, and database name (e.g.,
postgres://<DB_USER>:<DB_PASS>@<DB_HOST>:<DB_PORT>/<DB_NAME>) and ensure the
documented example remains valid-looking but contains no real secrets.
- Line 3: The example sets TYPEORM_SYNCHRONIZE=true which is unsafe as a
default; change the example value to TYPEORM_SYNCHRONIZE=false and update the
inline comment to state that schema sync is disabled by default and should only
be enabled explicitly for local development (e.g., “Set to true for local dev
only; keep false in staging/production”), and ensure any documentation or README
that references TYPEORM_SYNCHRONIZE reflects this safe default.
🪄 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: 7cdef4bd-8103-4cb5-9ddb-fc38e10d095b

📥 Commits

Reviewing files that changed from the base of the PR and between 3ab816d and da2ddae.

📒 Files selected for processing (1)
  • backend/.env.example

Comment thread backend/.env.example
# --- Stellar / Soroban Configuration ---
# RPC endpoints for interacting with the Soroban network
STELLAR_RPC_URL=https://soroban-testnet.stellar.org
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove trailing whitespace on SOROBAN_RPC_URL.

Line 17 has a trailing space, which is causing a lint warning.

Suggested diff
-SOROBAN_RPC_URL=https://soroban-testnet.stellar.org 
+SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 17-17: [TrailingWhitespace] Trailing whitespace detected

(TrailingWhitespace)


[warning] 17-17: [UnorderedKey] The SOROBAN_RPC_URL key should go before the STELLAR_RPC_URL key

(UnorderedKey)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/.env.example` at line 17, Remove the trailing whitespace after the
SOROBAN_RPC_URL value in .env.example (the line with the SOROBAN_RPC_URL
variable) so the value ends exactly with the URL and no extra space; update the
SOROBAN_RPC_URL entry to "https://soroban-testnet.stellar.org" with no trailing
characters and save the file to eliminate the lint warning.

@ryzen-xp ryzen-xp self-requested a review April 29, 2026 12:06
@ryzen-xp ryzen-xp added the APPROVED This PR is ready for merging . label Apr 29, 2026
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 29, 2026

@Michvista Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ryzen-xp ryzen-xp merged commit 1927cf9 into Alien-Protocol:dev Apr 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APPROVED This PR is ready for merging .

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: add .env.example with all required backend variables

2 participants