Skip to content

Repository files navigation

FileSwitch

A modern, user-friendly file conversion tool that supports multiple formats including images, documents, audio, and video files. Now fully deployable on Vercel with serverless functions!

Features

  • Multi-format Support: Convert between images (PNG, JPG, WebP, GIF, etc.), documents (PDF, TXT), audio (MP3, WAV), and video formats
  • Drag & Drop Interface: Easy-to-use interface with drag and drop functionality
  • Real-time Progress: Track conversion progress with live updates
  • Batch Processing: Convert multiple files at once
  • Client-side Processing: Image conversions happen locally for privacy and speed
  • Modern UI: Clean, responsive design built with React and Tailwind CSS
  • Serverless Architecture: Fully deployable on Vercel with serverless functions

Tech Stack

  • Frontend: React, Vite, Tailwind CSS, Radix UI
  • Backend: Node.js Serverless Functions (Vercel)
  • File Processing: Client-side Canvas API for images, server simulation for other formats
  • Deployment: Vercel (Full Stack)

Quick Start

Prerequisites

  • Node.js 18+
  • Yarn or npm

Installation

  1. Clone the repository:
git clone <repository-url>
cd fileswitch
  1. Install dependencies:
# Frontend dependencies
cd frontend
yarn install

# API dependencies
cd ../api
npm install
  1. Start the development servers:

Frontend:

cd frontend
yarn dev
  1. Open http://localhost:3000 in your browser

Deployment

One-Click Vercel Deployment

Deploy with Vercel

Manual Deployment

  1. Using the deployment script:
./deploy.sh
  1. Manual steps:
# Install Vercel CLI
npm install -g vercel

# Login to Vercel
vercel login

# Deploy
vercel --prod
  1. Environment Variables (Optional):
    • VITE_MAX_FILE_SIZE: Maximum file size in bytes (default: 104857600 = 100MB)

Supported Conversions

Images (Client-side)

  • PNG ↔ JPG ↔ WebP ↔ GIF ↔ BMP
  • Real-time conversion with progress tracking

Documents (Server-side simulation)

  • PDF → PNG/TXT
  • TXT → PDF/HTML

Audio (Server-side simulation)

  • MP3 ↔ WAV ↔ AAC

Video (Server-side simulation)

  • MP4 → PNG (first frame)
  • AVI/MKV/MOV → PNG/GIF

Architecture

Development

  • Frontend: React app running on localhost:3000
  • Backend: Python FastAPI on localhost:8001 (optional)

Production (Vercel)

  • Frontend: Static React build served by Vercel
  • Backend: Node.js serverless functions in /api directory
  • File Storage: Temporary storage in /tmp (Vercel limitation)

File Structure

fileswitch/
├── frontend/          # React frontend
├── api/              # Vercel serverless functions
├── backend/          # Python backend (development only)
├── vercel.json       # Vercel configuration
├── deploy.sh         # Deployment script
└── README.md

Privacy & Security

  • No tracking or analytics
  • Files processed locally (images) or temporarily (other formats)
  • Automatic cleanup of temporary files
  • Open source - audit the code yourself

Browser Support

Chrome 90+, Firefox 88+, Safari 14+, Edge 90+

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test locally with yarn dev
  5. Deploy to Vercel for testing
  6. Submit a pull request

License

MIT License - see LICENSE file for details

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages