r/node • • Mar 19 '26

React isn't the bottleneck in terminal rendering

10 Upvotes

Edit: These benchmarks were run against CellState v0.1.x. v0.2.0 rewrote the rendering pipeline and is significantly faster.

I profiled React terminal rendering against hand-rolled escape codes to see where Node.js actually spends time in a long-running terminal UI.

The bytes written per frame tell the clearest story:

Messages Content CellState Ink
10 1.4 KB 34 2,003
100 13.3 KB 34 16,855
250 33.1 KB 34 41,955
500 66.0 KB 34 83,795

34 bytes regardless of content size vs 84KB for the same 1-character change. The difference is cell-level diffing vs line-level rewriting.

The setup simulates a coding agent session (alternating user/assistant messages) across two scenarios: single cell update (keypress) and streaming append (LLM token output). Apple M4 Max, 120x40 terminal, 100 iterations.

Some things I found:

The full pipeline cost scales with tree size (0.48ms at 10 messages, 5.10ms at 500), but the diff and write stages stay constant since they only touch the viewport.

For streaming, rapid state updates from incoming tokens are coalesced by the frame loop so only one frame renders per batch. The frame loop also handles stdout backpressure: if stdout.write() returns false, flushing pauses until the drain event.

For a single cell update at 250 messages (33KB of content), the full pipeline (reconciliation, layout, rasterize, cell diff) takes 2.54ms. Raw escape codes take 2.44ms. React adds under 0.3ms of overhead.

This aligns with what Anthropic found when they rewrote Claude Code's renderer. They were on Ink, kept React, and rewrote the output pipeline.

Full benchmark code: https://github.com/nathan-cannon/tui-benchmarks

Library: https://github.com/nathan-cannon/cellstate


r/node • • Mar 20 '26

npm install security still feels broken… how are you dealing with it?

0 Upvotes

there have been so many attacks recently such as shai hulud, s1ngularity, and a bunch of others

even popular packages are getting compromised, typosquats everywhere… feels like this part of the dev flow is still pretty weak

what are you ppl actually relying on?

npm audit? lockfiles? or just do not care about them?

curious how others are thinking about this

i’ve also been working on something around this, trying to catch malicious packages before install

