A comprehensive web application for creating and managing automated ComfyUI installation scripts for cloud platforms like RunPod. Streamlines the configuration of custom nodes, models from CivitAI and HuggingFace, and generates production-ready deployment scripts.
The ComfyUI Deployment Builder solves the time-consuming and error-prone process of manually configuring ComfyUI environments by providing:
- Curated Database: Comprehensive catalog of custom nodes and models
- Visual Builder: Intuitive interface for creating deployment configurations
- Script Generation: Automated creation of RunPod-compatible installation scripts
- Template System: Shareable deployment templates for common use cases
- ✅ User authentication and role-based access control
- ✅ Admin interface for content curation
- ✅ CivitAI API integration for model discovery
- ✅ HuggingFace repository integration
- ✅ ComfyUI Manager database synchronization
- ✅ Basic deployment builder interface
- 🔄 Enhanced deployment builder with dependency resolution
- 🔄 Script generation engine with multiple output formats
- 🔄 Template system and community sharing
- 🔄 Automated URL validation and monitoring
- ⏳ Performance optimization and caching
- ⏳ Advanced search with Elasticsearch
- ⏳ Public API and webhook system
- ⏳ Progressive Web App features
- ⏳ Production deployment with PostgreSQL
- ⏳ Security hardening and compliance
- ⏳ Load testing and auto-scaling
- ⏳ Documentation and launch preparation
Frontend (Next.js) Backend API (Next.js) Database (SQLite/PostgreSQL)
├── React Components ├── Authentication ├── Users & Roles
├── TypeScript ├── CRUD Operations ├── Custom Nodes
├── shadcn/ui ├── External API Clients ├── Models & Metadata
└── Tailwind CSS └── Script Generation └── Deployments
External Integrations
├── CivitAI API (Model discovery)
├── HuggingFace API (Repository analysis)
├── ComfyUI Manager (Node database sync)
└── GitHub API (Repository validation)
- Frontend: Next.js 14, React, TypeScript, shadcn/ui, Tailwind CSS
- Backend: Next.js API Routes, NextAuth.js, Prisma ORM
- Database: SQLite (development) → PostgreSQL (production)
- External APIs: CivitAI, HuggingFace, GitHub, ComfyUI Manager
- Deployment: Vercel, Docker, GitHub Actions
Key entities and relationships:
Users (authentication, roles)
├── ApiTokens (CivitAI, HuggingFace credentials)
└── Deployments (user configurations)
├── DeploymentNodes (selected custom nodes)
├── DeploymentModels (selected models)
└── SystemPackages (apt/pip dependencies)
CustomNodes (GitHub repositories)
├── Metadata (description, author, tags)
├── Dependencies (requirements.txt, setup.py)
└── Validation (URL health, verification)
Models (CivitAI, HuggingFace)
├── Source information (ID, URL, type)
├── Download metadata (filename, size, auth)
└── Rich metadata (previews, stats, versions)- Node.js 18+
- npm or yarn
- Git
-
Clone the repository
git clone https://github.com/yourusername/comfyui-deployment-builder.git cd comfyui-deployment-builder -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local # Edit .env.local with your configuration -
Initialize database
npx prisma generate npx prisma db push npx prisma db seed
-
Start development server
npm run dev
Visit http://localhost:3000 to see the application.
# Database
DATABASE_URL="file:./dev.db"
# Authentication
NEXTAUTH_SECRET="your-secret-key"
NEXTAUTH_URL="http://localhost:3000"
# External APIs (optional for development)
CIVITAI_API_TOKEN="your-civitai-token"
HUGGINGFACE_API_TOKEN="your-hf-token"
GITHUB_API_TOKEN="your-github-token"comfyui-deployment-builder/
├── app/ # Next.js App Router
│ ├── (auth)/ # Protected routes
│ │ ├── admin/ # Admin interface
│ │ ├── dashboard/ # User dashboard
│ │ └── builder/ # Deployment builder
│ ├── api/ # API endpoints
│ │ ├── auth/ # Authentication
│ │ ├── civitai/ # CivitAI integration
│ │ ├── models/ # Model management
│ │ └── deployments/ # Deployment CRUD
│ ├── components/ # React components
│ │ ├── ui/ # shadcn/ui components
│ │ ├── forms/ # Form components
│ │ └── builders/ # Deployment builder UI
│ └── lib/ # Utilities
│ ├── clients/ # API clients
│ ├── db.ts # Database client
│ └── auth.ts # Auth configuration
├── prisma/ # Database schema
│ ├── schema.prisma # Prisma schema
│ └── migrations/ # Database migrations
├── scripts/ # Utility scripts
└── templates/ # Script generation templates
const client = new CivitAIClient({ token: process.env.CIVITAI_API_TOKEN });
// Search models
const models = await client.searchModels({
query: "anime style",
types: ["Checkpoint", "LORA"],
limit: 20
});
// Get model details
const model = await client.getModel(modelId);const client = new HuggingFaceClient({ token: process.env.HUGGINGFACE_API_TOKEN });
// Search repositories
const repos = await client.searchRepositories({
search: "stable diffusion",
filter: "diffusers"
});
// Analyze repository
const info = await client.analyzeRepository(repoUrl);const manager = new ComfyUIManagerClient();
// Sync latest node database
const nodes = await manager.getNodeDatabase();
await syncToDatabase(nodes);Example generated RunPod script:
#!/bin/bash
# Auto-generated by ComfyUI Deployment Builder
# Configuration: My SDXL Workflow
APT_PACKAGES=(
"git" "python3-pip" "python3-venv" "build-essential" "ffmpeg"
)
PIP_PACKAGES=(
"torch" "torchvision" "torchaudio" "transformers>=4.28.1"
"safetensors>=0.4.2" "diffusers" "xformers"
)
NODES=(
"https://github.com/ltdrdata/ComfyUI-Manager"
"https://github.com/cubiq/ComfyUI_essentials"
"https://github.com/ltdrdata/ComfyUI-Impact-Pack"
)
CHECKPOINT_MODELS=(
"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors"
)
# Installation function
function provisioning_start() {
# [Generated installation logic]
}
provisioning_start# Run all tests
npm test
# Run specific test suite
npm test -- --grep "CivitAI"
# Run tests with coverage
npm run test:coverage
# Run E2E tests
npm run test:e2e- Product Requirements Document - Comprehensive project overview
- Technical Specification - Detailed technical design
- Database Schema - Database design and migrations
- API Integrations - External API specifications
- Implementation Roadmap - Development timeline
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript strict mode
- Use Prettier for code formatting
- Write tests for new features
- Update documentation for API changes
- Follow conventional commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
- ComfyUI - The amazing node-based UI for Stable Diffusion
- ComfyUI Manager - Extension management system
- CivitAI - Community platform for AI art models
- HuggingFace - Platform for machine learning models
- RunPod - Cloud GPU platform for AI workloads
- 📧 Email: support@comfyui-builder.com
- 💬 Discord: Community Server
- 🐛 Issues: GitHub Issues
- 📖 Docs: Documentation Site
Status: 🚧 In Development | Version: 1.0.0-alpha | Last Updated: January 2025