A powerful web application that leverages AI to enhance image quality using the PicWish API. Upload any image and get an enhanced version with improved resolution, clarity, and color balance in real-time.
- Type: Web Application
- Stack: React 18 + Vite 4 + TailwindCSS 3
- API: PicWish Image Enhancement API v1.0
- License: MIT
- Drag & Drop Upload: Intuitive file upload with drag-and-drop support
- Real-time Enhancement: Live preview of enhancement progress
- Image Comparison: Side-by-side view of original and enhanced images
- Responsive Design: Optimized for mobile, tablet, and desktop views
- Loading States: Smooth loading transitions with spinner animation
react-image-enhancer/
βββ src/
β βββ components/ # React components
β β βββ Home.jsx # Main page component
β β βββ ImagePreview.jsx # Image comparison component
β β βββ ImageUpload.jsx # File upload component
β β βββ Loading.jsx # Loading spinner component
β βββ utils/
β β βββ enhanceImageApi.js # PicWish API integration
β βββ App.jsx # Root component
β βββ main.jsx # Entry point
βββ public/ # Static assets
βββ .env # Environment variables
βββ vite.config.js # Vite configuration
βββ eslint.config.js # ESLint configuration
-
Component Architecture
Home: Main container managing state and image processingImageUpload: Handles file selectionImagePreview: Displays original and enhanced imagesLoading: Shows loading animation
-
State Management
- Local state with useState in Home component
- Props for component communication
- File handling with URL.createObjectURL
-
API Integration
- Axios for HTTP requests to PicWish API
- Polling mechanism for enhancement status
- Error handling with try-catch blocks
- Node.js (v16+)
- npm or yarn
- PicWish API Key
- Clone and install dependencies:
git clone https://github.com/yourusername/react-image-enhancer.git
cd react-image-enhancer
npm install- Add your PicWish API key in .env:
PICWISE_API_KEY=your_api_key_here- Start development server:
npm run dev- React.js 18 with Vite
- TailwindCSS for styling
- Axios for API calls