Skip to content

AVCodz/instance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vibe Platform v1.1.0

A containerized React application platform with dynamic container management and AI-restricted file access.

🚀 Quick Start

# Complete setup (builds images, initializes network, starts services)
./scripts/setup.sh

# Or manual setup:
./scripts/init-network.sh  # Initialize Docker network
./scripts/build-react-base.sh  # Build React base image

🔒 AI Restrictions (Frontend-Managed)

v1.1.0 introduces frontend-managed AI file access:

  • Backend: No restrictions - accepts any file operations
  • 🎯 Frontend: Responsible for enforcing AI access limitations
  • 📋 Guidelines: See AI_CONSTRAINTS.md for frontend validation patterns

📁 Architecture

├── containers/
│   └── react-base/          # Base React container image
├── orchestrator/             # Container management API with AI restrictions
├── traefik/                 # Reverse proxy and load balancer
├── scripts/                 # Automation scripts
├── AI_CONSTRAINTS.md         # Complete AI restriction documentation
└── API_OVERVIEW.md          # Updated API reference

🔧 Configuration

Environment variables (.env):

PORT=4000                                 # Orchestrator port
PORT_RANGE_START=3001                      # Dynamic container port range start
PORT_RANGE_END=3999                        # Dynamic container port range end
CONTAINER_MEMORY_MB=512                    # Memory limit per container (MB)
CONTAINER_CPU_SHARES=256                   # CPU shares per container
HEALTH_CHECK_INTERVAL_MS=30000             # Health check interval (ms)
STARTUP_TIMEOUT_MS=60000                   # Container startup timeout (ms)
NETWORK_NAME=vibe-network                  # Docker network name
HOST_IP=localhost                          # Host IP for container URLs

🌐 API Endpoints

Orchestrator (Port 4000)

  • GET /health - System health and metrics
  • GET /containers - List all vibe containers
  • POST /containers - Create new container
  • GET /containers/:id/files - List files in container
  • GET /containers/:id/file/* - Get file content
  • PUT /containers/:id/files - Update files
  • DELETE /containers/:id - Remove container
  • POST /containers/:id/stop - Stop container
  • POST /containers/:id/start - Start container
  • GET /containers/:id/logs - Get container logs

Traefik Dashboard (Port 8080)

Access Traefik dashboard for routing and monitoring.

🛠️ Development

Build React Base Image

./scripts/build-react-base.sh [version-tag]

Manual Service Management

# Start orchestrator
cd orchestrator && docker-compose up -d

# Start traefik
cd traefik && docker-compose up -d

# Stop all services
docker-compose down

📊 Monitoring

Health Check

curl http://localhost:4000/health

Container Status

curl http://localhost:4000/containers

🔒 Security Notes

  • Docker socket access is required for container management
  • Consider implementing authentication for production use
  • Resource limits are configured per container
  • Network isolation via dedicated Docker network

🚨 Troubleshooting

  1. Network Issues: Ensure vibe-network exists

    ./scripts/init-network.sh
  2. Image Not Found: Build the base image

    ./scripts/build-react-base.sh
  3. Port Conflicts: Check the port range configuration

    netstat -tuln | grep -E ':300[0-9]|:4000'

🔄 Updates

To update the platform:

  1. Modify container configurations
  2. Rebuild images: ./scripts/build-react-base.sh
  3. Restart services: docker-compose down && docker-compose up -d

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published