An immersive, horror-themed AI-powered web application for designing and customizing t-shirts with haunted aesthetics. Built with cutting-edge web technologies and AI integration.
- Stable Diffusion Integration: Generate unique, spooky designs using AI
- Haunted Mode Toggle: Automatically add horror elements to any prompt
- Real-time Preview: Instant visualization on t-shirt mockups
- Background Removal: Automatic transparent background processing
- Dual-Side Printing: Design both front and back of t-shirts
- Interactive Design Editor: Drag, resize, and rotate designs with precision
- Color Customization: Full spectrum color picker with quick presets
- Material Selection: Cotton, Polyester, and Blend options
- Size Range: XS to XXL with accurate scaling
- Dynamic Pricing: Real-time cost calculation based on complexity
- Miragic API Integration: Cloud-based virtual try-on technology
- Real-time Processing: See yourself wearing designs instantly
- Multiple Backend Support: Extensible architecture for various AI models
- Image Optimization: Automatic compression for faster processing
- Smart Cart System: Persistent storage with snapshots
- Pre-designed Collection: Curated haunted apparel collection
- Sequential Naming: Auto-generated product names (TEE 1, TEE 2, etc.)
- Visual Previews: High-quality product images with both sides
- Cinematic Hero Section: Stranger Things-inspired title with 3D effects
- Haunted Animations: Floating ghosts, fog layers, and embers
- Interactive Orb: Sound and visual effects controller
- Smooth Transitions: GPU-accelerated animations
- Responsive Design: Optimized for all screen sizes
- React 18 with TypeScript
- Vite - Lightning-fast build tool
- Tailwind CSS - Utility-first styling
- shadcn/ui - High-quality component library
- Framer Motion - Advanced animations
- Three.js / OGL - 3D graphics and effects
- React Router - Client-side routing
- Node.js with Express
- Stability AI API - Image generation
- Remove.bg API - Background removal
- Miragic API - Virtual try-on
- CORS - Cross-origin resource sharing
- html2canvas - Screenshot generation
- Lucide React - Icon system
- React Hook Form - Form management
- Zod - Schema validation
- Node.js (v16 or higher)
- npm or yarn
- API Keys:
- Stability AI
- Remove.bg
- Miragic (optional)
- Navigate to project directory
cd project- Install dependencies
npm install- Configure environment variables
Create .env file in the backend folder:
PORT=5000
STABILITY_API_KEY=your_stability_ai_key_here
REMOVE_BG_API_KEY=your_removebg_key_here
MIRAGIC_API_KEY=your_miragic_key_here- Start the application
Development mode (runs both frontend and backend):
npm run devOr run separately:
# Terminal 1 - Backend
npm run dev:sd
# Terminal 2 - Frontend
npm run dev:frontend- Open in browser
http://localhost:5173
project/
โโโ backend/
โ โโโ designs/ # Generated AI designs
โ โโโ index.sd.js # Stable Diffusion server
โ โโโ miragic-tryon.js # Virtual try-on server
โ โโโ .env # API keys (not in repo)
โโโ src/
โ โโโ components/
โ โ โโโ animations/ # Reusable animation components
โ โ โโโ ui/ # shadcn/ui components
โ โ โโโ CinematicHero.tsx
โ โ โโโ MinimalDesignGenerator.tsx
โ โ โโโ EnhancedTShirtMockup.tsx
โ โ โโโ HauntedLayerSystem.tsx
โ โ โโโ Orb.tsx
โ โโโ pages/
โ โ โโโ ar-tryon.tsx # Virtual try-on page
โ โ โโโ collection.tsx # Product gallery
โ โ โโโ cart.tsx # Shopping cart
โ โ โโโ spooky-images.tsx # Image generation
โ โโโ context/
โ โ โโโ CartContext.tsx # Global cart state
โ โโโ utils/
โ โ โโโ cartStorage.ts # LocalStorage management
โ โ โโโ pricingCalculator.ts
โ โโโ App.tsx # Main application
โโโ public/
โ โโโ assets/ # Images and assets
โ โโโ mockups/ # T-shirt templates
โ โโโ haunted-mystery-sound.mp3
โโโ package.json
- Enter a Prompt: Describe your design idea
- Toggle Haunted Mode: Add spooky elements automatically
- Generate: Wait for AI to create your design
- Customize T-Shirt:
- Select front or back print
- Choose color, material, and size
- Drag and position the design
- Rotate and scale as needed
- Add to Cart: Save your creation
- Upload Photo: Take or select a clear, front-facing photo
- Select Design: Choose from your cart items
- Pick Side: Front or back print
- Apply: Wait for AI processing (10-30 seconds)
- Save Result: Download your virtual try-on image
- Browse Products: View pre-designed haunted apparel
- Add to Cart: Click to add items instantly
- View Cart: Review all selected items
- Checkout: (Payment integration coming soon)
- React.memo: Prevents unnecessary re-renders
- useCallback: Memoizes event handlers
- useMemo: Caches expensive computations
- Lazy Loading: Components loaded on demand
- Image Optimization: Compressed and resized assets
- GPU Acceleration: CSS transforms for smooth animations
- Code Splitting: Vite's automatic chunking
- Tree Shaking: Removes unused code
SpookShirts combines horror aesthetics with modern web design:
- Dark Theme: Deep purples, oranges, and blacks
- Cinematic Effects: Film-inspired transitions and typography
- Interactive Elements: Responsive to user actions
- Atmospheric: Fog, ghosts, and embers create immersion
- Professional: Clean code and optimized performance
- Payment gateway integration (Stripe/PayPal)
- User authentication and accounts
- Design gallery and marketplace
- Social media sharing
- Order tracking system
- Bulk ordering discounts
- More AI model options
- Mobile app version
MIT License - Free to use for personal and commercial projects
Tanush Shah (aka Unknown God)
- Email: unknowngod2024@gmail.com
- GitHub: @UnknownGod2011
- Instagram: @tanushshah_20
- Stability AI for image generation
- Remove.bg for background removal
- Miragic for virtual try-on technology
- shadcn for beautiful UI components
- The React and Vite communities
Built with ๐ by Tanush Shah
Summon your cursed costume today!