Skip to content

JustAGhosT/vectorforge

Repository files navigation

✨ VectorForge

Smart Image Converter β€” Transform images into professional-quality, infinitely scalable SVG graphics with AI-powered optimization.

Live Demo Netlify Status

πŸš€ Try It Now

Launch VectorForge β†’


πŸ“– Table of Contents


✨ Features

Core Conversion

  • PNG to SVG Conversion β€” Transform raster images into scalable vector graphics
  • Multi-Format Support β€” Convert between PNG, JPG, and WebP formats
  • Batch Processing β€” Convert up to 50 images simultaneously with progress tracking
  • Real-Time Preview β€” Side-by-side comparison with draggable divider

AI-Powered Optimization

  • Smart Analysis β€” AI detects image type (logo, icon, photo, illustration)
  • Auto Settings β€” Intelligent recommendations for optimal conversion
  • Iterative Refinement β€” AI-driven multi-pass conversion for best results
  • Quality Prediction β€” Estimates output quality before conversion

User Experience

  • Drag & Drop β€” Simple file upload with visual feedback
  • Keyboard Shortcuts β€” Power user controls for efficiency
  • Mobile Responsive β€” Full functionality on all devices with touch gestures
  • Conversion History β€” Access and re-download previous conversions
  • Format Education β€” Built-in guide explaining when to use each format

Technical Excellence

  • Client-Side Processing β€” Your files never leave your device
  • Modular Pipeline β€” Research-based algorithms for superior quality
  • Error Recovery β€” Graceful handling with helpful suggestions
  • Offline Support β€” Connection monitoring with status indicators

πŸš€ Getting Started

Quick Start (No Installation)

  1. Open VectorForge in your browser
  2. Drop an image or click to upload (PNG, JPG, WebP)
  3. Adjust settings using the sliders or click "AI Optimize"
  4. Download your converted SVG

Local Development

# Clone the repository
git clone https://github.com/JustAGhosT/vectorforge.git
cd vectorforge

# Install dependencies
npm install

# Start development server
npm run dev

πŸ”„ How It Works

VectorForge uses a sophisticated 5-stage pipeline for image conversion:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  1. Color Quantization  β†’  Median-cut algorithm for        β”‚
β”‚                            perceptual color grouping        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  2. Layer Extraction    β†’  Separate image into color       β”‚
β”‚                            layers for independent tracing   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  3. Contour Tracing     β†’  8-direction edge detection      β”‚
β”‚                            with Douglas-Peucker smoothing   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  4. Path Smoothing      β†’  Adaptive BΓ©zier curves          β”‚
β”‚                            (linear, quadratic, cubic)       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  5. SVG Generation      β†’  Optimized path output with      β”‚
β”‚                            minimal file size                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

βš™οΈ Conversion Settings

Setting Range Description Best For
Complexity 0-100% Controls detail preservation 30-50% for icons, 70-90% for photos
Color Simplification 0-100% Reduces color palette 60-80% for logos, 20-40% for art
Path Smoothing 0-100% Smooths edges and curves 50-70% for geometric, 30-50% for organic

Presets

Image Type Complexity Colors Smoothing
Icon 40% 70% 60%
Logo 60% 50% 60%
Illustration 70% 30% 50%
Photo 85% 15% 40%

πŸ€– AI Optimization

VectorForge includes AI-powered analysis to automatically optimize your conversion:

  1. Upload an image to the converter
  2. Click "AI Optimize" in the settings panel
  3. Review suggestions including:
    • Image type classification
    • Recommended settings
    • Quality prediction
    • Potential warnings
  4. Apply or adjust the suggestions

πŸ“ Note: AI features require Azure AI or OpenAI configuration. See Environment Setup for configuration.


⌨️ Keyboard Shortcuts

Action Mac Windows/Linux
Upload file ⌘ + O Ctrl + O
Download SVG ⌘ + S Ctrl + S
Zoom in ⌘ + = Ctrl + =
Zoom out ⌘ + - Ctrl + -
Reset zoom ⌘ + 0 Ctrl + 0
Undo settings ⌘ + Z Ctrl + Z
Redo settings ⌘ + ⇧ + Z Ctrl + Shift + Z
Show shortcuts ⌘ + ? Ctrl + ?

πŸ“ Project Structure

vectorforge/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ App.tsx              # Main application component
β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”‚   β”œβ”€β”€ ui/              # Base UI components (shadcn/ui)
β”‚   β”‚   β”œβ”€β”€ UploadZone.tsx   # File upload interface
β”‚   β”‚   β”œβ”€β”€ ConversionPreview.tsx  # Preview comparison
β”‚   β”‚   β”œβ”€β”€ SettingsPanel.tsx      # Conversion controls
β”‚   β”‚   β”œβ”€β”€ BatchConversion.tsx    # Batch processing
β”‚   β”‚   β”œβ”€β”€ IterativeConverter.tsx # AI iterative mode
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ hooks/               # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ use-conversion.ts      # Conversion logic
β”‚   β”‚   β”œβ”€β”€ use-ai-optimizer.ts    # AI integration
β”‚   β”‚   └── ...
β”‚   └── lib/                 # Core utilities
β”‚       β”œβ”€β”€ converter.ts     # Main converter
β”‚       β”œβ”€β”€ pipeline/        # Modular conversion stages
β”‚       └── ai-optimizer.ts  # AI analysis
β”œβ”€β”€ docs/                    # Documentation files
β”‚   β”œβ”€β”€ PRD.md               # Product requirements
β”‚   β”œβ”€β”€ CONVERSION_ANALYSIS.md   # Algorithm documentation
β”‚   β”œβ”€β”€ PIPELINE_QUICKSTART.md   # Pipeline usage guide
β”‚   └── ENVIRONMENT_SETUP.md     # Configuration guide

πŸ› οΈ Development

Available Scripts

npm run dev      # Start development server
npm run build    # Build for production
npm run preview  # Preview production build
npm run lint     # Run linter

Technology Stack

  • Framework: React 19 with TypeScript
  • Styling: Tailwind CSS v4
  • UI Components: shadcn/ui + Radix UI
  • Animations: Framer Motion
  • Icons: Phosphor Icons
  • Build: Vite
  • Hosting: Netlify
  • AI: Azure AI / OpenAI GPT-4o

πŸ“š Documentation

Document Description
PRD.md Product requirements and design specs
AI_ROADMAP.md AI integration plan and roadmap
CHANGELOG.md Features completed and planned
CONVERSION_ANALYSIS.md Deep dive into algorithms
PIPELINE_QUICKSTART.md Custom pipeline guide
ENVIRONMENT_SETUP.md AI configuration
ERROR_HANDLING.md Error handling details
SECURITY.md Security policy

πŸ”’ Privacy

Your files stay private. All image processing happens locally in your browser. No images are ever uploaded to external servers.


πŸ“„ License

MIT License - See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Generated from github/spark-template