Unblock frontend work when the API is not ready
Frontend and backend usually move in parallel. In practice the UI is often done while the API is still changing or offline. That is when a lightweight API mock helps.
The API contract is not finalized — how do you write frontend logic?
Approach:
Agree on a basic data shape, then create a mock at
/api/user/profile
with the JSON you expect. Your
fetch
or
axios
calls can start immediately. Switch the base URL when the real API ships.
How do you test error states?
Approach: Real backends rarely emit 500 or 403 on demand. Create a mock that returns 500 and check that the page shows a clear “server busy” message.
What this tool does
- Runs in the browser : Mock config stays in localStorage. Nothing is uploaded.
-
Dynamic variables
:
{{uuid}}for unique ids,{{random:1-100}}for random numbers. - Postman export : Export every mock as a Postman collection for the rest of the team.
Placeholders
Use these in the response body or headers:
-
{{uuid}}: random UUID -
{{timestamp}}: current timestamp -
{{date}}: current date string -
{{random:min-max}}: random integer in that range