📦 ADDITIONAL DIRECTORIES
container/
Purpose: Sandbox container tooling for local development and debugging
Location: /container/
Key files:
cli-tools.ts - Command-line interface for container operations:
- File synchronization
- Command execution in sandbox
- Log retrieval
- Static analysis
- Runtime error monitoring
storage.ts - Persistent storage management:
- Key-value store for container state
- File system operations
- Cache management
process-monitor.ts - Process lifecycle monitoring:
- Dev server health checks
- Process restart on crashes
- Resource usage tracking
- Error collection
types.ts - TypeScript types for container APIs
Usage: These tools are used internally by the sandbox service and for local debugging. Not typically modified unless adding new sandbox features.
templates/
Purpose: Project template system for generating new apps
Location: /templates/
Key files:
template_catalog.json - Master catalog of all available templates:
- React (Vite, CRA)
- Next.js
- Vue
- Svelte
- Vanilla JS Each with metadata: name, description, files, dependencies
definitions/ - Template definition files (not in repo, generated)
zips/ - Compressed template archives for deployment
generate_template_catalog.py - Builds catalog from template sources
deploy_templates.sh - Deploys templates to production
reference/ - Reference implementations
How templates work:
- Agent selects template based on user's requirements (React, Vue, etc.)
- Template provides base files (package.json, tsconfig, etc.)
- Agent generates additional files on top of template
- All files deployed to sandbox for preview
Adding new templates:
- Create template definition in
definitions/ - Run
python generate_template_catalog.py - Test locally with agent
- Deploy:
bash deploy_templates.sh