Introducing FileMock: A Client-Side Solution for Generating Test Files in Your Browser
In the fast-paced world of software development, testing file uploads and processing often requires a variety of sample filesโvideos, images, PDFs, and more. Creating or sourcing these test files can be time-consuming and sometimes raises privacy concerns, especially when relying on external servers or cloud storage. Addressing this challenge, I am excited to share the development of FileMock, a browser-based tool designed to generate a wide range of functional test files instantly, right within your browser.
What is FileMock?
FileMock is a web application that enables developers to generate diverse test files without any downloads, server interactions, or data exposure. By leveraging modern web technologies, it provides a seamless, privacy-focused experience for creating:
- Videos that play smoothly (MP4, MOV, AVI)
- Images embedded with EXIF metadata (including camera info, GPS coordinates, camera settings)
- PDFs containing realistic content
- Audio files, documents, and archives
- Files with precise size specifications to match testing requirements
Key Features:
- Pure Client-Side Processing: All rendering and file creation happen within your browser, ensuring maximum privacy and zero server costs.
- Comprehensive Format Support: Generate various media types to cover common testing scenarios.
- Exact Size Control: Fine-tune file sizes to meet specific testing constraints.
- Rich Metadata Embedding: Include realistic EXIF data in images, such as camera details and geolocation.
Technical Foundations:
Underpinning FileMock are several cutting-edge technologies:
- Next.js 15 & TypeScript: Building a robust and maintainable architecture.
- FFmpeg.wasm: Handling video encoding and processing entirely in the browser.
- Canvas API & Custom Binary Implementations: Facilitating image and file format creation, including embedding metadata.
- Client-Side Focus: Ensuring data privacy and eliminating server hosting costs.
Development Motivation:
The idea for FileMock originated from the frustration of repeatedly searching for suitable test files during development. I recognized a common pain point shared by many developers: the inefficiency and privacy concerns of sourcing external test data. This tool aims to streamline testing workflows by providing instant, customizable test files directly in the browser.
Results and Community Impact (After One Month):
Since its launch, FileMock has attracted over 800 active users, primarily developers seeking quick and reliable test data. The project continues