Decoy
Decoy: macOS mock server app for easy API & webhook testing. Simplify development with instant local mock servers. No complex setup!
What is Decoy?
What is Decoy?
Decoy is a powerful and intuitive native macOS application designed for developers who need to create and manage local mock servers with ease. It simplifies the process of simulating API endpoints, testing webhook integrations, and debugging network-related code by providing a straightforward, no-setup-required environment. Unlike traditional methods that often involve complex configurations, Docker containers, or cloud-based tunneling services, Decoy offers an instant-on experience directly on your Mac.
Built with modern macOS technologies like SwiftUI and Network.framework, Decoy is optimized for performance and resource efficiency. It launches instantly, consumes minimal memory, and allows for real-time changes to mock responses, ensuring a seamless development workflow. Whether you're building a new application, integrating with third-party services, or testing edge cases like network failures and timeouts, Decoy provides the flexibility and control you need to accelerate your development cycle.
Mock Server Creation Made Easy
- Effortless Mock Server Creation: Define endpoints with custom methods, paths, and group them into projects for better organization.
- Real-time Request Monitoring: View all incoming requests with detailed information, including headers, body, source IP, and timestamps. JSON payloads are automatically formatted for readability.
- Flexible Response Mocking: Configure responses with any HTTP status code, choose from 7 different body types (plain text, JSON, HTML, XML, file, empty, redirect), set custom headers, and simulate latency.
- Parameterized Paths: Support for dynamic paths like
/users/:idto match various request parameters. - Multiple Response Body Types: Easily serve JSON, HTML, XML, plain text, files (images, PDFs), empty responses, or perform redirects.
- Instantaneous Changes: Modifications to endpoints or responses take effect immediately on the next incoming request.
- Request Export: Copy request details as cURL, JavaScript
fetch, or Ruby code snippets for easy debugging and sharing. - Automatic CORS Handling: CORS headers are automatically added, ensuring browser-based requests work seamlessly.
- File Responses: Serve static files directly as responses.
- Native macOS Experience: Built with SwiftUI for a fast, responsive, and memory-efficient application. No Docker, cloud tunnels, or complex configuration files required.
- Project Grouping: Organize endpoints under custom subdomains (e.g.,
api.decoy.my). - Response Snapshots: Review the exact responses that were sent for each request.
- Custom Domains: Use default domains like
decoy.myorlvh.me, or configure your own. - Detailed Request Inspection: Examine headers, body (with hex dump for binary data), source IP, timestamps, and a unique UUID for each request.
- Redirect Support: Easily configure 301, 302, 307, and 308 redirects with automatic
Locationheader handling. - Persistent Storage: Requests are saved to an SQLite database, ensuring no data loss even if the app quits unexpectedly.
How to Use Decoy
Getting started with Decoy is designed to be straightforward:
- Install Decoy: Download and install Decoy from the Mac App Store.
- Create a Project: Launch Decoy and create a new project. You can assign a custom subdomain (e.g.,
myapi) or use the defaultdecoy.mydomain. - Define Endpoints: Add new endpoints within your project. Specify the HTTP method (GET, POST, PUT, DELETE, etc.) and the path (e.g.,
/users,/products/:id). - Configure Responses: For each endpoint, define the desired response. Choose the status code, select the body type (JSON, text, file, etc.), add any necessary headers, and optionally set a delay to simulate network latency.
- Point Your Application: Configure your application, script, or service to send requests to the address provided by Decoy (e.g.,
http://myapi.decoy.my:8998). - Monitor and Debug: As requests come in, Decoy will display them in real-time. You can inspect all details of the incoming request and verify the response that was sent.
- Iterate: Make changes to your endpoint configurations or responses on the fly. Decoy applies these changes instantly, allowing for rapid iteration and debugging.
Use Cases
- API Development & Testing: Simulate backend API responses during frontend development, allowing teams to work in parallel without waiting for backend completion. Test various response scenarios, including error codes and edge cases.
- Webhook Integration Testing: Easily test how your application handles incoming webhooks from third-party services like Stripe, GitHub, or Slack by setting up Decoy to receive and inspect these payloads locally.
- Mobile App Development: Mock network requests for mobile applications to test UI behavior, offline scenarios, and error handling without relying on a live backend.
- Testing Network Resilience: Simulate slow network conditions or timeouts by introducing delays in Decoy's responses, helping to build more robust applications that handle latency gracefully.
- Scraper & Bot Development: Test scrapers or bots that interact with web services by providing predictable responses from a local mock server.
FAQ
-
What are the system requirements for Decoy? Decoy requires macOS 14 Sonoma or later.
-
Is Decoy free? Decoy is a paid application available for purchase on the Mac App Store for €24.99.
-
Do I need Docker or Node.js to use Decoy? No, Decoy is a self-contained native macOS application. It does not require Docker, Node.js, or any other external runtime environments for its core functionality.
-
Can Decoy handle HTTPS requests? Currently, Decoy focuses on HTTP requests. For HTTPS mocking, you would typically need to configure a reverse proxy or use a different toolset.
-
How are requests stored? Incoming requests are saved to a local SQLite database, ensuring that your request history is preserved even if the application is closed unexpectedly.
Alternatives
HTTPie AI
HTTPie AI 2.0 with Chat is an innovative tool designed to enhance the way developers interact with APIs.
AakarDev AI
AakarDev AI is a powerful platform that simplifies the development of AI applications with seamless vector database integration, enabling rapid deployment and scalability.
Arduino VENTUNO Q
Powerful edge AI computer for AI & robotics. Dual-brain architecture for real-time perception, decision-making, and action. Bring AI to the physical world.
Devin
Devin is an AI coding agent and software engineer that helps developers build better software faster.
imgcook
imgcook is an intelligent tool that converts design mockups into high-quality, production-ready code with a single click.
Rork
Rork builds complete, production-ready mobile apps from your description using AI and Expo (React Native).