Wiggly is an innovative platform that transforms user-uploaded images into custom T-shirt designs with AI-generated textures and 3D models. The platform combines computer vision, AI texture generation, and 3D modeling to create personalized apparel.
- AI Texture Generation: Upload front and back images to generate seamless T-shirt textures
- 3D Model Creation: Automatically generate 3D T-shirt models with applied textures
- Real-time Processing: Fast texture and model generation using Modal cloud infrastructure
- Multiple Deployment Options: Support for both direct API and n8n workflow integration
- Cloud-Native Architecture: Scalable deployment on Modal with Weaviate vector database
The platform follows a modern cloud-native architecture:
βββ frontend/ # Next.js frontend application
β βββ src/
β β βββ app/ # App router pages
β β βββ components/ # React components
β βββ public/ # Static assets
βββ wiggle/
β βββ backend/ # Backend API and services
β β βββ modal_integrated_deploy.py # Main Modal deployment
β β βββ direct_api.py # Direct API server
β β βββ weaviate_*.py # Database utilities
β β βββ n8n_workflow.json # N8N automation workflow
β β βββ README.md # Backend documentation
β βββ frontend/ # Alternative frontend (if needed)
βββ front.png # Sample front image
βββ back.png # Sample back image
βββ README.md # This file
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Three.js - 3D model rendering
- FastAPI - High-performance Python web framework
- Modal - Serverless cloud platform for AI workloads
- Blender - 3D modeling and texture application
- Weaviate - Vector database for AI embeddings
- N8N - Workflow automation platform
- Computer Vision - Image processing and analysis
- Texture Synthesis - AI-powered texture generation
- 3D Modeling - Automated T-shirt model creation
- Node.js 18+ and npm/bun
- Python 3.12+
- Modal account and CLI
- Weaviate cloud instance
cd frontend
npm install
npm run devThe frontend will be available at http://localhost:3000
cd wiggle/backend
pip install modal
modal token new
modal deploy modal_integrated_deploy.pycd wiggle/backend
pip install -r requirements_direct_api.txt
python run_direct_api.pyCreate .env files with the following variables:
WEAVIATE_GRPC_ENDPOINT=your_weaviate_endpoint
WEAVIATE_API_KEY=your_weaviate_key
MODAL_API_URL=your_modal_deployment_url- Base URL:
https://ykzou1214--wiggle-integrated-api-fastapi-app.modal.run
POST /api/texture/generate- Generate texture and 3D modelGET /api/texture/download/{filename}- Download generated textureGET /api/model/download/{filename}- Download 3D modelGET /health- Health check
curl -X POST "https://ykzou1214--wiggle-integrated-api-fastapi-app.modal.run/api/texture/generate" \
-F "userId=user123" \
-F "front=@front.png" \
-F "back=@back.png"Response:
{
"status": "completed",
"buildId": "uuid-here",
"modelUrl": "/api/model/download/model_uuid.glb",
"textureUrl": "/api/texture/download/texture_uuid.png",
"message": "3D model with texture generated successfully"
}The project includes a pre-configured N8N workflow for complete automation:
- File:
wiggle/backend/n8n_workflow.json - Features:
- Automated texture generation pipeline
- Webhook integration for external triggers
- Database storage with Weaviate
- Error handling and logging
- File management and cleanup
- Setup: Import the JSON file into your N8N instance
- Documentation: See N8N Deployment Guide for detailed setup instructions
# Test texture generation
curl -X POST "https://ykzou1214--wiggle-integrated-api-fastapi-app.modal.run/api/texture/generate" \
-F "userId=test_user" \
-F "front=@front.png" \
-F "back=@back.png"
# Download generated files
curl -o model.glb "https://ykzou1214--wiggle-integrated-api-fastapi-app.modal.run/api/model/download/model_id.glb"
curl -o texture.png "https://ykzou1214--wiggle-integrated-api-fastapi-app.modal.run/api/texture/download/texture_id.png"- Texture Generation: ~30-60 seconds
- 3D Model Creation: ~10-20 seconds
- File Sizes:
- Textures: ~200KB PNG
- Models: ~1KB OBJ format
- Concurrent Users: Scales automatically with Modal
# Backend
cd wiggle/backend
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
pip install -r requirements_direct_api.txt
python run_direct_api.py
# Frontend
cd frontend
npm install
npm run dev# Deploy to Modal
modal deploy modal_integrated_deploy.py
# Build frontend
npm run build- 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
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Check the Backend README for detailed setup instructions
- Review the N8N Deployment Guide
- Open an issue on GitHub
- Support for additional garment types
- Advanced texture customization options
- Real-time 3D preview
- Mobile app development
- Marketplace integration


