<?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: Mateusz B</title>
    <description>The latest articles on DEV Community by Mateusz B (@mateusz_b).</description>
    <link>https://dev.to/mateusz_b</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%2F3812766%2Fb38a9080-327d-4fb0-8085-1407a8c23fc9.jpg</url>
      <title>DEV Community: Mateusz B</title>
      <link>https://dev.to/mateusz_b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mateusz_b"/>
    <language>en</language>
    <item>
      <title>Stop Wasting Time on Backends – Mock like a Pro in Angular 21 with ngx-api-mimic 🚀 #showdev</title>
      <dc:creator>Mateusz B</dc:creator>
      <pubDate>Mon, 09 Mar 2026 08:00:00 +0000</pubDate>
      <link>https://dev.to/mateusz_b/stop-wasting-time-on-backends-mock-like-a-pro-in-angular-21-with-ngx-api-mimic-showdev-3lj5</link>
      <guid>https://dev.to/mateusz_b/stop-wasting-time-on-backends-mock-like-a-pro-in-angular-21-with-ngx-api-mimic-showdev-3lj5</guid>
      <description>&lt;p&gt;We’ve all been there: you’re building a recruitment task, a polished portfolio project, or a quick demo, and you spend 40% of your time setting up a mock Express server or hardcoding JSON files that don't persist anything.&lt;/p&gt;

&lt;p&gt;When you move to production, you often have to rewrite half of your data-fetching logic. &lt;strong&gt;There’s a better way.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m excited to share &lt;strong&gt;ngx-api-mimic&lt;/strong&gt; – a library designed for &lt;strong&gt;Angular 21&lt;/strong&gt; that brings the power and structure of NestJS directly into your frontend HTTP Interceptor.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is ngx-api-mimic?
&lt;/h2&gt;

&lt;p&gt;It’s a high-fidelity mocking engine that lives inside your Angular app. Instead of just returning static objects, it allows you to build a functional "in-browser backend" using familiar patterns like Controllers, Guards, and Pipes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why you’ll love it:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NestJS-inspired Architecture:&lt;/strong&gt; If you know NestJS, you already know how to use this. Use &lt;code&gt;@Controller()&lt;/code&gt;, &lt;code&gt;@Get()&lt;/code&gt;, &lt;code&gt;@Post()&lt;/code&gt;, and &lt;code&gt;@Body()&lt;/code&gt; to define your API logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type-Safe Data Mocking:&lt;/strong&gt; Generate realistic data based on your TypeScript interfaces. Thanks to advanced schema support, your IDE provides full autocompletion, so you never guess your field names.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Persistence:&lt;/strong&gt; It comes with built-in &lt;code&gt;LocalStorage&lt;/code&gt; support. If you "POST" a new user, they will actually be there after a page refresh. Perfect for CRUD demos!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built for Angular 21:&lt;/strong&gt; Fully compatible with the latest framework features, including the new signal-based reactivity and Vitest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seamless Migration:&lt;/strong&gt; When the real backend is ready, just delete the interceptor. Your data services remain untouched because they were calling "real" HTTP endpoints all along.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🤖 The AI Edge: Built for the Agentic Era
&lt;/h2&gt;

&lt;p&gt;We are living in the age of AI-assisted coding. Whether you use &lt;strong&gt;Cursor, GitHub Copilot, or specialized AI Agents, ngx-api-mimic&lt;/strong&gt; is ready.&lt;/p&gt;

&lt;p&gt;I’ve optimized the library’s documentation and internal metadata specifically for &lt;strong&gt;Large Language Models (LLMs)&lt;/strong&gt; and &lt;strong&gt;AI search crawlers&lt;/strong&gt; by adopting the &lt;code&gt;llms.txt&lt;/code&gt; standard and integrating extensive JSON-LD structured data. This means:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;AI Agents can "read" your mock API structure more accurately.&lt;/li&gt;
&lt;li&gt;Generating new controllers via LLMs is seamless because the library follows predictable, standard patterns.&lt;/li&gt;
&lt;li&gt;Your AI tools will understand how to help you build features faster because the library provides the right context out of the box.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Quick Look at the Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Controller&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;users&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;UsingSchema&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;users&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;UserInterface&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Intelligent data generation!&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserMockController&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Get&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="nf"&gt;getUsers&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Logic here...&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/:id&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nf"&gt;getUser&lt;/span&gt;&lt;span class="p"&gt;(@&lt;/span&gt;&lt;span class="nd"&gt;UrlParam&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Return user by ID...&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Post&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;UseGuards&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;AuthGuard&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Simulate real security logic&lt;/span&gt;
  &lt;span class="nf"&gt;createUser&lt;/span&gt;&lt;span class="p"&gt;(@&lt;/span&gt;&lt;span class="nd"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;UserDto&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Automatically persists to LocalStorage!&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Perfect for:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;✅ Recruitment Tasks:&lt;/strong&gt; Show off your architectural skills by implementing a full API logic without an external server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;✅ Portfolio Apps:&lt;/strong&gt; Host your app on GitHub Pages or Vercel with a fully working, stateful "backend".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;✅ Rapid Prototyping:&lt;/strong&gt; Build the frontend and define the API contract before the backend team even starts their first sprint.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Check it out!
&lt;/h2&gt;

&lt;p&gt;If you find this useful, I’d love a star on GitHub! ⭐&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🌐 Docs:&lt;/strong&gt; &lt;a href="https://ngx-api-mimic.mateuszbilicz.pl/" rel="noopener noreferrer"&gt;https://ngx-api-mimic.mateuszbilicz.pl/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;💻 GitHub:&lt;/strong&gt; &lt;a href="https://github.com/mateuszbilicz/ngx-api-mimic" rel="noopener noreferrer"&gt;ngx-api-mimic&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📦 NPM:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/ngx-api-mimic" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/ngx-api-mimic&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⭐ Proudly listed in Awesome Angular!&lt;/p&gt;

&lt;p&gt;What are your biggest pain points when mocking APIs in Angular? Let's chat in the comments! 👇&lt;/p&gt;

</description>
      <category>angular</category>
      <category>typescript</category>
      <category>webdev</category>
      <category>nestjs</category>
    </item>
  </channel>
</rss>
