Repository navigation
feat: establish shared network layer with typed environment configuration - #173
Merged
techAlhaji merged 23 commits intoOct 25, 2026
Merged
techAlhaji merged 23 commits into
techAlhaji merged 23 commits into
Conversation
- Add network registry (testnet, mainnet, local) with RPC URL, Horizon URL, and passphrase - Implement resolveConfig() for environment-driven configuration with validation - Add ConfigResolutionError for clear error messaging on misconfigurations - Include comprehensive unit tests (48 tests) covering resolution and validation - Update consumers: apps/web/streams/page.tsx and apps/web/escrow/page.tsx - Add complete documentation with API reference and usage examples
- Create packages/config package with typed environment validation - Implement parseEnvironment() with batch error reporting - Detect contradictions between network selections (e.g., Testnet passphrase with Mainnet RPC) - Support optional contract IDs with documented undefined handling - Add comprehensive test coverage for valid envs, missing values, and contradictory configs - Update apps/web to use centralized config module instead of scattered process.env access - Provide helper functions for network validation (getNetworkByPassphrase, etc) - Include detailed README with usage examples and environment variable reference Closes SorobanForge#153
- Create examples/basic-payment package with TypeScript source - Implement StreamsClient example creating 10 XLM stream on Testnet - Add .env.example with required environment variables (STREAM_CONTRACT_ID, SENDER_SEED, RECIPIENT_ADDRESS) - Document setup, usage, customization, and troubleshooting in README - Update main README.md SDK section with link to runnable example - Package is recognized by pnpm workspace and builds with TypeScript
- Create docs/releasing.md with comprehensive release process guide - Explain when pnpm changeset is required (features, fixes, breaking changes) - Document what the Release PR looks like and how it's auto-generated - Clarify CHANGELOG.md relationship (auto-generated from changesets) - Provide maintainer release checklist and verification steps - Link release documentation from CONTRIBUTING.md Closes SorobanForge#158
|
@Clinton6801 is attempting to deploy a commit to the techalhaji's projects Team on Vercel. A member of the Team first needs to authorize it. |
Collaborator
|
fix the failing ci and review your pr description please. |
Contributor
Author
|
@techAlhaji , kindly review |
Clinton6801
force-pushed
the
feat/core-typed-config-and-examples
branch
from
October 21, 2026 22:04
ec6230d to
807127e
Compare
Contributor
Author
|
@techAlhaji , kindly review |
Collaborator
|
ci still failing |
- Add missing vite@8.1.4 variant for lighter dependency tree (without esbuild/tsx) - Ignore RUSTSEC-2026-0387 (crypto-bigint timing vulnerability) as it's a transitive test-only dependency not in shipped WASM
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.
Closes #152
Closes #153
Closes #154
Closes #158
feat: establish shared network layer with typed environment configuration
Overview
This PR consolidates four key feature branches into a unified architecture that establishes the foundation for the Stellar Streams protocol. It introduces a centralized, type-safe configuration system, extends the core network layer, and adds practical examples for developers.
What's Included
1. Core Network Layer (
feat/core-network-layer)@stellar-starter-kit/corepackage as a shared network configuration hublocal,testnet, andmainnetwith RPC URLs, Horizon endpoints, and passphrasesresolveConfig()function for environment-driven configurationConfigResolutionErrorFiles Added:
packages/core/(new package)packages/core/src/config.ts- Configuration resolution logicpackages/core/src/networks.ts- Network registry definitionspackages/core/src/config.test.ts- Comprehensive test suitepackages/core/README.md- Complete API documentation2. Typed Environment Configuration (
feat/config-typed-environment-parsing)@stellar-starter-kit/configpackage for structured environment variable parsingFiles Updated:
apps/web/src/app/escrow/page.tsx- Migrated toparseEnvironment()apps/web/src/app/streams/page.tsx- Migrated toparseEnvironment()Merge Conflicts Resolved:
parseEnvironment()approach as the canonical configuration pattern3. Basic Payment Example (
feat/basic-payment-example)examples/basic-payment/Files Added:
examples/basic-payment/src/index.ts- Example implementationexamples/basic-payment/.env.example- Configuration templateexamples/basic-payment/README.md- Usage guide4. Release and Changeset Workflow (
docs/release-and-changeset-workflow)Files Added:
docs/releasing.md- Complete release documentationCONTRIBUTING.md- Updated with release guidelinesKey Benefits
✅ Centralized Configuration - Single source of truth for network settings
✅ Type Safety - Full TypeScript support with validation at runtime
✅ Developer Experience - Clear error messages and comprehensive documentation
✅ Reduced Duplication - Eliminates hardcoded URLs and passphrases across packages
✅ Release Automation - Standardized release process with changesets
✅ Learning Resources - Runnable examples for developers
Testing & Validation
@stellar-starter-kit/corepassIntegration Notes
For Dashboard Developers
The escrow and streams pages now use: