Skip to content

Latest commit

 

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compactor Logo

Compactor

Private Media Compressor, PDF Studio & File Converter

⚡ Open Live Web Application »

React 19 TypeScript Vite FFmpeg WASM Tests MIT License


🔒 100% Client-Side Privacy Architecture

Compactor is built on a privacy-first, zero-server-upload architecture. Every video compression, PDF edit, audio transcode, image optimization, and format conversion happens directly inside your browser using client-side WebAssembly and HTML5 processing engines.

  • Zero Server Uploads — Files, videos, and documents never leave your local device.
  • Offline & Sandbox Ready — Executes locally inside browser sandboxes without reliance on backend APIs.
  • High-Performance Multithreading — Utilises WebAssembly SharedArrayBuffer with COOP/COEP headers for hardware-accelerated parallel encoding.

✨ Feature Suites

🎬 Video Suite

  • Target Size Clamping — Preset compressor for Discord (≤10 MB), WhatsApp (≤16 MB), TikTok (≤70 MB), and Instagram (≤95 MB) with 2-pass size bounds.
  • Video to Audio — Extract high-bitrate MP3, AAC, or WAV audio tracks.
  • Video to GIF — Convert video clips into smooth 24/15/10 FPS animated GIFs.
  • Mute Video — Strip audio channels instantly with zero re-encoding loss.

📄 PDF Tools & Markdown Workspace

  • Markdown Workspace — Rich GFM editor workspace with a syntax toolbar, live split preview, templates (GitHub README, Tech Spec, Meeting Notes), and preview-matched local PDF export.
  • PDF Annotate & Edit — Add text, signatures, highlights, and custom shapes directly onto PDF pages.
  • Document Scan Filters — Smart Magic Color, Whiteboard Clean, B&W Binary Thresholding, and Vibrant Diagram filters.
  • Page Organizer — Drag-and-drop page reordering, rotation, extraction, and deletion.
  • Merge PDF & Split PDF — Combine multiple PDFs into one, or extract specific page ranges.
  • Crop Margins — Interactive trim percentage control for clean printable layouts.
  • Document Stamps & Sign Document — Add vector approval stamps (APPROVED, CONFIDENTIAL, FINAL DRAFT) or a signature.
  • Security — AES-128/256 password encryption and password removal.
  • PDF to Word conversion modes — Preserve images, columns, tables, and page formatting visually, or create editable DOCX/TXT text with private OCR for scanned pages.

🖼️ Image Optimizer

  • Multi-format lossy and lossless compression (PNG, JPG, WebP, GIF, AVIF).
  • Multi-color raster-to-SVG vectorization with color quantization, layered edge tracing, line fitting, and quadratic spline fitting.
  • Aspect ratio cropping (1:1, 16:9, 4:3, 9:16), rotation, horizontal/vertical flipping.
  • Interactive pixelation censorship brush for obscuring sensitive document regions.

🎵 Audio Suite & Converter

  • Compress Audio — High-efficiency WASM audio compressor with trim range timeline & waveform previews.
  • Audio Joiner — Merge & concatenate multiple audio tracks into a single seamless audio file.
  • Key & BPM Finder — 100% in-browser Web Audio API detection of tempo (BPM), musical key & Camelot wheel code.
  • Pitch & Speed Changer — Transpose key pitch (-12 to +12 semitones) & adjust playback tempo (0.5× to 2.0×).
  • Verified File Converter — Strict engine-backed conversions for PDF, DOCX, text, data, common raster images, SVG, audio, and video. Word-to-PDF renders the visual DOCX pages instead of rebuilding plain text. Compatible mixed files can run as a sequential bulk queue with shared-target filtering, per-file progress, retry, and Download All; unsupported pairs are disabled rather than fabricated.
  • Metadata Editor — Inspect and edit EXIF, ID3, and PDF tags directly in-browser.
  • Poster Maker — Multi-page printable wall poster grid generator.

🛠️ Technology Stack & Architecture

Layer Technology
Core React 19, TypeScript 5, Vite 8
Styling & UI TailwindCSS v4, Base UI, Custom Glassmorphism Design Tokens
Icons Lucide React
Processing Engines @ffmpeg/ffmpeg (WASM), @ffmpeg/util, pdf-lib, pdfjs-dist, docx, mammoth, Tesseract.js OCR, ImageTracerJS, HTML5 Canvas 2D
Testing Vitest + Testing Library + JSDOM (62 tests, 16 test files)
Deployment Vercel with COOP/COEP security headers & immutable asset caching

Module Architecture

Recent PDF improvements include reliable high-resolution annotation export, permanent rasterized redaction, preview-matched Markdown PDF export, a responsive Markdown workspace, and one-click bulk downloads for generated PDFs and PDF page images.

src/
├── pages/
│   ├── Dashboard/          # Modular dashboard (ToolCard, IllustrationBanner, data, types)
│   ├── VideoCompressor/
│   ├── PdfTools/
│   ├── AudioTools/
│   ├── ImageTools/
│   └── ...
├── utils/
│   └── ffmpeg/             # Modular FFmpeg WASM layer
│       ├── core.ts         # Worker init & lifecycle
│       ├── video.ts        # Compression, GIF, mute, audio extraction
│       ├── audio.ts        # Audio processing
│       └── index.ts        # Re-exports
└── components/
    ├── Common/             # Footer, ToolHeader, FileUploader, TrimTimeline
    └── ui/                 # Design system primitives

🚀 Quick Start & Development

For short copy-paste update checks and GitHub dependency notifications, see MAINTENANCE.md.

# 1. Clone repository
git clone https://github.com/kuberbassi/compactor.git
cd compactor

# 2. Install dependencies
npm install

# 3. Start development server
npm run dev

# 4. Run Vitest test suite
npm run test

# 5. Verify FFmpeg compressors & diagnostics
npm run check:compressors

# 6. Build for production
npm run build

📲 Progressive Web App (PWA)

Compactor is configured as a standalone Web App. It can be installed directly onto iOS, Android, or desktop devices with standalone app window support and quick shortcuts.


👤 Author & License

Designed & Developed with ❤️ by Kuber Bassi.

License: MIT

Contributions are welcome. Read CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md before opening a pull request or security report.

Used by

Contributors

Languages