Product Introduction
Definition: Mockphine is a local-first, desktop-based mock API server and service virtualization tool designed for macOS and Windows. It functions as a programmable proxy layer between frontends and backends, allowing developers and QA engineers to intercept, simulate, and manipulate REST API traffic during the development and testing cycles.
Core Value Proposition: Mockphine exists to eliminate development bottlenecks caused by unstable, slow, or incomplete backend services. By providing deterministic API control and explicit request visibility, it ensures local API reliability. It bridges the gap between frontend development and backend availability, enabling teams to simulate complex integration scenarios, validate error-handling logic, and maintain high delivery velocity even when staging environments are down.
Main Features
Deterministic Request Matching: Mockphine utilizes an advanced matching engine that goes beyond simple URL string comparison. It supports path normalization, exact parameter matching, and wildcard path patterns (e.g., using
:param). Users can configure matching based on HTTP methods, query string keys and values (None, Exact, or Contains), and specific request bodies. This ensure that shared behavior does not drift and that the correct mock response is triggered every time.Controlled Passthrough and Hybrid Routing: Unlike traditional mock servers that are either "all-on" or "all-off," Mockphine offers per-endpoint routing modes: Mock, Passthrough, or Disabled. The "fallback passthrough" capability allows unmatched requests to be routed to a real upstream server, while "strict 404" mode ensures no accidental traffic leaks to production or staging. This hybrid approach allows teams to mock only the specific endpoints currently under development or causing issues.
Live View with Served-By Evidence: The Live View provides a real-time stream of all incoming requests and outgoing responses. Critically, it includes "served-by" metadata, which explicitly identifies whether a response originated from a local mock, a successful upstream passthrough, a strict-fail 404, or a passthrough error. This visibility eliminates guesswork during debugging by providing concrete evidence of the response source, duration, headers, and status codes.
Resilience and Failure Simulation: Mockphine allows users to inject intentional faults into the API lifecycle. This includes millisecond-level delay simulation to test UI loading states and timeout logic, as well as failure-rate simulation (e.g., a 10% failure rate) to test application resilience. Users can define custom failure payloads and specific status codes to replicate edge cases that are difficult to trigger in a live backend.
OpenAPI Integration and Workspace Portability: To accelerate setup, Mockphine supports the import and export of OpenAPI specifications and workspace JSON files. Teams can package common API patterns into reusable "collection packs," ensuring that all developers and QA testers are working against the same deterministic mock definitions.
Problems Solved
Pain Point: API Uncertainty and Backend Flakiness: In modern microservices architectures, staging environments are frequently unstable, leading to "API uncertainty." Frontend teams often lose hours of productivity when a backend service changes unexpectedly or goes offline. Mockphine solves this by providing a stable local-first environment where the API behavior is entirely under the user's control.
Target Audience:
- Frontend Developers: (React, Vue, Angular, Mobile) who need to build UI components against endpoints that do not yet exist or are currently broken.
- QA Engineers: Who require repeatable, deterministic environments to execute test cases without the noise of changing staging data.
- Full-Stack Engineers: Looking to isolate the frontend from the backend to debug integration bugs faster.
- B2B SaaS and Fintech Teams: Who deal with complex API dependencies and strict compliance/failure-handling requirements.
Use Cases:
- Building UI for Unfinished Features: Creating mock endpoints based on technical specs before the backend code is written.
- Resilience Testing: Simulating 500 Internal Server Errors or high latency to ensure the frontend displays graceful error states or loading indicators.
- Offline Development: Continuing work on the plane or in areas with poor connectivity by mocking the entire API stack.
- Bug Reproduction: Sharing a Mockphine workspace JSON with a teammate so they can reproduce a specific API-related bug locally.
Unique Advantages
Differentiation: Compared to Postman Mock Servers, which are cloud-centric and often disconnected from the local network layer, Mockphine is a local-first desktop application with zero subscription overhead for the base version. Unlike Mock Service Worker (MSW), which requires injecting code into the application bundle, Mockphine acts as a true network-level proxy, making it technology-agnostic (working for web, mobile, and CLI tools alike).
Key Innovation: Served-By Source Transparency: Most mocking tools leave users wondering why a specific response was returned. Mockphine’s "Served-By" evidence is a unique diagnostic feature that logs the exact logic used to fulfill a request. This removes the "black box" nature of API mocking and provides a definitive audit trail for local network traffic.
Frequently Asked Questions (FAQ)
How does Mockphine handle unmatched API requests? Mockphine provides two primary server fallback modes: Strict and Fallback. In "Strict" mode, any request that doesn't match a defined mock rule returns a 404 error, preventing accidental live traffic. In "Fallback" mode, unmatched requests are passed through to a configured upstream backend URL, allowing for a hybrid environment where only specific endpoints are mocked.
Can I use Mockphine for mobile app development? Yes. Because Mockphine runs as a local API server on your macOS or Windows machine, you can point your iOS or Android emulator/simulator or physical device to the machine's IP address. It intercepts traffic at the network level, making it compatible with any client that can make HTTP requests.
What is the difference between the Free and Paid versions? The Mockphine Free tier is fully functional but limited to 1 local server and 10 active endpoints per server. The Paid (Standard and Personal) licenses remove these limits and allow for unlimited servers and endpoints, tailored for professional developers and teams managing complex microservice architectures.
Does Mockphine support OpenAPI/Swagger imports? Yes, Mockphine allows you to import OpenAPI specifications to bootstrap your mock environment quickly. This ensures that your mock paths, methods, and response structures align with your official API documentation from the start.
