Skip to content

Redesign sandbox environment to containerized per-user ephemeral instances #583

Description

@Smartdevs17

Context

The sandbox is a shared Stellar testnet environment where users interfere with each other's test data and contract state.

Current Limitation/Problem

Shared sandbox means users can see and affect each other's subscriptions. One user's reset wipes all data for everyone.

Expected Outcome

Per-user ephemeral sandbox instances spun up on demand via Docker API, with pre-seeded test data, 1-hour TTL, and automatic cleanup.

Acceptance Criteria

  • User requests sandbox via dashboard -> orchestrator provisions Docker container with full stack
  • Pre-seeded test data: 5 sample plans, 10 mock subscribers, 20 sample invoices
  • Sandbox TTL: 1 hour default, extendable to 4 hours (one 2h extension allowed)
  • Auto-cleanup: TTL expiry triggers container teardown and named volume removal
  • Resource limits: 512MB RAM, 1 CPU, 2GB disk per sandbox
  • Stellar testnet funding: automated friendbot funding on provision
  • Edge case: user hits max concurrent sandboxes (3) -> error with wait time estimate
  • Edge case: idle timeout (30 min no requests) -> warn user, extend dialog

Technical Scope

  • sandbox/orchestrator/ - Docker API orchestration service (Node.js/TypeScript)
  • sandbox/docker-compose.sandbox.yml - sandbox stack template
  • sandbox/seed/ - seed data SQL and contract deployment scripts
  • backend/sandbox/controller/ - sandbox lifecycle REST API
  • sandbox/cleanup-worker/ - TTL checker and cleanup cron
  • developer-portal/ - Sandbox management page with provision button

Metadata

Metadata

Assignees

Labels

200-points200 point issueStellar WaveIssues in the Stellar wave programdrips-waveIssues in the Drips Wave programhighHigh complexity issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions