# K-Convert

A privacy-first file converter that runs entirely in your browser using WebAssembly. No uploads, no servers—your files never leave your device.

## Features

- **100% Client-Side** — All conversions happen locally using WASM
- **Image Conversion** — JPEG, PNG, WebP, GIF, BMP, TIFF, HEIC, ICO, AVIF, JXL, SVG, PSD, RAW, TGA
- **Audio Conversion** — MP3, WAV, OGG, M4A, FLAC, AAC, AIFF, ALAC, WMA, Opus, M4R, AMR
- **Drag & Drop** — Simple file upload with batch support
- **Progress Tracking** — Real-time conversion progress
- **Dark Mode** — Beautiful dark theme enabled by default

## Tech Stack

- **Frontend:** React + TypeScript + Vite
- **UI:** Shadcn UI + Tailwind CSS
- **Image Processing:** [ImageMagick WASM](https://github.com/dlemstra/magick-wasm)
- **Audio Processing:** [FFmpeg WASM](https://github.com/nicholasrobinson/ffmpegwasm/ffmpeg.wasm)
- **HEIC Support:** [heic2any](https://github.com/nicholasrobinson/heic2any)

## Getting Started

```bash
# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build
```

## Architecture

The app uses a Worker-Broker model for efficient processing:

```
Main Thread (UI) ←→ ConversionBroker ←→ Web Workers (WASM)
```

- **Image Worker** — Handles all image conversions via ImageMagick WASM
- **Audio Worker** — Handles all audio conversions via FFmpeg WASM
- **Adapters** — Clean abstractions for each conversion type

## Browser Requirements

Requires a modern browser with:
- WebAssembly support
- Web Workers
- SharedArrayBuffer (for FFmpeg)

## License

MIT License - see [LICENSE](LICENSE) for details.
