Skip to content

Repository files navigation

Morphix

Morphix

Convert everything — right in your browser.

Images · Video · Audio · Documents · Spreadsheets · Data · Archives

Go ffmpeg Docker formats conversions


Morphix is a self-hosted file converter with a drag-and-drop web UI. Drop a file (or paste a link), pick a target format, download the result — 48 input formats, 332 conversion paths. The engine is a single Go binary that uses ffmpeg for media. Nothing is stored: files are wiped seconds after conversion.

✨ Features

  • 🗂️ Batch — queue many files, convert all, download all, live per-file progress
  • 🔗 URL upload — paste a link and the server fetches it (private networks blocked)
  • 🎚️ Fine control — quality slider (JPG / WebP / AVIF) and pixel-exact resize
  • 🎬 Real media engine — MKV → MP4, anything → MP3, palette-optimized GIFs from video
  • 📄 Documents that survive — Markdown ↔ HTML tables, DOCX / PPTX / EPUB / PDF text
  • 🔒 Private — no accounts, no tracking, files wiped after each job
  • 🛡️ Production-ready — per-IP rate limiting, obfuscated frontend, SEO + social previews

🔄 What it converts

Category In Out
Images png, jpg, gif, bmp, tiff, webp, avif, heic png, jpg, gif, bmp, tiff, webp, avif, ico, pdf
Video mp4, webm, mkv, avi, mov, m4v, wmv, flv, mts, 3gp, mpg mp4, webm, mkv, avi, mov, gif + audio
Audio mp3, wav, flac, ogg, opus, m4a, aac, wma, aiff, amr mp3, wav, flac, ogg, opus, m4a, aac
Documents md, html, txt, pdf, docx, pptx, epub html, md, txt, pdf
Data json, yaml, toml, xml, csv, tsv, xlsx each other + html / md tables
Archives zip, tar, tar.gz, 7z, rar zip, tar, tar.gz

Media conversions appear automatically when ffmpeg is on the PATH.

🏗️ How it works

flowchart LR
  U["Browser<br/>drag &amp; drop / paste URL"] -->|"POST /api/convert"| B["Go backend"]
  B --> M["ffmpeg<br/>audio · video"]
  B --> G["Go libraries<br/>images · docs · data · archives"]
  B -->|"converted file"| U
Loading

The browser only ever holds an obfuscated shell — every conversion happens server-side in native code.

📁 Project structure

morphix/
├── backend/            Go server + conversion engine
│   ├── main.go         HTTP server, routing, SEO, rate limiting
│   ├── images.go       image formats + resize
│   ├── media.go        audio / video (ffmpeg)
│   ├── docs.go         markdown / html / pdf / txt
│   ├── office.go       docx / pptx / epub
│   ├── data.go         json / yaml / toml / xml / csv / xlsx
│   ├── archives.go     zip / tar / 7z / rar
│   ├── fetch.go        URL upload (SSRF-guarded)
│   ├── ratelimit.go    per-IP rate limiting
│   └── ogimage.go      social preview image generator
├── frontend/           Web UI
│   ├── static/         HTML · CSS · JS · icons · social image
│   ├── build.mjs       obfuscation + devtools-guard build
│   └── weblib/         disable-devtool
├── Dockerfile          builds frontend + backend + ffmpeg
├── docker-compose.yml  app + Cloudflare Tunnel
├── render.yaml         one-click Render deploy
└── DEPLOY.md           full deploy guide

🚀 Run locally

Requirements: Go 1.26+, Node 18+, and ffmpeg on your PATH.

# 1) build the frontend
cd frontend
npm install
npm run build              # -> frontend/dist (obfuscated production build)

# 2) run the backend
cd ../backend
go run . -dir ../frontend/dist

Open http://localhost:8090.

  • For a readable dev build (no obfuscation): go run . -dir ../frontend/static
  • On Windows, double-click start.bat (dev) or serve-dist.bat (production build)

🐳 Deploy

One command builds the frontend, compiles the Go binary, bundles ffmpeg, and runs it with per-IP rate limiting:

docker compose up -d --build

The same image runs on Render (render.yaml included), Railway, Cloud Run, or any Docker host — PORT is respected automatically. Full walkthrough, including a free Oracle VM behind a Cloudflare Tunnel, is in DEPLOY.md.

🔌 HTTP API

Method Path Purpose
POST /api/convert multipart file, target, optional quality (1–100), width (px)
POST /api/fetch multipart url — server-side download (private networks blocked)
GET /api/formats input extension → available targets
GET /api/health engine status

🔐 Notes

  • The deployed frontend is an obfuscated build with a devtools guard — a deterrent against casual copying, not a substitute for real security. All logic and secrets stay in the backend.
  • Rate limits and job concurrency are tunable via flags: -rate, -burst, -maxjobs.

About

Self-hosted file converter (images, video, audio, docs, data, archives) with a Go + ffmpeg backend. A hardened web app: obfuscated frontend, devtools protection, Cloudflare reverse proxy, origin lockdown, per-IP rate limiting, SSRF protection, and invisible Turnstile bot protection.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages