**New Sandbox Service:** - Separate microservice for secure npm package execution - Uses isolated-vm for V8-level isolation - 128MB memory limit, 10s timeout - Package caching for performance - Express API with /execute, /health, /cache/clear endpoints **Why Microservice:** - VM2 doesn't work with Next.js Turbopack (requires runtime file access) - isolated-vm doesn't work in Vercel serverless (native bindings) - Microservice allows full Node environment with proper sandboxing - Industry standard approach (Replit, CodeSandbox, RunKit) **Deployment:** - Dockerfile with isolated-vm build dependencies - Railway.json configuration - Health checks and auto-restart policies - CORS configuration for Next.js integration **Next Steps:** 1. Deploy to Railway: cd services/sandbox-executor railway init railway up 2. Set SANDBOX_EXECUTOR_URL in Next.js env 3. Update API routes to call sandbox service This provides secure, production-ready package execution outside Vercel's constraints. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
19 lines
409 B
JSON
19 lines
409 B
JSON
{
|
|
"name": "tpmjs-sandbox-executor",
|
|
"version": "1.0.0",
|
|
"description": "Isolated sandbox service for executing TPMJS packages",
|
|
"main": "server.js",
|
|
"type": "module",
|
|
"scripts": {
|
|
"start": "node server.js",
|
|
"dev": "node --watch server.js"
|
|
},
|
|
"dependencies": {
|
|
"express": "^4.18.2",
|
|
"isolated-vm": "^5.0.2",
|
|
"cors": "^2.8.5"
|
|
},
|
|
"engines": {
|
|
"node": ">=20.0.0"
|
|
}
|
|
}
|