JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q104105F
  • License MIT

Universal Docker containerization tool for AI-generated projects from Figma, Lovable, V0, and Bolt

Package Exports

  • vibe-to-docker
  • vibe-to-docker/vibe-to-docker.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vibe-to-docker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Vibe-to-Docker

npm version License: MIT Node.js Version Tests Coverage

Universal Docker containerization tool for AI-generated projects. Automatically detects and configures Docker for projects created with Lovable, Bolt, V0, and Figma Make.

Features

  • Automatic Tool Detection: Intelligently identifies project type (Lovable, Bolt, V0, Figma Make)
  • Tool-Specific Optimization: Tailored Docker configurations for each AI development tool
  • Production Ready: Multi-stage builds, nginx proxy, security best practices
  • Zero Config: Works out of the box with sensible defaults
  • Per-Project Setup: Configurations install to .vibe-docker/ directory
  • Multi-Service Support: Full-stack applications with databases and backends

Quick Start

# Navigate to your AI-generated project
cd your-project

# Initialize Docker configuration (auto-detects project type)
npx vibe-to-docker init

# Start containers
cd .vibe-docker && docker-compose up -d --build

Your application will be available at http://localhost:3000.

Installation

npx vibe-to-docker init

Global Installation

npm install -g vibe-to-docker
vibe-to-docker init

Local Development

npm install --save-dev vibe-to-docker

Supported Tools

Lovable (React + Vite + Supabase)

cd my-lovable-project
npx vibe-to-docker init --tool=lovable

# Configure Supabase credentials in .vibe-docker/.env
# VITE_SUPABASE_URL=https://xxx.supabase.co
# VITE_SUPABASE_ANON_KEY=your-key

cd .vibe-docker && docker-compose up -d --build

Features: Supabase integration, real-time features, authentication

Bolt (Remix + TypeScript)

cd my-bolt-project
npx vibe-to-docker init --tool=bolt

cd .vibe-docker && docker-compose up -d --build

Features: Multi-service orchestration, WebContainer compatibility

V0 (Next.js 14 + shadcn/ui)

cd my-v0-project
npx vibe-to-docker init --tool=v0

cd .vibe-docker && docker-compose up -d --build

Features: Server-side rendering, API routes, static optimization

Figma Make (React + Vite)

cd my-figma-project
npx vibe-to-docker init --tool=figma-make

cd .vibe-docker && docker-compose up -d --build

Features: Design-to-code projects, TypeScript support

Usage

Commands

# Initialize with auto-detection
vibe-to-docker init

# Specify tool explicitly
vibe-to-docker init --tool=<lovable|bolt|v0|figma-make>

# Preview without writing files
vibe-to-docker init --dry-run

# Overwrite existing configuration
vibe-to-docker init --force

# Show help
vibe-to-docker --help

# Show version
vibe-to-docker --version

# List available templates
vibe-to-docker --list

Legacy Templates (v2.x Compatible)

# Basic setup (simple frontend projects)
vibe-to-docker basic

# UI-heavy setup (large component libraries)
vibe-to-docker ui-heavy

Generated Files

Running vibe-to-docker init creates a .vibe-docker/ directory in your project:

your-project/
├── .vibe-docker/
│   ├── Dockerfile          # Multi-stage build configuration
│   ├── docker-compose.yml  # Container orchestration
│   ├── .dockerignore       # Build optimization
│   ├── nginx.conf          # Production web server
│   ├── .env                # Environment variables (auto-created)
│   ├── .env.example        # Environment template
│   └── DOCKER.md           # Usage documentation
└── [your project files]

File Descriptions

  • Dockerfile: Optimized multi-stage build with development and production targets
  • docker-compose.yml: Service definitions, networks, and volumes
  • nginx.conf: Production-ready nginx with security headers and caching
  • .env: Auto-generated from template, customize as needed
  • DOCKER.md: Comprehensive Docker usage guide

Docker Commands

Development

# Start containers in background
docker-compose up -d --build

# View logs
docker-compose logs -f

# Stop containers
docker-compose down

Production

# Build production image
docker build --target production -t myapp:latest .

# Run production container
docker run -p 80:80 --env-file .env myapp:latest

Maintenance

# Rebuild without cache
docker-compose build --no-cache

# Clean up Docker resources
docker system prune -a

# Remove volumes (caution: deletes data)
docker-compose down -v

Configuration

Environment Variables

The .env file is automatically created from .env.example. Key variables:

# Application
NODE_ENV=production

# Container Ports
DEV_PORT=5173
NGINX_PORT=3000

# Tool-Specific (Lovable/Supabase)
VITE_SUPABASE_URL=https://xxx.supabase.co
VITE_SUPABASE_ANON_KEY=your-key

# Tool-Specific (Next.js)
NEXT_PUBLIC_API_URL=https://api.yourdomain.com

Customization

Generated files serve as a starting point. Common modifications:

  • Dockerfile: Adjust Node.js version, add dependencies
  • nginx.conf: Add SSL, configure reverse proxy
  • docker-compose.yml: Add databases, Redis, or other services

Troubleshooting

Port Already in Use

# Change port in .vibe-docker/.env
NGINX_PORT=8080
DEV_PORT=5174

# Restart containers
docker-compose up -d --build

Build Failures

# Rebuild without cache
docker-compose build --no-cache

# Check Docker logs
docker-compose logs app-dev

Supabase Connection Issues (Lovable)

# Verify credentials in .vibe-docker/.env
VITE_SUPABASE_URL=https://xxx.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key

# Environment variables must be prefixed with VITE_
# Rebuild after changes
docker-compose up -d --build

Module Not Found Errors

# Ensure node_modules is in .dockerignore
# Rebuild container to reinstall dependencies
docker-compose build --no-cache

Deployment

The generated Docker configuration works with major cloud platforms:

  • AWS ECS/Fargate: Production-ready for container services
  • Google Cloud Run: Optimized for serverless containers
  • DigitalOcean App Platform: Ready for platform deployment
  • Heroku Container Registry: Compatible with Heroku
  • Vercel: Use Dockerfile for containerized deployments

CI/CD Example (GitHub Actions)

name: Build and Deploy
on:
  push:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Build Docker image
        run: docker build -t app:latest .
      - name: Push to registry
        run: docker push your-registry/app:latest

Documentation

User Guides

Tool-Specific Guides

Technical Documentation

Requirements

  • Node.js >= 20.8.1
  • npm >= 10.0.0
  • Docker >= 20.0.0
  • Docker Compose >= 2.0.0

License

MIT License - see LICENSE file for details.

Support

Acknowledgments

Built for the AI-powered development community. Supporting Figma Make, Lovable, V0, Bolt, and modern web frameworks.


Made with ❤️ for the AI-powered development community