DEV Community

Cover image for My journey creating mockfast.io - a free API mocking tool
Eric Tron
Eric Tron

Posted on

1

My journey creating mockfast.io - a free API mocking tool

I was working on some solo projects last year, and I kept getting so frustrated. Why? Because I always had to create fake API responses for testing my frontend before the backend was ready. Copy-pasting JSON everywhere, maintaining local files, constantly updating them...

Seriously, I was spending more time managing fake data than actually coding!

My "aha" moment

One day, after my test data got completely out of sync with what I was building, I thought "OK, that's enough". I knew there were some tools to create fake APIs, but nothing was exactly what I needed:

  • json-server? Good but local only
  • Postman mock? Cool but limited in free version
  • Hardcode data? Please no
  • Big paid services? Too expensive for small projects

So I started building my own solution on nights and weekends. I wanted to create something that would help other developers like me. That's how mockfast.io was born - a 100% free cloud service to create API mocks with realistic data.

How it works (simple version)

You just need to:

1) Define what data you want:

{
  "name": "string.name.fullname", 
  "email": "email",
  "age": "number",
  "isActive": "boolean" 
}
Enter fullscreen mode Exit fullscreen mode

2) Choose HTTP method (GET, POST, PUT, DELETE)

3) Configure some options if you want (delay, errors, etc)

And boom! You get a real URL that returns your fake data, like:

https://mockfast.io/backend/apitemplate/get/abc123
Enter fullscreen mode Exit fullscreen mode

When you call it, you get nice random data that matches your template:

{
  "name": "Marie Johnson",
  "email": "marie.j88@example.com",
  "age": 32,
  "isActive": true
}
Enter fullscreen mode Exit fullscreen mode

The fake data library i'm building

One thing I'm really proud of is my custom library for generating fake data. I'm actually building my own version of faker.js but with some tweaks I personally needed.

Right now there are more than 50 data types, like:

  • Full names, first names, last names
  • Emails (general or specific like gmail, proton, etc)
  • Addresses with streets, cities, postcodes
  • Colors in different formats (hex, rgb, hsl)
  • Country data with names, capitals, currencies
  • And more!

If you have ideas for data types you need, tell me! I'm adding new ones all the time based on what people ask for. Last week someone asked for more specific product data, so that's on my list now.

How I use it everyday

Now this tool has become essential for my workflow:

  1. When building new frontend features

    I create a mock API with the structure I plan to implement on the backend later

  2. For trying out new UI ideas

    No more setting up a whole backend just to test if a UI concept works!

  3. When testing edge cases

    Need to test with a super long text? Or with missing data? Or with an API timeout? Just configure the mock how you want.

  4. For quick prototypes

    When I have a new idea, I can create a working prototype in hours instead of days

I've shared it with some developer friends and they're using it too. It's really satisfying to see something I built to solve my own problem help other devs!

Some technical details (for the curious)

The service is built with Node.js and has a React frontend. The data generation happens on the server, and everything is cached for speed. I've designed it to be as simple as possible - I hate overcomplicated tools.

I'm currently working on adding:

  • More data types (especially for specific industries)
  • Conditional responses
  • Mock GraphQL APIs (this is tricky but coming soon)
  • Response templates (save your favorite configurations)

Why it's 100% free?

People ask me this a lot. Honestly, I built mockfast.io to solve my own problems first, but I also wanted to give something back to the dev community. I've benefited from so many free tools and open source projects, this is my way of contributing.

My costs for running it are reasonable for now, and I'd rather see it help as many developers as possible than make a few bucks. It makes me happy when I get messages from people saying it saved them time or made their work easier.

Maybe someday I'll add a "pro" version with advanced features if the hosting costs become too much, but the core functionality will stay free.

Try it & give feedback!

If you're constantly blocked waiting for APIs like I was, give mockfast.io a try. It takes about 30 seconds to create your first mock API.

I'd love to hear what you think. What works? What doesn't? What's missing? I'm just one developer trying to make a useful tool, and your feedback really helps me improve it.

And hey, if you find a bug, please let me know! I fix them fast :)

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more