Created by Salimuddin - Full-Stack Developer & Media Processing Expert
A comprehensive, modern media conversion platform featuring both web application and desktop app capabilities. Built with Node.js, React, and Electron with professional-grade architecture, properly named services, and all libraries fully tested and working.
- ✅ Native Desktop App - Full-featured Electron application
- ✅ Local Processing - No internet required, complete privacy
- ✅ File System Access - Direct file management and organization
- ✅ Video Splitting with Audio - Advanced FFmpeg integration with AAC encoding
- ✅ Segment Renaming - Click-to-rename video segments for organization
- ✅ Real-time Preview - Instant video segment previews and downloads
- ✅ Browser-based Interface - Access from any modern web browser
- ✅ Progressive Web App - Responsive design across all devices
- ✅ Cloud Processing - Server-side media processing
- ✅ Real-time Progress - Live conversion status updates
Backend Libraries:
- ✅ Sharp - High-performance image processing
- ✅ FFmpeg - Video conversion and manipulation with audio preservation
- ✅ Canvas - Server-side graphics rendering
- ✅ Jimp - Pure JavaScript image processing
- ✅ WebP Service - WebP conversion (Sharp fallback implemented)
- ✅ GIF Encoder - Animated GIF creation
Frontend Libraries:
- ✅ GSAP - High-performance animations
- ✅ Framer Motion - React animation framework
- ✅ AnimeJS - Lightweight animation library
- ✅ Lottie Web - After Effects animations
- ✅ Three.js - 3D graphics and WebGL
- ✅ Konva - 2D canvas library
- ✅ P5.js - Creative coding framework
- ✅ D3.js - Data visualization
Development Servers:
- ✅ Frontend Server: Running on
http://localhost:3001(Vite) - ✅ Backend Server: Running on
http://localhost:3003(Express) - ✅ Desktop App: Electron with local processing capabilities
- ✅ Functionality Tester: Available at
http://localhost:3003/functionality
🟢 FULLY OPERATIONAL - All libraries tested and working
🟢 Desktop App Ready - Native Electron application with local processing
🟢 Web App Ready - Browser-based interface with cloud processing
🟢 Library Compatibility - All Windows/macOS/Linux binary issues resolved
🟢 Audio Preservation - FFmpeg configured for proper audio handling
🟢 Video Splitting - Advanced segment creation with renaming capabilities
🟢 Testing Infrastructure - Comprehensive validation system in place
🟢 Clean Architecture - Professional service organization implemented
- 🎬 Advanced Video Splitting: Split videos into custom durations with preserved audio
- 🏷️ Segment Renaming: Click-to-rename video segments for better organization
- 📱 Real-time Preview: Instant video segment previews with download options
- 🔒 Complete Privacy: All processing happens locally, no data leaves your computer
- 📁 File System Integration: Direct access to your local files and folders
- ⚡ High Performance: Native desktop performance with FFmpeg integration
- ☁️ Cloud Processing: Server-side conversion for any device
- 📊 Real-time Progress: Live updates during conversion processes
- 🔄 Batch Operations: Process multiple files simultaneously
- 📱 Responsive Design: Works perfectly on desktop, tablet, and mobile
- 🌍 Cross-platform: Access from any modern web browser
- Format Conversion: JPEG, PNG, WebP, AVIF, GIF, BMP, TIFF, SVG
- Image Manipulation: Resize, crop, rotate, optimize, apply effects
- Intelligent Service Selection: Automatically chooses optimal processing library (Sharp, Jimp, ImageMagick)
- Batch Processing: Convert multiple files simultaneously
- Advanced Effects: Filters, overlays, watermarks, text addition
- Format Conversion: MP4, AVI, MOV, WebM, MKV, M4V, 3GP, FLV
- Advanced Video Splitting: Split videos by duration or custom segments with audio preservation
- Video Segment Renaming: Organize clips with custom names (Intro, Hook, Outro, etc.)
- Audio Preservation: Proper AAC encoding ensures audio quality in all segments
- Quality Control: Multiple quality presets for web delivery
- Frame Extraction: Extract specific frames or sequences
- Real-time Preview: Instant preview of video segments with download options
- GIF Creation: Convert videos/images to animated GIFs
- Frame Manipulation: Extract, edit, and reassemble GIF frames
- Optimization: Size and quality optimization for web
- Scene Filtering: Smart frame selection based on content analysis
- Text Overlay: Add animated text to GIFs
- 🎯 Click-to-Rename Segments: Instantly rename video segments for better organization
- 📁 Local File Management: Direct access to your computer's file system
- 🔒 Complete Privacy: No internet required, all processing happens locally
- ⚡ Native Performance: Full desktop application performance
- 🎬 Advanced FFmpeg Integration: Professional-grade video processing
- 📱 Instant Preview: Real-time video segment previews with working audio
- Dual-Mode Platform: Both web and desktop applications from same codebase
- Consolidated Services: Replaced 20+ duplicate services with 3 unified processors
- Intelligent Service Selection: Automatic optimal library selection based on operation and file characteristics
- Event-Driven Processing: Real-time progress tracking and status updates
- Clean API Design: RESTful endpoints with comprehensive error handling
- Factory Pattern: Centralized service management and configuration
- Electron Integration: Native desktop capabilities with IPC communication
- PDF to Markdown: Convert PDF documents to markdown format
- Images to PDF: Bundle multiple images into a single PDF document
📦 GIF converter/
├── 📂 backend/ # Node.js Express API
│ ├── 📂 src/
│ │ ├── 📂 controllers/ # Request handlers
│ │ │ └── 📄 webpController.js # WebP-specific operations
│ │ ├── 📂 routes/ # API route definitions (NEW PROPER NAMING!)
│ │ │ ├── 📄 ConversionRoutes.js # Main conversion endpoints
│ │ │ ├── 📄 SplitRoutes.js # Video/GIF splitting operations
│ │ │ ├── 📄 VideoRoutes.js # Video processing endpoints
│ │ │ ├── 📄 AiRoutes.js # AI-powered enhancements
│ │ │ ├── 📄 TextRoutes.js # Text processing operations
│ │ │ ├── 📄 FileRoutes.js # File management endpoints
│ │ │ └── 📄 WebpRoutes.js # WebP conversion routes
│ │ ├── 📂 services/ # Core processing services (COMPLETELY REFACTORED!)
│ │ │ ├── 📄 ImageProcessingService.js # Unified image processing
│ │ │ ├── 📄 VideoProcessingService.js # Unified video processing
│ │ │ ├── 📄 GifProcessingService.js # Unified GIF processing
│ │ │ ├── 📄 AiService.js # AI-powered enhancements
│ │ │ ├── 📄 CleanupService.js # File cleanup management
│ │ │ ├── 📄 ConversionService.js # General conversion utilities
│ │ │ ├── 📄 EditService.js # Image editing operations
│ │ │ ├── 📄 FfmpegService.js # FFmpeg wrapper service
│ │ │ ├── 📄 GifService.js # Advanced GIF operations
│ │ │ ├── 📄 SplitService.js # Media splitting utilities
│ │ │ ├── 📄 TextService.js # Text overlay processing
│ │ │ ├── 📄 VideoService.js # Video manipulation tools
│ │ │ ├── 📄 WebPService.js # WebP format handling
│ │ │ ├── 📄 SharpService.js # Sharp image processing
│ │ │ ├── 📄 JimpService.js # Pure JS image processing
│ │ │ ├── 📄 ImageMagickService.js # ImageMagick integration
│ │ │ ├── 📄 EnhancedConversionService.js # Advanced conversions
│ │ │ ├── 📄 EnhancedJimpService.js # Extended Jimp functionality
│ │ │ ├── 📄 MediaAnalysisService.js # Media analysis tools
│ │ │ ├── 📄 CanvasGraphicsService.js # Canvas-based graphics
│ │ │ ├── 📄 VideoJSService.js # Video.js integration
│ │ │ ├── 📄 VideoSplitterService.js # Video splitting utilities
│ │ │ └── 📄 index.js # ServiceFactory & Registry
│ │ ├── 📂 utils/ # Utility libraries (RENAMED FROM lib/)
│ │ │ └── 📄 FilePathUtils.js # Centralized file management
│ │ ├── 📂 middleware/ # Express middleware (PROPER NAMING!)
│ │ │ ├── 📄 ErrorHandler.js # Error handling middleware
│ │ │ └── 📄 FileValidator.js # File validation middleware
│ │ ├── 📂 config/ # Configuration files
│ │ │ └── 📄 index.js # Main configuration
│ │ ├── 📄 app.js # Express application setup
│ │ └── 📄 server.js # Server entry point
│ ├── 📄 package.json
│ └── 📄 eslint.config.js
├── 📂 electron/ # Desktop Application
│ ├── 📄 main.js # Electron main process with IPC handlers
│ ├── 📄 preload.js # Secure preload script
│ └── 📄 main-old.js # Legacy main process backup
├── 📂 frontend/ # React SPA
│ ├── 📂 src/
│ │ ├── 📂 components/ # React components (RENAMED & ORGANIZED!)
│ │ │ ├── 📄 MainConversionInterface.jsx # Main conversion UI
│ │ │ ├── 📄 ProgressVisualization.jsx # Progress tracking
│ │ │ ├── 📄 MainNavigation.jsx # Navigation component
│ │ │ ├── 📄 ImageEditor.jsx # Image editing interface
│ │ │ ├── 📄 FileManager.jsx # File management UI
│ │ │ ├── 📄 VideoToGifConverter.jsx # Video to GIF converter
│ │ │ ├── 📄 WebPConverter.jsx # WebP conversion UI
│ │ │ ├── 📄 GifSplitter.jsx # GIF splitting interface
│ │ │ ├── 📄 AddText.jsx # Text overlay component
│ │ │ ├── 📄 AdvancedUploadArea.jsx # Advanced file upload
│ │ │ ├── � Footer.jsx # Footer component
│ │ │ ├── 📄 Header.jsx # Header component
│ │ │ ├── 📄 HomePage.jsx # Home page component
│ │ │ ├── 📄 Results.jsx # Results display
│ │ │ ├── 📄 Sidebar.jsx # Sidebar navigation
│ │ │ ├── 📄 SplitResults.jsx # Split results display
│ │ │ ├── 📄 UploadArea.jsx # File upload area
│ │ │ └── 📄 VideoResults.jsx # Video results display
│ │ ├── �📂 utils/ # Frontend utilities
│ │ │ ├── 📄 NotificationService.js # Notification system
│ │ │ └── 📄 polishedHelpers.js # UI helper functions
│ │ ├── 📄 App.jsx # Main application component
│ │ ├── 📄 main.jsx # React entry point
│ │ └── 📄 aio-convert-style.css # Main stylesheet
│ ├── 📄 package.json
│ ├── 📄 vite.config.js
│ └── 📄 index.html
├── 📂 logs/ # Application logs
├── 📂 output/ # Processed file output
├── 📂 public/ # Static assets
│ └── 📂 static/
├── 📂 temp/ # Temporary processing files
├── 📂 uploads/ # Uploaded files
├── 📄 README.md # This file
├── 📄 ARCHITECTURE.md # Detailed architecture documentation
└── 📄 package.json # Root package configuration
All backend libraries have been thoroughly tested and verified:
cd backend
node library-test.jsTest Results:
Testing key libraries...
✅ Sharp: Working
✅ FFmpeg: Working
✅ Canvas: Working
✅ Jimp: Working
✅ WebP Service: Working (Sharp fallback)
✅ GIF Encoder: Working
=== SUMMARY ===
✅ Passed: 6
❌ Failed: 0
Frontend libraries tested through browser component:
- Access http://localhost:3001 and click "Library Test"
- All animation and graphics libraries load successfully
- React components verify GSAP, Framer Motion, AnimeJS, Lottie, Three.js, Konva, P5.js, D3.js
✅ WebP Service Fix: Removed problematic node-webp, implemented Sharp fallback
✅ Functionality Tester: Added route at /functionality with proper HTML serving
✅ Library Compatibility: All Windows binary issues resolved
✅ Service Architecture: Clean imports and error handling throughout
- Node.js 18+ and npm
- FFmpeg (for video processing - included via ffmpeg-static in desktop app)
- ImageMagick (for advanced image operations)
# Clone the repository
git clone https://github.com/salimuddin07/GIF-converter.git
cd "AIO converter"
# Install dependencies
npm install
# Run the desktop application
npm run electron# Backend Setup
cd backend
npm install
npm run dev # Development server with hot reload
# Frontend Setup (in new terminal)
cd frontend
npm install
npm run dev # Development server with hot reloadCreate .env files in both backend and frontend directories:
Backend .env:
NODE_ENV=development
PORT=3003
OPENAI_API_KEY=your_openai_key_here
MAX_FILE_SIZE_GB=500
MAX_BATCH_COUNT=20Frontend .env:
VITE_API_BASE_URL=http://localhost:3003
VITE_MAX_FILE_SIZE=500All-in-one media conversion toolkit powered by an Express (Node.js) backend and a Vite + React frontend. The application handles image, GIF, video, and document workflows with optimized processing pipelines and a modular service architecture.
- Live targets: convert, compress, and split media assets, extract frames, generate GIFs, and transform PDFs to Markdown.
- Modern foundations: FFmpeg, Sharp, Canvas, Jimp, and pdfjs-dist on the backend; React, Vite, and Tailwind-friendly styling on the frontend.
- Production ready: includes CSP-aware deployment guidance, mixed-content protections, and background cleanup jobs.
Need more architectural depth? See
ARCHITECTURE.mdfor service diagrams and routing details.
| Category | Highlights |
|---|---|
| Image | Format conversion (JPEG/PNG/WebP/AVIF/JXL), resizing, optimization, overlays, batch jobs |
| Video | Format conversion, video splitting, frame extraction, optimized presets for web delivery |
| GIF | Create GIFs from videos or image sequences, split & edit frames, apply text and effects |
| Documents | PDF → Markdown conversion, images → PDF bundling |
| UX & Ops | Dynamic backend detection, progress visualisations, asset cleanup scheduler, CSP-safe frontend |
- Frontend: React 18, Vite 5, modern CSS (with room for Tailwind/utility layers), pdfjs-dist, GSAP + motion libraries
- Backend: Node.js 18+, Express, Sharp, FFmpeg (via fluent-ffmpeg/ffmpeg-static), Canvas, Jimp, ImageMagick helpers
- Tooling: npm workspaces, ESLint, Nodemon, Concurrent dev runners, Vercel-ready frontend build
backend/exposes REST routes grouped by capability (conversion, split, AI, text, modern formats) backed by service modules.frontend/provides a single-page application that detects the backend URL at runtime and wraps network calls with mixed-content guards.- A scheduled cleanup job purges temporary artifacts (
temp/,public/static/) to keep disk usage predictable. - Environment-variable driven configuration allows the same code base to run locally, on-prem, or in the cloud.
gif-converter/
├── backend/ # Express API and processing services
│ ├── src/
│ │ ├── controllers/ # Route handlers (e.g., WebP controller)
│ │ ├── routes/ # REST endpoints grouped by feature
│ │ ├── services/ # Image, video, GIF, AI, and utility services
│ │ ├── middleware/ # Error handling, file validation
│ │ ├── config/ # Centralised configuration helpers
│ │ └── app.js # Express app wiring
│ ├── server.js # HTTP server & cleanup scheduler
│ └── package.json
├── frontend/ # React application (Vite)
│ ├── src/
│ │ ├── components/ # Feature-specific UI modules
│ │ ├── utils/ # API client, pdf helpers, formatting
│ │ ├── App.jsx # App shell
│ │ └── main.jsx # Vite entry
│ ├── public/
│ ├── index.html
│ └── package.json
├── public/static/ # Generated media outputs (served by backend)
├── logs/ # Text logs (rotated by cleanup job)
├── Dockerfile # Containerised build (optional)
├── render.yaml # Example Render.com spec (optional)
├── README.md # This document
└── package.json # Workspace & shared scripts
| Requirement | Notes |
|---|---|
| Node.js ≥ 18 & npm ≥ 8 | Required for both frontend and backend; npm 8+ enables workspace installs |
| FFmpeg | Needed for video/GIF manipulation. Install via package manager (choco install ffmpeg on Windows, brew install ffmpeg on macOS) or download binaries from ffmpeg.org. |
| ImageMagick | Unlocks additional raster/vector conversions (choco install imagemagick or brew install imagemagick). |
| Build tools (Windows) | Sharp/Canvas require native build tools. Install “Desktop development with C++” workload (Visual Studio Build Tools) and the Windows 10 SDK. |
Optional services such as OpenAI require corresponding API keys (see environment variables below).
# 1. Install all workspaces (root + backend + frontend)
npm install
# 2. Start both servers with hot reload
npm run dev
# Frontend: http://localhost:3001
# Backend: http://localhost:3003Tip: Run
npm run dev:backendornpm run dev:frontendfrom the repository root if you want to start either stack individually.
Stop the servers with Ctrl+C. Nodemon (backend) and Vite (frontend) automatically reload on file changes.
Create .env files in both the backend/ and frontend/ folders. The application provides sensible defaults but configuring these variables keeps behaviour predictable.
| Variable | Default | Purpose |
|---|---|---|
PORT |
3003 |
HTTP port for the Express API. |
MAX_FILE_SIZE_GB |
10 |
Maximum upload size per file. |
MAX_BATCH_COUNT |
30 |
Max items in a batch conversion request. |
JPEG_QUALITY |
80 |
Default quality for JPEG outputs. |
FILE_TTL_MINUTES |
30 |
Retention window for temporary assets before cleanup. |
OPENAI_API_KEY |
(unset) | Enables AI-powered features when provided. |
| Variable | Description |
|---|---|
VITE_BACKEND_URL |
Preferred backend base URL (e.g., http://localhost:3003 for local dev or https://api.example.com in production). |
VITE_API_BASE_URL / VITE_BACKEND_BASE_URL / VITE_APP_BACKEND_URL |
Legacy aliases also honoured at runtime. |
VITE_MAX_FILE_SIZE |
Optional UI limit (in MB) shown to users. |
When the frontend is hosted over HTTPS (e.g., on Vercel), the backend must be available over HTTPS. Otherwise the browser will block requests; the app now surfaces a mixed-content warning explaining how to fix it.
| Command | Location | Description |
|---|---|---|
npm run dev |
root | Start backend (nodemon) + frontend (Vite) concurrently. |
npm run dev:backend |
root | Start only the Express API. |
npm run dev:frontend |
root | Start only the React SPA. |
npm run lint |
root | Run ESLint for both workspaces. |
npm run lint:fix |
root | Auto-fix lint issues. |
npm run clean |
root | Remove all node_modules folders (useful before reinstalling deps). |
Backend and frontend packages also expose their own npm run lint, npm run build, etc.
# Frontend bundle (outputs to frontend/dist)
cd frontend
npm run build
# Backend production start
cd ../backend
npm install --production
npm start- Set
VITE_BACKEND_URL(orVITE_API_BASE_URL) in the deployment environment to the HTTPS endpoint of your backend. - Trigger a Vercel build; the production bundle lives in
frontend/dist. - Ensure your hosting configuration includes the CSP headers from
frontend/vercel.json.
The backend is a standard Node.js server; you can:
- Deploy to services like Render, Railway, Fly.io, or a VPS (see
render.yamlfor a template). - Provide the same environment variables shown above.
- Expose the server via HTTPS (use a reverse proxy such as Nginx or a managed certificate service).
- Temporary files live in
temp/andpublic/static/. A scheduled cleanup job removes stale assets based onFILE_TTL_MINUTES. - Logs are written to
logs/. Rotate or prune them regularly if deploying long-term. - Use
npm run clean(root) to delete workspace dependencies before reinstalling modules. - For manual cleanup, you can also empty
public/staticandtemp—the app recreates them at startup if missing.
| Symptom | Likely Cause | Fix |
|---|---|---|
TypeError: Failed to fetch with a mixed-content warning |
Frontend served over HTTPS while backend uses HTTP | Host the backend behind HTTPS and update VITE_BACKEND_URL. |
Error: spawn ffmpeg ENOENT |
FFmpeg binary missing | Install FFmpeg and ensure it is on your system PATH. |
sharp/canvas install failures (Windows) |
Native build tools missing | Install Visual Studio Build Tools (C++ workload) and retry npm install. |
Large bundle warning during npm run build |
Feature-rich frontend | Consider enabling code-splitting or lazy-loading if bundle size becomes an issue. |
| Temp folders filling up | Long-running processing jobs | Lower FILE_TTL_MINUTES or run a periodic cleanup job (CleanupService). |
- Fork the repository and create a feature branch.
- Follow the existing service/component patterns.
- Run
npm run lint(and relevant builds) before submitting a pull request.
Bug reports and feature suggestions are welcome via GitHub issues.
Distributed under the MIT License (see package.json).
Built and maintained by Salimuddin. Feel free to reach out for professional support or custom integrations.
npm run dev # Development server with hot reload npm start # Production server
### Frontend Setup
```bash
cd frontend
npm install
npm run dev # Development server with hot reload
npm run build # Production build
Create .env files in both backend and frontend directories:
Backend .env:
NODE_ENV=development
PORT=3001
OPENAI_API_KEY=your_openai_key_here
MAX_FILE_SIZE_GB=500
MAX_BATCH_COUNT=20Frontend .env:
VITE_API_BASE_URL=http://localhost:3001
VITE_MAX_FILE_SIZE=500This project features a completely refactored service architecture with proper naming conventions:
The consolidated image processing service that intelligently selects the optimal library:
import { imageProcessor } from './services/index.js';
// Automatic optimal library selection
const result = await imageProcessor.convertImage('input.jpg', {
format: 'webp',
quality: 85,
width: 1200
});
// Batch processing with concurrency control
const results = await imageProcessor.batchConvert(files, {
format: 'webp',
concurrent: 4
});Event-driven video processing with progress tracking:
import { videoProcessor } from './services/index.js';
// Set up event listeners
videoProcessor.on('progress', (progress) => {
console.log(`Processing: ${progress.percent}%`);
});
// Convert with quality presets
const result = await videoProcessor.convertVideo('input.mp4', {
format: 'webm',
quality: 'high',
width: 1920,
height: 1080
});Advanced GIF creation with scene detection:
import { gifProcessor } from './services/index.js';
// Create optimized GIF from video
const result = await gifProcessor.createFromVideo('input.mp4', {
fps: 15,
width: 500,
duration: 10,
sceneDetection: true
});
// Extract frames with filtering
const frames = await gifProcessor.extractFrames('input.gif', {
sceneThreshold: 0.3,
maxFrames: 50
});Centralized service management with intelligent selection:
import { serviceFactory } from './services/index.js';
// Get optimal service for file type and operation
const service = serviceFactory.getServiceFor('.mp4', 'convert');
const result = await service.convertVideo(inputPath, options);
// Get services by capability
const videoServices = serviceFactory.getServicesByCategory('video');POST /api/convert- Convert image formats (via ConversionRoutes.js)POST /api/convert/batch- Batch image conversionPOST /api/convert/gif-editor- Advanced GIF editingPOST /api/convert/validate- Validate conversion options
POST /api/video/convert- Convert video formats (via VideoRoutes.js)POST /api/split/video- Split videos into segments (via SplitRoutes.js)GET /api/split/video/status/:jobId- Get video processing statusGET /api/split/video/download/:jobId- Download processed video segments
POST /api/convert/gif-advanced- Advanced GIF processingPOST /api/split/gif- Extract frames from GIF (via SplitRoutes.js)GET /api/split/gif/status/:jobId- Get GIF processing statusGET /api/split/gif/download-zip/:jobId- Download extracted frames
POST /api/webp/convert- WebP conversion (via WebpRoutes.js)POST /api/webp/batch- Batch WebP processing
POST /api/text/overlay- Add text overlays (via TextRoutes.js)POST /api/ai/enhance- AI-powered enhancements (via AiRoutes.js)
GET /api/files/:filename- Download processed files (via FileRoutes.js)GET /api/files/list- List available filesDELETE /api/files/cleanup- Clean up temporary filesGET /api/files/download/:id- Download processed filesDELETE /api/files/cleanup- Clean up temporary files
# Backend linting
cd backend
npm run lint # Check code style
npm run lint:fix # Auto-fix style issues
# Frontend linting
cd frontend
npm run lint # Check code style
npm run lint:fix # Auto-fix style issues- ES Modules: All code uses modern ES module syntax
- Async/Await: Promise-based asynchronous operations
- Error Handling: Comprehensive error catching and user-friendly messages
- Documentation: JSDoc comments for all public functions
- Type Safety: Runtime type checking and validation
- Security: Input validation, file type restrictions, path traversal protection
The project uses a centralized ServiceFactory for intelligent service selection:
import { serviceFactory } from './services/index.js';
// Get optimal service for file type and operation
const service = serviceFactory.getServiceFor('.mp4', 'convert');
const result = await service.convertVideo(inputPath, options);
// Get services by capability
const videoServices = serviceFactory.getServicesByCategory('video');This project is fully functional locally with all libraries working. For production deployment:
# Deploy frontend to Vercel
cd frontend
npm run build
vercel --prodRailway deployment was retired on 2025-10-04. Use your preferred Node.js host instead.
Suggested host (Render)
- Connect GitHub repo to Render
- Use Web Service deployment
- Build Command:
cd backend && npm install - Start Command:
cd backend && npm start
✅ All Required Dependencies Included:
- FFmpeg: Included via
ffmpeg-static - Sharp: Native binary compilation handled automatically
- Canvas: Native dependencies auto-installed
- All other libraries: Pure JavaScript, no binary dependencies
Frontend Environment (.env)
VITE_API_BASE_URL=http://localhost:3003
VITE_MAX_FILE_SIZE=500Backend Environment (.env)
NODE_ENV=development
PORT=3003
MAX_FILE_SIZE_GB=500
MAX_BATCH_COUNT=20
OPENAI_API_KEY=your_openai_key_here
CORS_ORIGIN=http://localhost:3001Production Environment (Self-hosted)
NODE_ENV=production
PORT=8080
MAX_FILE_SIZE_GB=500
MAX_BATCH_COUNT=20
OPENAI_API_KEY=your_openai_key_here
CORS_ORIGIN=https://your-frontend-url.vercel.app- Deploy Backend First:
- Push code to GitHub
- Connect to your hosting provider
- Set environment variables
- Get backend URL
-
Deploy Frontend:
- Update
VITE_API_BASE_URLwith backend URL - Deploy to Vercel
- Update CORS_ORIGIN in backend with frontend URL
- Update
-
Test Connection:
- Verify API endpoints work
- Test file uploads/downloads
- Check CORS configuration
- Code Style: Follow the ESLint configuration
- Documentation: Add JSDoc comments for new functions
- Testing: Test all new features thoroughly
- Service Integration: Use the ServiceFactory pattern for new services
- Error Handling: Implement comprehensive error handling
- 🎬 Advanced Video Splitting: Fixed race condition bug, now properly returns video segments
- 🔊 Audio Preservation: Implemented FFmpeg with AAC encoding for perfect audio quality
- 🏷️ Segment Renaming: Click-to-rename functionality for organizing video clips
- 📱 Real-time Preview: Fixed file:// URL handling for instant video segment previews
- 🔒 Local Processing: Complete privacy with no internet dependency
- ⚡ Native Performance: Full Electron integration with IPC communication
- All Backend Libraries Tested: 6/6 libraries working perfectly
- All Frontend Libraries Verified: 8/8 animation libraries functional
- WebP Service Fixed: Implemented Sharp fallback for reliable WebP conversion
- Functionality Tester Added: Full testing interface at
/functionality - Development Environment: Both servers running cleanly on ports 3001/3003
- Service Factory Pattern: Centralized service management implemented
- Error Handling: Comprehensive error catching with user-friendly messages
- Library Fallbacks: Graceful degradation when specific libraries unavailable
- Testing Infrastructure: Automated library validation and browser testing
- Code Quality: ESLint configuration and consistent code standards
This project underwent a comprehensive refactoring with professional naming conventions:
-
Services Renamed: All services now use proper PascalCase with descriptive suffixes
image-processor.js→ImageProcessingService.jsvideo-processor.js→VideoProcessingService.jsgif-processor.js→GifProcessingService.jsaiService.js→AiService.jscleanupService.js→CleanupService.js- And 15+ more services properly renamed
-
Routes Renamed: All route files now clearly indicate their purpose
convert.js→ConversionRoutes.jssplit.js→SplitRoutes.jsvideo.js→VideoRoutes.jsai.js→AiRoutes.jstext.js→TextRoutes.jsfiles.js→FileRoutes.jswebp.js→WebpRoutes.js
-
Utilities Reorganized: Better structure and naming
lib/directory →utils/directoryfile-paths.js→FilePathUtils.jserrorHandler.js→ErrorHandler.jsvalidateFiles.js→FileValidator.js
-
Frontend Components: React components now have clear, descriptive names
AIOConvertMainInterface.jsx→MainConversionInterface.jsxD3ProgressVisualization.jsx→ProgressVisualization.jsxFullPageNavigation.jsx→MainNavigation.jsxKonvaImageEditor.jsx→ImageEditor.jsxSortableFileManager.jsx→FileManager.jsxVideoToGif.jsx→VideoToGifConverter.jsx
- All Import Statements Updated: Every import throughout the entire codebase has been updated
- Path Consistency: All utilities now use consistent
../utils/FilePathUtils.jspaths - Service References: All service imports use the new proper names
- Component References: All React component imports and function names updated
- Professional Naming: All files now follow industry-standard naming conventions
- Better Organization: Clear separation of concerns with descriptive file names
- Improved Maintainability: Much easier to locate and understand code purpose
- Enhanced Readability: Self-documenting file names that explain functionality
- Service Consolidation: Unified processors replace 20+ duplicate services
- Architecture Modernization: ServiceFactory pattern and WorkflowOrchestrator implemented
- Documentation: Comprehensive inline documentation added
- Error Handling: Improved consistency across all services
- Modularity: Clean separation between services, routes, and utilities
This project is licensed under the MIT License - see the LICENSE file for details.
- ARCHITECTURE.md - Detailed technical architecture
- API Documentation - Complete API reference
- Development Guide - Development workflow and guidelines
Built with ❤️ for modern media processing needs
- Automatic scene-based splitting using AI detection
- Progress tracking for long operations
- Batch download of all segments as ZIP
- GIF Frame Extraction:
- Extract all frames from animated GIFs
- Scene-based frame extraction with similarity detection
- Multiple output formats (PNG, JPG, WebP)
- Duplicate frame filtering
- Batch frame downloads
- Real-time Progress Tracking: Monitor conversion progress with detailed status updates
- Job Management: Queue multiple operations with unique job IDs
- Automatic Cleanup: Smart temporary file management
- API-First Design: RESTful API with comprehensive endpoints
- Error Handling: Robust error handling with detailed feedback
- Mobile Responsive: Works seamlessly across all devices
- Runtime: Node.js 22.15.0 with Express.js
- Media Processing:
- ✅ Sharp v0.33.5 - High-performance image processing
- ✅ FFmpeg (fluent-ffmpeg + ffmpeg-static) - Video operations
- ✅ Canvas v3.2.0 - Server-side graphics rendering
- ✅ Jimp v1.6.0 - Pure JavaScript image processing
- ✅ GIF Encoder 2 v1.0.5 - Animated GIF creation
- File Handling: Multer for uploads, Archiver for ZIP creation
- Architecture: EventEmitter-based services for scalable processing
- API: RESTful design with comprehensive error handling
- Framework: React 18 with modern hooks
- Build Tool: Vite 5.4.20 for fast development and optimized builds
- Animation Libraries:
- ✅ GSAP v3.13.0 - High-performance animations
- ✅ Framer Motion v12.23.13 - React animation framework
- ✅ AnimeJS v4.1.3 - Lightweight animation library
- ✅ Lottie Web v5.13.0 - After Effects animations
- ✅ Three.js - 3D graphics and WebGL
- ✅ Konva v10.0.2 - 2D canvas library
- ✅ P5.js v2.0.5 - Creative coding framework
- ✅ D3.js v7.9.0 - Data visualization
- Styling: Modern CSS with responsive design
- UI/UX: Professional interface with progress indicators
- Testing: Jest + Supertest for comprehensive API testing
- Development: Hot reload with Vite dev server
- Code Quality: ESLint configuration for consistent code style
- Environment: Configurable environment variables
- Node.js: Version 18.0.0 or higher
- FFmpeg: Required for video processing (automatically handled by ffmpeg-static)
- RAM: Minimum 4GB recommended for large media files
- Storage: Adequate space for temporary file processing
git clone https://github.com/salimuddin07/GIF-converter.git
cd "GIF converter"# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm installBackend Server:
cd backend
npm run dev✅ Server runs on http://localhost:3003
Frontend Server:
cd frontend
npm run dev✅ Frontend runs on http://localhost:3001
- Main App: http://localhost:3001
- API Documentation: http://localhost:3003
- Functionality Tester: http://localhost:3003/functionality
# Test all backend libraries
cd backend
node library-test.jsExpected Output: ✅ All 6 libraries working!
Create a .env file in the backend directory:
# Server Configuration
PORT=4000
NODE_ENV=development
# File Processing
MAX_FILE_SIZE_GB=500
MAX_BATCH_COUNT=50
TEMP_DIR=./temp
OUTPUT_DIR=./output
# Cleanup Settings
FILE_TTL_MINUTES=60
CLEANUP_INTERVAL_CRON="*/30 * * * *"
# Image Quality
JPEG_QUALITY=85
PNG_COMPRESSION=6
WEBP_QUALITY=80
# Video Processing
FFMPEG_TIMEOUT=300000
VIDEO_QUALITY_PRESET=mediumPOST /api/convert
Content-Type: multipart/form-data
files: <image files>
targetFormat: png|jpg|jpeg|gif|webp|bmp
quality: 1-100 (optional)
singleGif: true|false (optional)
gif.frameDelay: <milliseconds> (optional)
gif.loop: <number> (optional, 0 = infinite)Response:
{
"results": [
{
"originalName": "image1.png",
"convertedName": "converted_1234567890.jpg",
"url": "/api/files/converted_1234567890.jpg",
"sizeBytes": 245760,
"mimeType": "image/jpeg",
"dimensions": { "width": 1920, "height": 1080 }
}
]
}POST /api/video/to-gif
Content-Type: multipart/form-data
video: <video file>
startTime: <seconds> (optional)
endTime: <seconds> (optional)
fps: <frames per second> (optional)
quality: low|medium|high|custom (optional)
width: <pixels> (optional)
height: <pixels> (optional)POST /api/split/video
Content-Type: multipart/form-data
video: <video file>
splitBy: manual|scenes
segments: [{"start": 0, "end": 30}, {"start": 30, "end": 60}] (for manual)
sceneThreshold: 0.1-1.0 (for scene detection)
maxSegments: <number>
outputFormat: mp4|avi|webm|mov
quality: low|medium|high|customPOST /api/split/gif
Content-Type: multipart/form-data
image: <gif file>
outputFormat: png|jpg|jpeg|webp
splitBy: frames|scenes
quality: 1-100
resize: <width>x<height> (optional)
skipDuplicates: true|false
maxFrames: <number>GET /api/split/video/status/{jobId}
GET /api/split/gif/status/{jobId}Response:
{
"success": true,
"jobId": "uuid-string",
"status": "processing|completed|failed",
"progress": {
"totalSegments": 10,
"completedSegments": 7,
"percentage": 70
},
"result": { /* job results */ },
"error": null
}GET /api/split/video/download/{jobId}/{filename} # Individual file
GET /api/split/video/download-all/{jobId} # ZIP archive
GET /api/split/gif/download/{jobId}/{filename} # Individual frame
GET /api/split/gif/download-zip/{jobId} # ZIP archivePOST /api/split/video/cancel/{jobId}
POST /api/split/gif/cancel/{jobId}GET /api/files/{filename}GET /healthcd backend
npm testcd frontend
npm test# Convert image
curl -X POST http://localhost:4000/api/convert \
-F "files=@image.png" \
-F "targetFormat=jpg" \
-F "quality=85"
# Split video by scenes
curl -X POST http://localhost:4000/api/split/video \
-F "video=@video.mp4" \
-F "splitBy=scenes" \
-F "sceneThreshold=0.3" \
-F "outputFormat=mp4"# Build frontend
cd frontend
npm run build
# Start production server
cd ../backend
npm start# Dockerfile example
FROM node:18-alpine
# Install FFmpeg
RUN apk add --no-cache ffmpeg
# Copy and install dependencies
WORKDIR /app
COPY package*.json ./
RUN npm install --production
# Copy source code
COPY . .
EXPOSE 4000
CMD ["npm", "start"]- File Type Validation: Strict MIME type checking
- File Size Limits: Configurable upload size restrictions
- Input Sanitization: Comprehensive input validation
- Temporary File Cleanup: Automatic cleanup prevents disk overflow
- Error Handling: Detailed errors without exposing internal structure
- CORS Configuration: Proper cross-origin resource sharing setup
- Streaming Processing: Large files processed in streams
- Memory Management: Efficient memory usage for large operations
- Concurrent Processing: Multiple jobs handled simultaneously
- Caching Strategy: Smart caching for frequently accessed files
- Progress Tracking: Real-time progress updates for long operations
- Audio file processing (MP3, WAV, FLAC)
- PDF to image conversion
- Advanced image filters and effects
- Bulk operations API
- Smart image upscaling
- Automatic image enhancement
- Content-aware cropping
- Background removal
- Cloud storage integration (AWS S3, Google Drive)
- CDN integration for faster delivery
- User accounts and history
- API rate limiting and authentication
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow existing code style and conventions
- Add tests for new features
- Update documentation for API changes
- Ensure all tests pass before submitting PR
This project is licensed under the MIT License - see the LICENSE file for details.
Salimuddin is a passionate Full-Stack Developer and Media Processing Expert with extensive experience in building scalable web applications and media processing solutions.
- 🐙 GitHub: salimuddin07
- 💼 LinkedIn: salimuddin-shaikh
- 📸 Instagram: @salimuddin_shaikh_786
✅ Project Status: DUAL-MODE PLATFORM FULLY OPERATIONAL
🚀 Last Updated: October 25, 2025
Built with ❤️ by Salimuddin
Professional Media Processing with Desktop & Web Applications
🟢 Desktop App: Native Electron with local processing
🟢 Web App: React SPA with cloud processing
🟢 Backend: 6/6 Libraries Working
🟢 Frontend: 8/8 Libraries Working
🟢 Video Splitting: Advanced with audio preservation & renaming
🟢 Testing: Functionality tester available