$ show iib0011/omni-tools
OmniTools is a comprehensive, browser-based utility web application offering over 100 tools for text, CSV, JSON, XML, image, audio, video, PDF, and number manipulation. All processing occurs client-side using WebAssembly (FFmpeg, Ghostscript, Tesseract) and pure JavaScript, ensuring no data leaves the user's device. The application is built with React 18, TypeScript, Material UI, and Vite, and is fully internationalized with 11 languages. It follows a consistent tool architecture: each tool is defined via a `defineTool()` function with metadata, lazy-loaded components, and a uniform UI pattern using `ToolContent` wrapper, reusable input/result components, and dynamic option rendering. The codebase demonstrates strong engineering practices with extensive unit tests (Vitest), end-to-end tests (Playwright), CI/CD pipelines (GitHub Actions, Docker multi-platform builds, Netlify deployment), and a well-organized file structure. While the project is actively maintained and well-crafted, it exhibits some boilerplate duplication across tools and a large dependency surface that could introduce maintenance overhead.
The LLM identified 5 files worth highlighting for reuse:
Core module that defines the `defineTool()` function and `DefinedTool` type. Each tool is registered with metadata (path, icon, keywords, i18n keys, user types) and a lazy-loaded component. This pattern enables consistent tool registration, search indexing, and category grouping. It is self-contained and could be extracted to build a similar multi-tool application with minimal changes.
Generic container component that orchestrates the entire tool UI: input area, options, result, examples, and compute lifecycle. It accepts `initialValues`, `getGroups` (for dynamic options), `compute` function, and custom input/result components. This abstraction eliminates repetitive boilerplate across all tools and demonstrates a clean separation of concerns. It is reusable in any React application needing a similar input-process-output pattern.
Singleton module that manages an FFmpeg WebAssembly instance with a task queue. It ensures sequential execution of FFmpeg commands, handles loading state, and provides a clean `runFFmpeg` async function. This pattern isolates the complexity of WASM loading and concurrency, making it reusable for any browser-based media processing application.
Collection of pure functions for CSV manipulation: `splitCsv` (handles quoted fields, escaped quotes, various line endings), `getCsvHeaders`, and `csvToJson`. These functions are well-tested, handle edge cases (empty lines, inconsistent quoting), and are independent of the rest of the codebase. They can be extracted and used in any JavaScript project requiring robust CSV parsing.
Implements custom PNG compression using palette quantization (median cut algorithm) and Floyd-Steinberg dithering, all in pure JavaScript. It handles PNG chunk generation (IHDR, PLTE, IDAT with zlib deflate) and CRC calculation. This is a non-trivial, self-contained implementation of a complex image processing algorithm that could be reused in any browser-based image tool without external dependencies.