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