DEV Community

💻 Arpad Kish 💻
💻 Arpad Kish 💻

Posted on

The Un-Framework: Pure TypeScript with @greeneyesai/api-utils

In a Node.js ecosystem saturated with "magic" frameworks that rely heavily on decorators, metadata reflection, and complex dependency injection containers (looking at you, NestJS), @greeneyesai/api-utils stands out by doing less, not more.

Built by Arpad Kish, this library appears to reject the "Angular-ification" of the backend. Instead of hiding logic behind @Route or @Controller annotations, it favors a "No Decorators" philosophy—prioritizing explicit code, predictable execution, and a transparent runtime.

The Core Philosophy: Explicit is Better Than Implicit

The defining characteristic of this library is what it lacks:

  • No Decorators: There are no @Get() or @Post() annotations hiding the routing logic. Routes are likely defined explicitly, making it instantly obvious which handler owns which endpoint.
  • No "Bluffing" Magic: Many frameworks use "magic" runtimes that auto-wire dependencies in ways that are hard to debug. This utility package likely forces you to wire your application explicitly. If a service is needed, you pass it. If a route exists, you declare it.
  • Predictable Runtime: By avoiding heavy reflection metadata, the runtime behavior corresponds 1:1 with the written code. This eliminates the "how did this variable get here?" confusion common in heavy IoC frameworks.

Real-World Implementation

Looking at the Stock-Price-Checker again with this lens, the architecture becomes clearer as a "Pure TypeScript" application:

  • Transparent Flow: Without decorators intercepting calls, the request flow is linear. A developer can trace a request from entry point to handler without needing to understand a hidden framework lifecycle.
  • Standard TypeScript Patterns: The code relies on standard language features (functions, classes, interfaces) rather than framework-specific meta-programming. This reduces the learning curve—if you know TypeScript, you know how this works.

Who is this for?

This approach appeals to a specific tier of senior developers who:

  1. Distrust "Magic": Developers who have been burned by hard-to-debug decorator logic.
  2. Value Traceability: Teams that want to be able to "Follow Definition" in their IDE and actually land on the code that executes, rather than a framework abstraction.
  3. Prefer Control: By stripping away the "bluffing" runtime layers, the developer regains full control over the execution context, error handling, and performance characteristics (including managing blocking/non-blocking operations explicitly).

Conclusion

@greeneyesai/api-utils is likely less of a "framework" and more of a foundational toolkit. It provides the necessary plumbing (logging, database wrappers, API structure) without forcing a heavy, opinionated abstraction layer on top of your logic. For teams that want the structure of an enterprise app but the transparency of a vanilla script, this is a strong contender.

@greeneyesai/api-utils on npm

Top comments (2)

Collapse
 
sleewoo profile image
Slee Woo •

Exactly right said about redundancy of decorators and similar stuff!

For me, even controllers seems redundant, recalling about RoR era, in a good sense :)

KoaJS minimalism turned to be perfectly enough for my API needs.

But creating routes manually was so tedious and Vite plugins so impresivelly powerfull that i did not resist and wrapped a plugin to scan api/ folder for index files and build the router automatically.

2 years later, shared the effort on github - github.com/kosmojs/kosmo

Sorry for shameless plug in, just curious how would api-utils approach would compare to KoaJS minimalism.

Collapse
 
rpi1337 profile image
💻 Arpad Kish 💻 • • Edited

No functions, singletons instead, compositions and IoC; koa was good, but OOP is unbeatable in large codebases (+testing). And “auto discovery” can cause a lot of issues like priviledge escalations. Remix much better.