Website review
This review may include AI-generated content and is not individually verified. Domain, certificate and other facts come from the observed data on this page.
What is Mockend?
Mockend is a tool that turns a single configuration file in a GitHub repository into a hosted fake REST and GraphQL API. You commit a mockend.yml file describing your models, and Mockend generates realistic data and live endpoints you can call immediately — no backend to build, deploy, or maintain.
Who it's for and what it solves
It's aimed at frontend developers, prototypers, and anyone writing docs or demos who needs an API to talk to before the real one exists. Instead of hardcoding JSON or standing up a stub server, you describe your data once and get working endpoints that behave like a real backend.
What you get
- Generated data — pick from many random generators (names, emails, images, addresses) or supply your own JSON.
- REST and GraphQL — every model gets CRUD routes with filtering, pagination, and sorting, plus a GraphQL endpoint with an explorer.
- Relations — declare
hasManyandbelongsToand query nested resources. - Optional privacy — protect an API with a key.
- Immutable by default — writes are accepted but not persisted, so tests and demos always start from the same dataset.
- Lives in your repo — the API is versioned with your code, reviewed in pull requests, and branches get their own API.
Trade-offs to weigh
The immutable-by-default design is a strength for demos and tests but means it isn't a real datastore — you can't rely on saved state. It also only reads your config file, not your application code, so it won't infer your schema automatically. Pricing is flat per account with a 14-day free trial billed through GitHub, so the decision is mostly about whether the convenience of a repo-native mock outweighs building your own stub.
A practical next step
If you're building a frontend before the backend exists, try the two-step flow: commit a mockend.yml with one model (say, User with 50 generated records), then hit mockend.com/api/{owner}/{repo}/users/1. If the response shape matches what you expect, expand it with relations and a GraphQL query. Compare it against alternatives like Mockoon for local-only mocking or Stoplight if you need design-first API specs alongside the mock.
How do I set up Mockend with a mockend.yml file in my GitHub repository?
Commit a mockend.yml file to the root of a GitHub repository, then install the Mockend GitHub App on that repository. Mockend reads the config file and hosts an API at mockend.com/api/{owner}/{repo} with REST and GraphQL endpoints for each model you declare. There is no server to run and nothing to install locally.
Minimal working file
key: SECRET_KEY # optional: makes the API private
models:
User:
fake: # use the built-in generators
_count: 50 # generate 50 users
name: fullName
online: bool
picture: { imageUrl: [48, 48] }
data: # or supply your own records
- { name: 'Alice' }
hasMany: [Post, Comment]
Two things are happening here. fake tells Mockend to generate records from one-line generator names, while data lets you paste exact JSON you want returned. hasMany and belongsTo declare relationships so nested resources behave like a real backend.
What you get once it is live
- CRUD routes per model. Create, read, update and delete at the same paths a real backend would use, e.g.
/users/1. - Filters, pagination and sorting on list endpoints, plus a GraphQL endpoint with an explorer.
- Writes accepted but not persisted. Every request starts from the same dataset, so demos, docs and tests do not need a reset step.
- A private mode. Setting
keyhides the API behind a key instead of leaving it open. - Branch awareness. Because the API is a file, branches get their own API version and changes go through pull requests.
A practical scenario
Suppose you are building a frontend before the real backend exists. You commit the file above, install the app, and point your dev environment at mockend.com/api/your-org/your-repo. Your components fetch /users, /users/1 and nested /users/1/posts exactly as they will in production. When the real API arrives, you swap the base URL and the response shapes already match. A separate team maintaining public documentation can use a second repository with its own config, so the demo data never mixes with development data.
Decision criteria before you commit
- Do you need persistence across requests? If yes, Mockend is the wrong tool by design; its immutability is a feature for demos and tests, not a database.
- Do you need auth beyond a single key? The
keyfield protects the API from the open internet, but it is not a user-level permission system. Plan for that if your prototype needs per-user data. - Is the config file acceptable in your repo? It is versioned and reviewed like code, which some teams like and others consider noise in pull requests.
- Which account type? The page describes flat per-account pricing with a 14-day free trial and billing handled through GitHub; check the current terms on Mockend before committing a team to it.
Next step
Start with one model and one relationship, confirm the response shape in your app, then expand the config. The live demo on the site lets you try requests against a real generated API before you write your own file.
How does Mockend handle data persistence and resetting between tests or demos?
Mockend is built so you don't have to reset anything: writes are accepted but never persisted. Every request starts from the same generated dataset, which is the behavior you want for demos, docs and tests.
What happens to writes
According to Mockend's own description, create, read, update and delete requests behave like a real backend, but the changes don't survive. A POST or PATCH returns a plausible response, then the next request sees the original data again. That means:
- A demo can be run repeatedly in front of an audience without drifting into a half-edited state.
- A test suite that creates a record in one test won't leak that record into the next.
- You don't need teardown hooks, database snapshots or a reset endpoint between runs.
Where the "starting state" comes from
The dataset is defined by the mockend.yml file committed to your repository. You declare models, counts and field generators (for example _count: 50 for 50 users), or paste your own JSON. Because that file is versioned with the code, the baseline data is reproducible: the same commit produces the same shape of API, and a branch gets its own API.
Practical consequences and trade-offs
| Need | How Mockend fits |
|---|---|
| Stable fixtures for tests | Strong fit — no persistence means no cross-test pollution |
| Multi-step flows (create, then read it back) | Workable within a single request/response, but state won't carry across calls |
| Testing your own persistence logic | Not the tool — use a real or ephemeral database |
| Keeping an API hidden | Optional key in the config secures it |
The main limitation follows directly from the design: if your feature depends on state surviving between calls — a cart that accumulates items, a workflow that advances through stages — a non-persisting mock won't exercise that path. Pair it with a stateful stub or a real test database for those cases.
A useful next step: install the GitHub App on a scratch repository, commit a small mockend.yml with one model, and run the same POST twice. Seeing the second response ignore the first is the quickest way to confirm whether immutable-by-default matches how your tests are written.
What are the pricing plans and free trial options for Mockend?
Mockend uses a single flat plan rather than tiers, with a 14-day free trial. According to the page, the paid option is Pro for personal accounts at $29/month, billed through GitHub, cancellable anytime from GitHub. It includes unlimited APIs and features, private APIs, and email support. A "Teams" entry appears in the footer, but the page does not list a Teams price or its included features, so treat that as unconfirmed.
The trial is the practical starting point: it gives you 14 days to test whether a repo-file API fits your workflow. Billing runs through GitHub, so you manage or cancel it from your GitHub account rather than a separate vendor dashboard.
What the flat price covers
Because pricing is per account rather than per API or per user, cost stays predictable as you add mock APIs or share them with teammates. That favors teams running many small mock services over those needing just one. If you only need a single throwaway API for a short prototype, the trial may be enough on its own.
How to decide
- Prototype or frontend-only work: start with the free trial, then decide.
- Many APIs or shared team use: the flat per-account price tends to make more sense.
- Need private APIs and support: these are listed under Pro, not the trial.
- Evaluating alternatives: compare against a general-purpose mock tool such as Postman if you already use it for API testing.
A sensible next step is to install the GitHub App, commit a mockend.yml to a test repository, and confirm the generated REST and GraphQL endpoints behave as your frontend expects before the trial ends.
Can Mockend generate related data across models, and how do I query nested resources?
Yes. Mockend supports relations between models. You declare them in the same mockend.yml file where the models are defined, and the hosted API exposes nested resources accordingly.
How relations are declared
In the config, a model can list hasMany (and the counterpart belongsTo) with the related model names. For example, a User model with hasMany: [Post, Comment] tells Mockend that users own posts and comments. Once that is committed, the generated REST and GraphQL endpoints can return those related records without you writing any backend code.
How to query nested resources
Because the API is generated per model, you query the parent resource and then the child resource under it. In REST terms, that means a URL shaped like mockend.com/api/{owner}/{repo}/users/1/posts, where users/1 identifies the parent and posts selects the related collection. The same relations are available through the GraphQL endpoint, where you can request nested fields in a single query instead of making several REST calls.
A practical example: a frontend developer building a user profile page can fetch one user and their posts in a single GraphQL request, rather than fetching the user and then looping over IDs. For a demo or documentation site, nested REST routes are often easier because each URL is self-explanatory.
Practical trade-offs
- GraphQL is better when a screen needs data from several related models at once; it avoids over-fetching and multiple round trips.
- REST nested routes are simpler to cache, link to and explain in docs, but can require more requests for deeply nested data.
- Writes are accepted but not persisted, so related data you create during a session will not survive; this is useful for repeatable tests and demos, but not for stateful workflows.
Next step
Decide which model is the parent in your most common screen, declare the hasMany/belongsTo pair for it, and test both a nested REST URL and an equivalent GraphQL query. If you want to see the shape before committing anything, the live demo on Mockend lets you try requests against a real generated API.
How can I secure a Mockend API with a key and ensure my code remains private?
Secure a Mockend API by adding a key value to your mockend.yml file. Mockend reads only that config file, not your application code, so your source stays private while the hosted API is gated behind the key. The config excerpt on the site shows this directly: key : SECRET_KEY is described as the way to secure the API, and the page states Mockend "only reads your config file, never your code."
H3 Practical setup
- Add a
keyline tomockend.ymlin your GitHub repository. - Commit it, and Mockend provisions the API at
mockend.com/api/{owner}/{repo}. - Call the API with the key attached (for example as a header or query parameter, per Mockend's docs), so unauthenticated callers cannot reach the data.
H3 What stays private — and what does not
| Item | Visibility |
|---|---|
| Your application source code | Not read by Mockend; remains private |
The mockend.yml config file |
Lives in the repo, so it follows the repo's visibility |
| Generated API endpoints | Public unless a key is set |
| Write operations | Accepted but never persisted, so nothing accumulates |
A key point: putting the key in mockend.yml means it is committed to the repository. If the repo is public, the key is publicly visible and offers little protection. For a genuinely private API, either keep the repo private or treat the config key as a demo gate rather than a secret. If you need to share the API with a small group, rotate the key by editing the file and committing again.
H3 A concrete scenario
A frontend developer building a dashboard commits mockend.yml with User and Post models and a key. The front-end code calls the API with that key, so the mock data is not exposed to anyone browsing the deployed demo. If the repo is public, the developer keeps the repo private instead, or accepts that the key is visible and relies on the API being immutable and disposable.
For the exact header or parameter format and any limits, check Mockend's own documentation at Mockend.
User reviews (0)