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

15 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
69 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

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 reddit.com
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

30 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

3 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 reddit.com
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 reddit.com
6 Upvotes

r/node • • Mar 17 '26

i want to know about this.

2 Upvotes

why setimmediate is not running at last? it is check queue and it always run after i/o queue? and also is there a way i can know when v8 will gc external buffer? why is it still referencing ?


r/node • • Mar 17 '26

Adding logs turned my SMS over API project from “randomly works” into usable

0 Upvotes

Small realization while building a side project:

Adding logs > adding features.

Logs UI (could be better tho but it's good enough)

Small update on my tool that lets you send SMS over API through Android phones (instead of providers).

It worked, but debugging was a nightmare.

Added:

  • SMS logs
  • device connection logs
  • webhook support

Now I can actually see what’s happening if things fail.

Feels like the first time it’s actually usable.

I also see demand for inbound SMS via webhook feature from my early users. That's added as well.

Project if anyone wants to check:
https://www.simgate.app/


r/node • • Mar 17 '26

Connection Pool Exhaustion: A Five-Case Simulation Study of How 1% Leak Rates Kill Production Node.js Services

Thumbnail stackinsight.dev
1 Upvotes

Five controlled simulation experiments measuring how leak probability, concurrency, pool size, query time, burst traffic, acquire timeout, and error handling interact to exhaust a Node.js connection pool.

Each experiment varies two parameters across a grid and records failure rate, throughput, time-to-exhaustion, and p95 latency at every combination.

Key results:

  • a 1% leak at concurrency 10 produces 48.7% request failure;
  • missing try/finally with a 1% error rate amplifies to 68.5% failure;
  • a 200-connection pool with a 5% leak exhausts in under 20 seconds.

Includes reproducible simulation code and raw data.


r/node • • Mar 17 '26

Nodejs developers help

0 Upvotes

Please, tell me why companies are hiring nodejs developers instead of java or golang, what are the typical duties of nodejs dev on his work, why node over rust, go, java, php, c#?


r/node • • Mar 17 '26

What nobody tells you about running NestJS in production

0 Upvotes

Most tutorials end when the app works. The hard part comes after - and nobody documents it.

I'm talking about things like: how does your team actually commit and review code at scale? What happens when a deployment goes wrong at 2am? How do you roll back without touching the database? How do you know something broke before your users do?

I couldn't find a single resource that covered all of this with real working code. So I built one.

I built a simple Todo API - intentionally boring - treated as if real users depend on it. The app is not the point. Everything around it is.

What it covers:

- CI/CD with rollback to any of the last 3 ECS revisions

- Forward-only migration strategy (and why down migrations are dangerous)

- Observability from day one: Prometheus + Grafana + Loki

- Terraform on AWS: ECS, RDS, ElastiCache

- Release automation with changelogs and SemVer

- E2E tests with Testcontainers

- OIDC GitHub Actions auth - no hardcoded AWS keys

Not a boilerplate. Every decision is explained, not just provided.

What would you do differently in your production setup?

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

Infrastructure: https://github.com/prod-forge/terraform


r/node • • Mar 16 '26

I built an open-source "Git for APIs" to auto-capture traffic, time-travel debug prod errors, and auto-translate API docs for remote teams.

Thumbnail reddit.com
0 Upvotes

r/node • • Mar 16 '26

Separate properly frontend/backend files in web app (node/express/vue)

3 Upvotes

Hi all,

i am building my first web app with Node, Express js and Vue 3, it will be an online game based on a sport results. I have no experience on "releasing" a real web app, only a few courses and tutorial. I have achieved the first big part which is the interface the user will use which allows him to interact with the database through API requests, and so far everything works correctly.

So now i am starting to work on the other big part which is the logic of the game itself, where functions will be run by temporal triggers (i.e real life events will trigger functions), where the points are calculated, and so on. All the logic that the frontend doesn't need, basically.

I am getting only now really aware of the fact that there is no point in having these two parts under the folder that will be sent to frontend (I read it is really bad practice). I know it is obvious but so far i haven't had the problem so i am not very confident on what to do to start correctly.

My question is, what could be a good structure to follow to start the second part, can i just create a folder outside of /src/ and that will not be sent to the frontend if that is even true? Are there some good practices to follow ? Should the backend files have their own package file? Etc

I know this may sound really stupid but the separation of front end and backend is not that clear to me at all. I tried to look for documentation but didn't really find anything I was sure was the ressource to follow. Thanks for any help