<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mock Bolt</title>
    <description>The latest articles on DEV Community by Mock Bolt (@mockbolt02).</description>
    <link>https://dev.to/mockbolt02</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3870355%2F4e796547-aeed-4baa-9a79-0decf5eb0d20.png</url>
      <title>DEV Community: Mock Bolt</title>
      <link>https://dev.to/mockbolt02</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mockbolt02"/>
    <language>en</language>
    <item>
      <title>I was tired of json-server — so I built a free mock API tool (no signup needed)</title>
      <dc:creator>Mock Bolt</dc:creator>
      <pubDate>Sat, 11 Apr 2026 06:21:45 +0000</pubDate>
      <link>https://dev.to/mockbolt02/i-was-tired-of-json-server-so-i-built-a-free-mock-api-tool-no-signup-needed-fkn</link>
      <guid>https://dev.to/mockbolt02/i-was-tired-of-json-server-so-i-built-a-free-mock-api-tool-no-signup-needed-fkn</guid>
      <description>&lt;p&gt;Every frontend project I start hits the same wall.&lt;/p&gt;

&lt;p&gt;I have a UI to build. I know what the API responses should look like. But the backend isn't ready yet.&lt;/p&gt;

&lt;p&gt;So I spend 15–20 minutes doing the same setup ritual:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; json-server
&lt;span class="c"&gt;# create db.json&lt;/span&gt;
&lt;span class="c"&gt;# configure routes&lt;/span&gt;
&lt;span class="c"&gt;# run json-server --watch db.json --port 3001&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's the &lt;em&gt;fast&lt;/em&gt; version. If I need CORS headers, custom status codes, or simulated delay, it gets longer.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;MockBolt&lt;/strong&gt; to remove that setup time entirely.&lt;/p&gt;




&lt;h2&gt;
  
  
  What MockBolt does
&lt;/h2&gt;

&lt;p&gt;Paste JSON → click Generate → get a live public API URL.&lt;/p&gt;

&lt;p&gt;That's it. No npm install. No terminal tab. No local port.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://mockbolt.com/b/7f3d2c1a-9b8e-4f5a-b6d0-3e2c1f4a8b7d
&lt;span class="c"&gt;# returns your JSON immediately&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The endpoint:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Supports all HTTP methods (GET, POST, PUT, PATCH, DELETE)&lt;/li&gt;
&lt;li&gt;Returns your JSON with the right status code&lt;/li&gt;
&lt;li&gt;Has open CORS — works from any browser origin&lt;/li&gt;
&lt;li&gt;Accepts custom response headers&lt;/li&gt;
&lt;li&gt;Can simulate latency up to 10 seconds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each mock gives you two URLs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Public URL&lt;/strong&gt; — share this with your frontend or teammates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Management URL&lt;/strong&gt; — keep this private; edit payload, status code, methods, and delay anytime&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No account. No email. No credit card. Free for 24 hours.&lt;/p&gt;




&lt;h2&gt;
  
  
  A real example
&lt;/h2&gt;

&lt;p&gt;Say I'm building a frontend that needs a &lt;code&gt;/users&lt;/code&gt; endpoint but the backend isn't ready. In MockBolt:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Paste this JSON:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"users"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Alice"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"admin"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Bob"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"viewer"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"total"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; Select GET, click &lt;strong&gt;Generate Endpoint&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; Get a URL like &lt;code&gt;https://mockbolt.com/b/e8bdb0ce-8ed9-44a8-adcc-b0af6a054443&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt; Hit it immediately:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://mockbolt.com/b/e8bdb0ce-8ed9-44a8-adcc-b0af6a054443
&lt;span class="c"&gt;# {"users":[{"id":1,"name":"Alice","role":"admin"},{"id":2,"name":"Bob","role":"viewer"}],"total":2}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Done in under 30 seconds.&lt;/p&gt;




&lt;h2&gt;
  
  
  Testing error states and slow responses
&lt;/h2&gt;

&lt;p&gt;MockBolt lets you set any status code from 100 to 599 and add a response delay.&lt;/p&gt;

&lt;p&gt;Want to test how your app handles a &lt;code&gt;503 Service Unavailable&lt;/code&gt;? Set the status code, generate the endpoint, point your error-state tests at it.&lt;/p&gt;

&lt;p&gt;Want to test loading spinners and skeleton screens? Set a 2000ms delay.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;copy-as-code&lt;/strong&gt; panel also generates ready-to-run snippets in curl, fetch, axios, and Python requests — paste directly into your test file.&lt;/p&gt;




&lt;h2&gt;
  
  
  How I built it
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Stack:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Backend: FastAPI (Python) + PostgreSQL&lt;/li&gt;
&lt;li&gt;Frontend: React + TypeScript + Vite + Tailwind CSS&lt;/li&gt;
&lt;li&gt;Deployed on AWS Lightsail behind Cloudflare&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A few interesting decisions along the way:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rate limiting behind Cloudflare&lt;/strong&gt; — &lt;code&gt;slowapi&lt;/code&gt; needs to read &lt;code&gt;CF-Connecting-IP&lt;/code&gt; instead of &lt;code&gt;request.client.host&lt;/code&gt; (which returns the Docker bridge IP behind Nginx). Took a couple of iterations to get this right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hit count accuracy&lt;/strong&gt; — early on the counter was off because Cloudflare was caching GET responses. Fixed it with aggressive cache-busting headers: &lt;code&gt;Cache-Control: no-cache, no-store, must-revalidate, max-age=0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Anonymous management&lt;/strong&gt; — instead of accounts, each mock gets a UUID secret token as the only credential. Tradeoff: if you lose the management URL you can't recover it. But it removes signup friction entirely and means zero user data to protect.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's next on the roadmap
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OpenAPI/Swagger import&lt;/strong&gt; — paste a spec, get mock endpoints for every path automatically&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;URL prefill&lt;/strong&gt; — &lt;code&gt;mockbolt.com/?template=auth&lt;/code&gt; so blog posts can link to a live editable example&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple endpoints&lt;/strong&gt; — one mock ID that serves different JSON per path (e.g. &lt;code&gt;/users&lt;/code&gt; and &lt;code&gt;/products&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://mockbolt.com" rel="noopener noreferrer"&gt;mockbolt.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Free, requires zero setup, works from any browser or terminal.&lt;/p&gt;

&lt;p&gt;Would love your feedback — especially on:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is the public URL + secret management URL flow clear on first use?&lt;/li&gt;
&lt;li&gt;What would make this a daily tool for you vs. a one-off utility?&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;Solo project, built over a few weekends. Happy to answer questions about the stack or any of the design decisions.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>python</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
