It all started with a simple thought experiment while I was building the backend architecture for my project.
I was working as a solo full-stack developer, but I couldn't help but think: "If I were working with a frontend team right now, they would be sitting idle, waiting for me to finish the APIs." I started looking for tools that would allow frontend developers to move forward without waiting for the backend. What I wanted was simple: a tool that required no backend coding and didn't exhaust me with complex configuration files. The existing tools were either too bloated or required too much setup boilerplate.
And that's how the idea for nullmock was born.
Why "Zero-Dependency"?
My spiritual mentor in programming, Tayfun Erbilen (the person whose videos taught me how to code), recently suffered an npm supply chain attack. That incident made me seriously reconsider things. Whenever we install a tool, we are secretly downloading hundreds of unknown dependencies behind the scenes. I wanted to minimize the developer paranoia of "Is there something malicious hiding inside the package I'm about to download?"
Because of this, I built Nullmock with absolutely zero external dependencies, relying purely on native Node.js power. It is a secure sandbox you can install and run with complete peace of mind.
What Does Nullmock Do?
Instead of writing complex route files, Nullmock uses the folder-based routing logic we all know and love from frameworks like Next.js.
For example, just create a file named mocks/api/users/[id]/GET.json. The server instantly recognizes this route. Furthermore, writing static JSON is boring, so I added "magic strings" for smart data generation:
{
"id": "{{uuid}}",
"name": "{{firstName:en}} {{lastName:en}}",
"age": "{{number:18-65}}"
}
When you write this, Nullmock autonomously generates dynamic, localized (i18n supported) data for you on every request. If you want to test network latency on the frontend, simply append ?_delay=2000 to your URL, or ?_status=500 to simulate server errors.
Just the Tip of the Iceberg
What I've explained here is just a brief summary of what the engine can do. Nullmock doesn't leave you with a blank slate. When you visit the repository, you'll see that it comes out-of-the-box with industry-standard architectural examples and ready-to-use boilerplate that you can directly integrate into your workflow.
If you are tired of complex setups, a node_modules black hole full of security risks, and just want to spin up a dynamic API in seconds, give Nullmock a try.
You can check out the repo, explore the architecture, and drop a star to support the project here:
👉 https://github.com/modoldern/nullmock
Top comments (0)