An advanced web application that generates unique t-shirt designs using Stable Diffusion 3.5 and Hugging Face API. Create custom t-shirt designs with AI, preview them in real-time, and manage your online store.
git clone https://github.com/rastinder/auto-tshirt-designer1.git
cd auto-tshirt-designer1
python -m venv venv
venv\Scripts\activate
cd server
pip install -r requirements.txt
cd ..
npm install
# Start both frontend and backend
start.bat
cd ~
git clone https://github.com/rastinder/auto-tshirt-designer1.git
cd auto-tshirt-designer1
chmod +x deploy.sh
./deploy.sh
pm2 delete all && cd ~ && sudo rm -rf auto-tshirt-designer1 && git clone https://github.com/rastinder/auto-tshirt-designer1.git && cd auto-tshirt-designer1 && chmod +x deploy.sh && ./deploy.sh
The worker is a fallback system that generates images when the Hugging Face API is unavailable.
setup_worker_gpu.bat
chmod +x setup_worker_gpu.sh && ./setup_worker_gpu.sh
.
βββ src/ # Frontend source
β βββ components/ # React components
β βββ pages/ # Page components
β βββ utils/ # Utility functions
βββ server/ # FastAPI backend
β βββ main.py # Server entry point
β βββ task_queue.py # Task management
β βββ requirements.txt # Python dependencies
βββ outputs/ # Generated images
βββ logs/ # Server logs
βββ worker/ # Stable Diffusion worker (fallback)
POST /design - Create new design
{
"prompt": "A cosmic galaxy pattern",
"style": "realistic",
"negative_prompt": "blurry, distorted, low quality",
"priority": 1
}
GET /status/{task_id} - Check design statusGET /images/{image_name} - Retrieve generated imagesWS /ws - WebSocket connection for workersCreate a .env file in the server directory:
HOST=0.0.0.0
PORT=8000
HF_API_KEY=your_huggingface_api_key
Access the test dashboard at https://aitshirts.in/test for a visual interface showing:
curl https://aitshirts.in/test
curl https://aitshirts.in/test/run-all
Health Check:
curl https://aitshirts.in/api/test/health
Design Generation Test:
curl -X POST https://aitshirts.in/api/test/design \
-H "Content-Type: application/json" \
-d '{"prompt": "test design", "test_mode": true}'
Background Removal Test:
curl -X POST https://aitshirts.in/api/test/background-removal \
-H "Content-Type: application/json" \
-d '{"image_url": "https://example.com/image.png", "test_mode": true}'
Worker Status:
curl https://aitshirts.in/api/test/workers
{
"status": "ok",
"timestamp": "2024-01-20T12:00:00Z"
}
{
"workers": {
"connected": 2,
"ids": ["worker1", "worker2"]
},
"queue": {
"size": 0,
"pending": 0,
"processing": 0
}
}
{
"status": "success",
"task_id": "test-123",
"result": {
"image_url": "/images/test-image.png",
"metadata": {
"prompt": "test design",
"test": true
}
}
}
For Windows users, run the test script:
cd server
test_full_api.bat
For PowerShell users (detailed output):
cd server
.\test_full_api.ps1
# Start development servers
start.bat
# Start worker (optional)
worker\start_worker.bat
# Start production servers
./deploy.sh
# Start worker (optional)
./worker/start_worker.sh
Logs are stored in the logs directory:
logs/server.loggit checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Rastinder - GitHub
Project Link: https://github.com/rastinder/auto-tshirt-designer1
An advanced web application that generates unique t-shirt designs using Stable Diffusion 3.5 and Hugging Face API. Create custom t-shirt designs with AI, preview them in real-time, and manage your online store.
git clone https://github.com/rastinder/auto-tshirt-designer1.git
cd auto-tshirt-designer1
python -m venv venv
venv\Scripts\activate
cd server
pip install -r requirements.txt
cd ..
npm install
# Start both frontend and backend
start.bat
cd ~
git clone https://github.com/rastinder/auto-tshirt-designer1.git
cd auto-tshirt-designer1
chmod +x deploy.sh
./deploy.sh
pm2 delete all && cd ~ && sudo rm -rf auto-tshirt-designer1 && git clone https://github.com/rastinder/auto-tshirt-designer1.git && cd auto-tshirt-designer1 && chmod +x deploy.sh && ./deploy.sh
The worker is a fallback system that generates images when the Hugging Face API is unavailable.
setup_worker_gpu.bat
chmod +x setup_worker_gpu.sh && ./setup_worker_gpu.sh
.
βββ src/ # Frontend source
β βββ components/ # React components
β βββ pages/ # Page components
β βββ utils/ # Utility functions
βββ server/ # FastAPI backend
β βββ main.py # Server entry point
β βββ task_queue.py # Task management
β βββ requirements.txt # Python dependencies
βββ outputs/ # Generated images
βββ logs/ # Server logs
βββ worker/ # Stable Diffusion worker (fallback)
POST /design - Create new design
{
"prompt": "A cosmic galaxy pattern",
"style": "realistic",
"negative_prompt": "blurry, distorted, low quality",
"priority": 1
}
GET /status/{task_id} - Check design statusGET /images/{image_name} - Retrieve generated imagesWS /ws - WebSocket connection for workersCreate a .env file in the server directory:
HOST=0.0.0.0
PORT=8000
HF_API_KEY=your_huggingface_api_key
Access the test dashboard at https://aitshirts.in/test for a visual interface showing:
curl https://aitshirts.in/test
curl https://aitshirts.in/test/run-all
Health Check:
curl https://aitshirts.in/api/test/health
Design Generation Test:
curl -X POST https://aitshirts.in/api/test/design \
-H "Content-Type: application/json" \
-d '{"prompt": "test design", "test_mode": true}'
Background Removal Test:
curl -X POST https://aitshirts.in/api/test/background-removal \
-H "Content-Type: application/json" \
-d '{"image_url": "https://example.com/image.png", "test_mode": true}'
Worker Status:
curl https://aitshirts.in/api/test/workers
{
"status": "ok",
"timestamp": "2024-01-20T12:00:00Z"
}
{
"workers": {
"connected": 2,
"ids": ["worker1", "worker2"]
},
"queue": {
"size": 0,
"pending": 0,
"processing": 0
}
}
{
"status": "success",
"task_id": "test-123",
"result": {
"image_url": "/images/test-image.png",
"metadata": {
"prompt": "test design",
"test": true
}
}
}
For Windows users, run the test script:
cd server
test_full_api.bat
For PowerShell users (detailed output):
cd server
.\test_full_api.ps1
# Start development servers
start.bat
# Start worker (optional)
worker\start_worker.bat
# Start production servers
./deploy.sh
# Start worker (optional)
./worker/start_worker.sh
Logs are stored in the logs directory:
logs/server.loggit checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Rastinder - GitHub
Project Link: https://github.com/rastinder/auto-tshirt-designer1