MockBase Gives Frontends a Shared API to Push Against
A hosted mock server for conditional responses, stateful data, failure testing, and live request inspection.
- Written by
- SpacerrApps
- Reviewed by
- Spacerr Team
- Published
- Reading time
- 4 min read
A frontend can be mostly ready while the API it depends on is still being designed. That leaves developers with a choice between hard-coded fixtures and waiting for a backend that may not yet return realistic data. Both options make it harder to test loading states, retries, validation errors, and the awkward responses that appear in production.
MockBase is a hosted mock API server intended to fill that gap. It gives you a real HTTPS endpoint, then lets you define how that endpoint responds. The useful distinction is that it is not limited to returning one static JSON document. A route can select different responses based on request details, maintain data between calls, or fail deliberately.
A shared endpoint instead of local fixtures
The basic use case is straightforward. Create a mock, add routes, and point a frontend or another client at the resulting endpoint. Because the endpoint is hosted, the same mock can be reached by a teammate, a phone, or a CI job. There is no local server for somebody else to install or keep running.
Routes can inspect query parameters, headers, a path within a JSON request body, a GraphQL operation name, or an element in a SOAP envelope. That makes the response conditional on what the client actually sends. A single route can therefore represent several states of an API rather than forcing the frontend to use a separate fixture for each case.
Responses can be JSON, raw XML or SOAP, or a binary file with its own content type. Sandboxed Jinja2 templates can echo request data, create a UUID, or add a timestamp. These details matter when a frontend expects identifiers or response fields to change from one request to the next.
Stateful CRUD is another step beyond static mocking. With it enabled, data created by a POST can be returned by a later GET. The developer describes this as requiring no code, which should make it useful for testing flows such as creating a record and then rendering it in a list.
Failure behaviour is part of the mock
Many mock servers are most useful while everything works. MockBase is aimed at the less tidy cases too. A route can be configured to return selected failures, including a delayed gateway timeout, a truncated response, an empty successful response, or a connection reset before the body arrives.
The service also supports weighted chaos scenarios, so failures do not have to happen on every call. Separate rate limit simulation can make a predictable request return a 429 with a Retry-After header. That combination covers two different tests: whether an application survives an unpredictable backend, and whether its backoff code reacts at the expected point.
Routes can also add delay, while callouts let the mock contact another endpoint after responding. That is relevant to clients that receive asynchronous callbacks, although it also adds configuration work. A developer needs to decide not only what the mock returns, but which timing and failure pattern the test is meant to reproduce.
The request inspector shows the exchange
The live request inspector is the feature that ties the service together. A WebSocket stream shows incoming calls with the method, path, status, headers, request body, response body, latency, and client IP. This gives developers a way to see what a frontend sent without adding temporary logging to the application.
The dashboard can send a request with custom headers and copy that request as code for several languages and clients, including cURL, fetch, axios, Python requests, Go, PHP, Ruby, Java, C#, and PowerShell. Authorization headers, cookies, and mock tokens are described as being redacted before logging.
That makes MockBase more than a response generator. It can also act as an integration debugging surface. If the frontend sends the wrong header or body shape, the request is visible alongside the response the mock selected.
Importing an existing API shape
MockBase supports importing an OpenAPI 3.x document from pasted text, a file, or a URL. It can also export a mock back to OpenAPI, with schemas inferred from examples. A record and replay mode can proxy unmatched requests to a real API, capture them, and turn those captures into routes.
There are script-oriented options as well. The landing page describes a personal API key for pushing and pulling JSON configuration with a dependency-free CLI, plus an MCP server for managing mocks and inspecting traffic from an AI client. These features make the service more suitable for a checked-in test setup than a dashboard-only tool, assuming the team is comfortable managing configuration that way.
Who should use it
MockBase is built for developers and teams that need a shared API while building a frontend, testing stateful CRUD, modelling failures, or inspecting live integration traffic. Its strongest fit is a hosted workflow where several clients need to reach the same endpoint without running local infrastructure.
It is not a general replacement for every kind of protocol simulator. The service does not parse WSDL and does not support gRPC, according to its own description. It also assumes that putting the mock on a hosted web service is acceptable. Teams that need an entirely offline mock, or connection-level control on one machine, should look elsewhere. For everyone else, MockBase solves a specific problem well: giving unfinished software a configurable, observable API to push against before the real backend is ready.
Mock API server with a live request inspector