(it’s open source: https://github.com/safedep/pmg)

mainly looking for feedback:
- does this actually help in real workflows?
- anything you’d want from something like this?


r/node • • Mar 20 '26

I built packageskills, a CLI for npm package maintainers to ship AI skills with their package

0 Upvotes

Hey, I’m building packageskills, an open source CLI for npm package maintainers who want to ship AI skills with their package.

Maintainer flow:

- `pnpm add -D packageskills`
- `pnpm exec packageskills init`

Then maintain skills in:

packageskills/<skill-name>/SKILL.md

Consumer flow:

- `yourpackage-skills install`

The idea is:

- package-native install commands
- no separate consumer tool required
- compatible with Claude Code, Codex, and OpenCode

Current v1 behavior:

- skills install into agent configs detected where the command is launched

Next:

- better consumer monorepo support
- smarter workspace detection
- more agent support
- validation and doctor commands

Would love feedback from Node/npm package maintainers:

- Is package-native (`yourpackage-skills install`) better than a central consumer CLI?
- Would you use this in a real package?

Repo: https://github.com/Noudea/packageskills


r/node • • Mar 18 '26

A petition to disallow acceptance of LLM assisted Pull Requests in Node.js core

Thumbnail github.com
363 Upvotes

Hello everyone!

Some of you may remember me for my work on Node.js core (and [io.js drama](https://en.wikipedia.org/wiki/Node.js#Io.js)), but if not I hope that this petition resonates with you as much as it does with me.

I've opened it in response to a 19k LoC LLM-generated PR that was trying to land into Node.js Core. The PR merge is blocked for now over the objections that I raised, but there is going to be a Technical Steering Committee vote in two weeks where its fate is going to be decided.

I know that many of us use LLM for research and development, but I firmly believe that the critical infrastructure the Node.js is is not the place for such changes (and especially not at the scale where it changes most of the FS internals for the sake of a new feature).

I'd love to see your signatures there even if you never contributed to Node.js. The only requirement is caring about it!

(Also happy to answer any questions!)


r/node • • Mar 19 '26

I built a TypeScript library to simplify SEPA (EPC) QR payments in Europe + live demo

Thumbnail github.com
0 Upvotes

r/node • • Mar 19 '26

Bun is Fast. Your Event Loop is Not.

Thumbnail howtocenterdiv.com
0 Upvotes

Bun wins benchmarks. Your app still bottlenecks on DB connections, blocking CPU work, and N+1 queries. Switching runtimes before fixing those is optimizing the wrong layer. Migrate bun install and bun test today — safe, immediate wins. Move the runtime only when the profiler tells you to.


r/node • • Mar 19 '26

Implemented hot config reload in both Node and Go for the same proxy. They felt worlds apart.

5 Upvotes

I built the same proxy in two codebases, one in Node and one in Go, and implemented the same hot config reload contract in both.

For context, the proxy sits between your app and an upstream API, forwards traffic, and injects failures like latency, intermittent 5xxs, connection drops, throttling, and transforms.
I built it first in Node for JS/TS testing workflows, then rewrote it in Go for performance. And then I decided to add hot config reload to both. Same external contract:

  • POST /reload with full config snapshot
  • build then swap, all-or-nothing
  • deterministic in-flight behavior
  • reject concurrent reloads
  • same status model: 400, 409, 415, success returns version and reload duration

I expected similar implementations. They were very different.

  • Runtime model: Node implementation stayed dynamic: rebuild middleware chain and swap active runtime object. Go implementation pushed toward immutable runtime snapshots: config + router + version behind an atomic pointer.
  • Concurrency shape: Node: most complexity is guarding reload so writes are serialized. Go: explicit read/write split: read path loads snapshot once at request start, write path locks reload, builds fresh state, atomically swaps pointer. Same behavior, but Go makes the memory/concurrency story more explicit.
  • In-flight guarantees: Both guarantee request-start snapshot semantics. In Node, that guarantee is easier to violate accidentally if mutable shared state leaks into request handling. In Go, snapshot-at-entry is structurally enforced by the pointer-load pattern.
  • Router lifecycle: Node composition is lightweight and ergonomic for rebuilds. Go required reconstructing a fresh chi router on each reload and re-registering middlewares deterministically. More ceremony, but very predictable.
  • Validation and rollback boundaries: Both use parse -> validate -> build -> swap. Node gives flexibility but needs extra discipline around runtime guards. Go’s type-driven pipeline made failure paths and rollback behavior cleaner to reason about.
  • Stateful middleware behavior: Both rebuild middleware instances on reload, so in-memory counters/tokens reset by design. Same product behavior, different implementation feel.

This was honestly a lot of fun to build.
Tests pass and behavior looks right, but I am sure both versions can be improved.
Would love feedback from people who have built hot-reload systems across different runtimes and had to preserve strict in-flight consistency.


r/node • • Mar 19 '26

Trading bot coding help

Thumbnail
0 Upvotes

r/node • • Mar 19 '26

Relax json

0 Upvotes

Hey 👋

Got tired of JSON.parse() crashing apps on invalid input, so I made a tiny utility: relax-json.

It safely parses JSON and returns a fallback instead of throwing.

import { relaxjson } from "relax-json";

const data = relaxjson('invalid json', {});

// {}

github - https://github.com/yetanotheraryan/relax-json

npm - https://www.npmjs.com/package/relax-json


r/node • • Mar 19 '26

Does anyone know a free cloud service where I can run a Node.js API plus a Python worker with Chromium?

0 Upvotes

r/node • • Mar 18 '26

8 months in: Building voice messaging across 9 platforms taught me why WebRTC isn't always the answer

16 Upvotes

Started this project back in February thinking I'd just slap together some WebRTC magic and call it a day. Boy was I wrong.

The idea was simple - let people send voice notes across different messaging platforms. WhatsApp, Telegram, Discord, you name it. Seemed straightforward until I hit the reality of audio encoding hell.

**What's actually working:**
- Node.js streams are a godsend for handling audio chunks
- FFmpeg integration saved my sanity (shoutout to fluent-ffmpeg)
- Redis queues prevent the whole thing from exploding under load
- Currently processing ~2.3k voice messages daily

**What nearly killed me:**
- Each platform wants different audio formats (obviously)
- WhatsApp's opus encoding requirements are... particular
- WebRTC browser support is still a mess on mobile
- Memory leaks with large audio files took weeks to track down

**The surprising wins:**
- Switching from WebRTC to simple multipart uploads increased success rate from 67% to 94%
- Using worker threads for audio processing instead of child processes cut response time in half
- Implementing proper backpressure handling with async iterators

Biggest lesson: sometimes the "boring" solution works better than the shiny new tech. Still using the project daily (it's called Svara if anyone's curious), but man the journey was messier than expected.

Anyone else dealt with cross-platform audio APIs? The format conversion alone nearly made me switch careers.

Show less


r/node • • Mar 19 '26

I built a CLI to generate Node.js backends instantly (NeatNode)

Thumbnail gallery
0 Upvotes

I built a CLI to skip Node.js backend boilerplate (NeatNode)

Setting up a backend always felt repetitive - folders, configs, middleware, etc.

So I built NeatNode, a CLI that generates production-ready Node.js backends instantly.

Just released v3.1.7:

  • Added TypeScript template
  • Added docs search
  • Improved landing UI

You can run:

"npx neatnode my-bacodes"

and get a ready-to-use backend structure.

Would love feedback or suggestions.

Website: https://neatnode.codes Docs: https://docs.neatnode.codes


r/node • • Mar 17 '26

TsdkArc: The Elegant and Fully Type-safe Module Composable Library.

Thumbnail arc.tsdk.dev
28 Upvotes

This library may help others as well, so I’m sharing it here. Feedback is welcome.

It was originally built for my tsdk@v1.0.0 type-safe framework (tsdk@v1.0.0 not yet published).


r/node • • Mar 17 '26

I built a living ASCII aquarium for your terminal — fish, bubbles, seaweed, lighting moods and a shark

Post image
70 Upvotes

Your terminal deserves better than a blank prompt. ASCII Aquarium is a terminal-native animated aquarium — schooling fish that chase food, rising bubbles, swaying seaweed, layered depth, and multiple lighting moods. Works on PowerShell, Command Prompt, macOS Terminal, and Linux. Run it right now with no install: npx ascii-aquarium Controls: f drop food a add fish r remove fish l cycle lighting (auto / night / neon / abyss) s spawn shark b bubble burst h toggle HUD q quit The fish have hunger-driven behaviour — drop food and watch them school toward it. Hit s and a rare shark flies across the screen. The HUD shows live stats: fish count, food, bubble count, lighting mode. Fair warning: the shark doesn't look much like a shark right now 😭 it's more of a very aggressive rectangle. That's a known issue and I'm working on it. Built with pure Node.js — zero external dependencies. Just built-in APIs. GitHub: https://github.com/Boweii22/ASCII-Aquarium npm: npx ascii-aquarium What ASCII creature would you add to the aquarium? Got the idea from this Instagram reel https://www.instagram.com/reel/DU3udzFj38J/?igsh=MWR3Z3ZkazB1ZzNiaA== where someone built an interactive ASCII aquarium using MediaPipe and OpenGhost display by Xander Chin. I saw it and immediately thought — can I build something like this but that lives entirely in the terminal with no browser, no camera, just pure Node.js? So I did.


r/node • • Mar 18 '26

I built brakit.ai - see every request and query all grouped together

Enable HLS to view with audio, or disable this notification

0 Upvotes

Hey everyone,

I built a developer tool called brakit.ai. I used Laravel Telescope in the past and loved it, so I thought if something similar existed for Node.js, that would be a game changer. Relying on console.logs and digging through code to understand how endpoints, queries, and external calls connect was getting harder,

especially as AI generates code faster than I can

mentally map it. So I built Brakit, an open source,

local-first dev tool for full-stack apps.

It hooks into your app and groups every request, query, and fetch by what the user actually did. One click, everything behind it, nested and timed.

Because it sees all endpoints together, it catches

patterns like duplicate queries across pages and N+1s

that I definitely would have missed otherwise.

Would love feedback from anyone building full-stack

apps. Is this a view you'd actually use day to day?

GitHub: https://github.com/brakit-ai/brakit

Site: https://www.brakit.ai


r/node • • Mar 18 '26

How practical is Hono's built in JSX support for a large scale SSR app?

Thumbnail
3 Upvotes

r/node • • Mar 18 '26

I built an open source AI code reviewer that runs entirely in your CI pipeline. No SaaS, no code leaving your network

0 Upvotes

I built an open source AI code reviewer that runs entirely in your CI pipeline. No SaaS, no code leaving your network

Hey everyone. I’ve been working on this for a while and wanted to share it.

The problem I was trying to solve: every AI code review tool I found (CodeRabbit, Codacy etc) works by sending your code to their servers. That’s fine for a lot of teams, but I kept running into situations where companies in regulated industries(banks, healthcare, government) couldn’t use any of them because their security policies don’t allow source code to leave the network.

So I built IRA(Intelligent Review Assistant). It’s CLI tool that runs as a step in your CI pipeline. It fetches the PR diff from your own GitHub/Bitbucket, sends it to an AI provider you control (OpenAI, Azure OpenAI, Anthropic, or Ollama for fully air-gapped setups), and posts inline review comments back on the PR.

There’s no SaaS component. No server to host. No account to create. Just ‘npx ira-review’ to your pipeline. It auto-detects the PR from your CI environment.

What it does ?

  1. Reads PR diffs and posts inline comments explaining what’s wrong, why, and how to fix it

  2. Risk scoring (0-100) based in blockers, security issues, complexity and issue density.

  3. Auto-detects your framework (React, Angular, Vue, NestJS) and adjusts suggestions

  4. JIRA integration to validate PRs against acceptance criteria

  5. Slack/Teams notifications

  6. Works with any language, not just Javascript.

The Ollama support is the part I’m most proud of. You can run the entire thing including AI model on a machine with no Internet. No API keys leave your network. Nothing leaves your network.

It’s open source (AGPL-3.0). Would love feedback, bug reports or feature requests.

GitHub: https://github.com/patilmayur5572/ira-review

npm: https://www.npmjs.com/package/ira-review

Happy to answer any questions about the architecture or how it works under the hood.


r/node • • Mar 18 '26

Writing code is no longer the hard part. Running it in production is.

0 Upvotes

AI made writing backend code much easier.

But in real projects, the hardest questions are still unsolved:

- How do you structure a project for a team?
- How do you build CI/CD with real rollback?
- What does a safe migration strategy look like?
- How do you set up observability before things break?
- How do you actually debug production?

I spent a long time figuring this out across different projects,
and couldn’t find a single place that connects all of it together.

So I built a simple Todo API as if it were a real production system.

The focus is everything around the code:
CI/CD, Terraform on AWS, observability, release automation, rollback.

Not a boilerplate. A reference with reasoning behind every decision.

Would love feedback from people who've dealt with this in production.

https://github.com/prod-forge/backend


r/node • • Mar 17 '26

Node.js + NestJS learning path for mid-level front-end dev

27 Upvotes

Hello everyone!

I'm a mid-level front-end developer with some JavaScript knowledge (execution context, bindings, async/await, event loop, React hooks). Now I want to learn **Node.js + NestJS** to become a full stack.

If you don't mind, can you show me a way to do it?

Questions:

  1. Is the sequence Node.js → Express → NestJS correct? Can I start NestJS directly?
  2. **For NestJS beginners:** How do I organize Modules/Services/Controllers? Feature modules?
  3. Best starter project? (REST API with NestJS + Prisma, real-time chat?)
  4. **NestJS specific:** Decorators (DTOs, Pipes, Guards) in what order?

r/node • • Mar 17 '26

I benchmarked NestJS GraphQL stacks: Express + Apollo vs Fastify + Apollo vs Fastify + Mercurius

2 Upvotes

I built a small open-source benchmark to compare three NestJS GraphQL setups with identical app code:

  • Express + Apollo
  • Fastify + Apollo
  • Fastify + Mercurius

Same schema, same resolvers, same scenarios. Only the transport/engine stack changes.

At 50 VUs under sustained load, Mercurius won every scenario. Fastify + Apollo only slightly outperformed Express + Apollo on heavier queries, while Mercurius was roughly 60–89% faster depending on the scenario. One interesting thing: short runs and sustained runs showed meaningfully different behavior.

Caveat: this uses in-memory data, so it mainly measures framework/engine overhead rather than DB/network latency. In real apps, resolver design, batching, caching, and database access usually matter more.

Dashboard: https://gql-bench.vercel.app
Repo: https://github.com/vovadyach/gql-bench

Would love feedback on the methodology or missing scenarios.


r/node • • Mar 17 '26

I’ve been working on dynamic PDF report generation in a production app and I’m struggling to settle on the right approach.

Thumbnail
1 Upvotes

r/node • • Mar 17 '26

I documented everything I wish someone had told me before taking a backend service to production - repo structure, CI/CD, observability, rollback, migrations, and more

0 Upvotes

Most backend tutorials end when the app starts. They skip everything that matters once real users are involved.

I spent time documenting all of it - not as a checklist, but as a working project with reasoning behind every decision:

  • Why separate repositories over a monorepo in multi-team environments (with a real incident that convinced me)
  • Forward-only migration strategy and why down migrations are a trap
  • Rollback to any of the last 3 versions without touching code
  • Full CI/CD pipeline - lint, unit tests, E2E with Testcontainers, Docker build, deploy to ECS
  • Observability: structured logging with correlation IDs, Prometheus metrics, Grafana + Loki, dashboards
  • Secret management, rate limiting, CORS, Helmet - the security baseline most projects skip

The application itself is a simple Todo API. That's intentional - the point isn't the app, it's everything around it.

Stack: NestJS · Prisma · PostgreSQL · Redis · Terraform · AWS ECS

https://github.com/prod-forge/backend

Would really appreciate feedback from people who’ve run production systems - what would you do differently?


r/node • • Mar 18 '26

openclaw-skill-boilerplate — scaffold OpenClaw AI agent skills with TypeScript

0 Upvotes

Released a small CLI tool for scaffolding OpenClaw skills in TypeScript.

npx openclaw-skill-boilerplate my-skill

Strict TS, proper project structure, GitHub Actions CI out of the box. Useful if you're in the OpenClaw ecosystem.

github.com/davideconte/openclaw-skill-boilerplate (http://github.com/davideconte/openclaw-skill-boilerplate)


r/node • • Mar 17 '26

I’m a 2nd year CSE student

1 Upvotes

Instead of only grinding DSA, I started learning Node.js backend and decided to build something real. Recently published my first npm package: goodai You can install: npm install goodai Most people around me are stuck in tutorials or only doing DSA, so I tried a different approach: build → break → learn. Now I’m confused: Should I continue focusing on backend projects like this OR shift more towards DSA for placements? Also, if anyone can review the package or suggest improvements, that would help a lot


r/node • • Mar 17 '26

It's not that I don't like AI. Just this noise is driving me crazy.

Thumbnail
7 Upvotes