Skip to content

UnknownGod2011/Kiroween-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

38 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ‘ป SpookShirts - AI-Powered Custom T-Shirt Designer

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.

โœจ Features

๐ŸŽจ AI Design Generation

  • 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

๐Ÿ‘• Advanced T-Shirt Customization

  • 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

๐Ÿ“ฑ AR Virtual Try-On

  • 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

๐Ÿ›’ Shopping Experience

  • 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

๐ŸŽญ Immersive UI/UX

  • 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

๐Ÿ› ๏ธ Tech Stack

Frontend

  • 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

Backend

  • Node.js with Express
  • Stability AI API - Image generation
  • Remove.bg API - Background removal
  • Miragic API - Virtual try-on
  • CORS - Cross-origin resource sharing

Additional Libraries

  • html2canvas - Screenshot generation
  • Lucide React - Icon system
  • React Hook Form - Form management
  • Zod - Schema validation

๐Ÿš€ Getting Started

Prerequisites

Installation

  1. Navigate to project directory
cd project
  1. Install dependencies
npm install
  1. 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
  1. Start the application

Development mode (runs both frontend and backend):

npm run dev

Or run separately:

# Terminal 1 - Backend
npm run dev:sd

# Terminal 2 - Frontend  
npm run dev:frontend
  1. Open in browser
http://localhost:5173

๐Ÿ“ Project Structure

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

๐ŸŽฎ Usage Guide

Creating a Custom Design

  1. Enter a Prompt: Describe your design idea
  2. Toggle Haunted Mode: Add spooky elements automatically
  3. Generate: Wait for AI to create your design
  4. Customize T-Shirt:
    • Select front or back print
    • Choose color, material, and size
    • Drag and position the design
    • Rotate and scale as needed
  5. Add to Cart: Save your creation

Using AR Try-On

  1. Upload Photo: Take or select a clear, front-facing photo
  2. Select Design: Choose from your cart items
  3. Pick Side: Front or back print
  4. Apply: Wait for AI processing (10-30 seconds)
  5. Save Result: Download your virtual try-on image

Shopping Collection

  1. Browse Products: View pre-designed haunted apparel
  2. Add to Cart: Click to add items instantly
  3. View Cart: Review all selected items
  4. Checkout: (Payment integration coming soon)

โšก Performance Optimizations

  • 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

๐ŸŽจ Design Philosophy

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

๐Ÿ”ฎ Future Enhancements

  • 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

๐Ÿ“„ License

MIT License - Free to use for personal and commercial projects

๐Ÿ‘ค Author

Tanush Shah (aka Unknown God)

๐Ÿ™ Acknowledgments

  • 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!

About

Haunted

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published