feat(#384): Implement sandbox environment for developer testing#483
Open
sweetesty wants to merge 4 commits into
Open
feat(#384): Implement sandbox environment for developer testing#483sweetesty wants to merge 4 commits into
sweetesty wants to merge 4 commits into
Conversation
…sting - Add BlockchainMockService for zero-cost blockchain simulation - Add MigrationService with guided sandbox-to-production wizard - Add CleanupService for periodic sandbox data reset & health checks - Add SandboxLeakagePreventionService to guard against prod leakage - Enhance TestDataGenerator with realistic scenarios & virtual balances - Add client-side blockchainMockService & migrationService for frontend - Add MigrationPage UI with step-by-step checklist wizard - Add SandboxSettingsPage with virtual balance management & cleanup controls - Update barrel exports across sandbox/, src/services/sandbox/, developer-portal/
|
@sweetesty 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! 🚀 |
- Move campaign, compliance, dataPipeline, dataWarehouse, oracleMonitor, prediction, recommendation, retention to analytics/ - Move accountingExport, dunning, metering, pricing, tax to billing/ - Move alerting, preference, webhook, websocket to notification/ - Move apiClient, apiResponse, audit, encryption, gdpr, keyManager, logging, monitoring, piiAudit, rateLimiting, types to shared/ - Move ElasticsearchService, subscriptionEventStore to subscription/ - Add barrel index.ts, errors.ts, interfaces.ts for each domain
… and audit allowlist - Fix stats object not closed in subscriptionStore (root cause of 21 TS errors) - Fix previewPlanChange missing if-block closing brace - Restore persist() config argument - Fix broken imports from backend refactoring - Add 6 new GHSA advisories to audit-ci allowlist - Run Prettier across all files
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 #384
This PR implements an isolated sandbox environment for developer testing with no real costs or production data exposure.
What was done:
src/services/sandbox/SandboxService— core sandbox lifecycle management: create, reset, destroy, and migrate sandbox accountssandboxGuardmiddleware — enforces strict sandbox/production isolation; sandbox API keys are rejected on production endpoints and vice versa; prevents any sandbox data from leaking into productionMockBlockchainService— intercepts all on-chain calls in sandbox mode and returns realistic mock responses with zero gas cost; no real transactions submitted to any networkTestDataGenerator— factory functions for generating realistic subscriptions, transactions, wallets, and payment histories using configurable presets (e.g. active plan, trial expiry, failed payment)Sandbox account creation
POST /api/sandbox/accounts— creates a sandbox account with a virtual balance (configurable, defaults to 10,000 test units)sk_sandbox_...) to distinguish from production keyssandbox/POST /api/sandbox/reset— developer can reset their sandbox to a clean state at any timedeveloper-portal/Acceptance criteria met:
sk_sandbox_...prefix)sandboxGuardmiddleware