feat: implement environment configuration and validation#103
Open
Vivian-04 wants to merge 2 commits intoMissBlue00:mainfrom
Open
feat: implement environment configuration and validation#103Vivian-04 wants to merge 2 commits intoMissBlue00:mainfrom
Vivian-04 wants to merge 2 commits intoMissBlue00:mainfrom
Conversation
|
@Vivian-04 is attempting to deploy a commit to the missblue00's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Vivian-04 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! 🚀 |
Owner
|
@Vivian-04 Resolve conflicts and ensure CI/CD checks pass, thank you! |
Author
|
I would work on it and revert by today.
…On Fri, 27 Mar 2026 at 10:26, miss_blue ***@***.***> wrote:
*MissBlue00* left a comment (MissBlue00/stellar-pay#103)
<#103?email_source=notifications&email_token=BJGHGTEXT7OPAXU7E76SYND4SZCLDA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJUGEZDMMZQHAY2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4141263081>
@Vivian-04 <https://github.com/Vivian-04> Resolve conflicts and ensure
CI/CD checks pass, thank you!
—
Reply to this email directly, view it on GitHub
<#103?email_source=notifications&email_token=BJGHGTEXT7OPAXU7E76SYND4SZCLDA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJUGEZDMMZQHAY2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4141263081>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJGHGTDGEBSL4ZNWXB3XG5L4SZCLDAVCNFSM6AAAAACW52GFEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCNBRGI3DGMBYGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Author
|
Kindly check and let me know. |
Owner
|
@Vivian-04 The ci/cd checks is still failing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #2 Backend: Implement environment configuration and validation
Description
This PR implements a robust environment configuration and validation module for the NestJS API using @nestjs/config and zod.
Key changes:
Created
apps/api/src/config/env.validation.ts
with a Zod schema for mandatory environment variables.
Integrated ConfigModule.forRoot() into
AppModule
with strict validation.
Implemented a "fail-fast" policy: the application logs a clear error and exits immediately during startup if required environment variables are missing or invalid.
Updated
.env.example
to document all required variables.
Required Variables:
DATABASE_URL
JWT_SECRET
TREASURY_PRIVATE_KEY
STELLAR_RPC_URL
BTC_NODE_URL
ETH_NODE_URL
REDIS_URL
Type of change
New feature (non-breaking change which adds functionality)
How Has This Been Tested?
I ran the following tests to verify the changes:
Build Verification: Ran pnpm --filter api run build to ensure the project compiles correctly with the new configuration module.
Unit Tests: Ran pnpm --filter api run test to ensure existing tests pass.
Fail-Fast Verification: Started the application without environment variables and verified it exits with a detailed error message listing missing fields.
Startup Verification: Started the application with valid environment variables and verified it initializes correctly.
Test Configuration:
Node.js: v24.14.0
Package Manager: pnpm v10.33.0
OS: Windows
Checklist:
My code follows the style guidelines of this project
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
Closes #2