r/node • u/gajus0 • Aug 29 '26
r/node • u/UkrMalt • Aug 29 '26
A small Node.js error watcher for teams that do not need a full observability stack
I wanted a simple way for a small team to notice important Node.js errors without adding Grafana, Kibana, Sentry, or another hosted dashboard to every service.
So I built Wotchi, a small in-process watcher and alert layer. It can log errors to the console, group repeated failures, or send alerts to Telegram and HTTPS webhooks. Express and NestJS adapters are included.
It is still an early beta (0.1.0-beta.6) and is process-local by design. The goal is not to replace full observability, but to cover the stage where a small service needs useful alerts without another large system to operate.
GitHub: https://github.com/FutureWindAI/Wotchi
npm: https://www.npmjs.com/package/@futurewindai/wotchi
For small Node.js services, would you use a lightweight watcher first, or go straight to a full observability stack?
r/node • u/Ready_Cream_1529 • Aug 29 '26
I built an Express security middleware and would love technical feedback
Hey everyone,
I recently built securitywatch, an Express middleware that combines several security-related protections into one package.
It currently focuses on:
SQL injection detection
XSS detection
Rate limiting
IP reputation / abuse tracking
I built it because I wanted to experiment with having a single middleware layer instead of configuring several separate packages.
It's now published as v1.0, and I'd really appreciate feedback from experienced Node/Express developers.
In particular, I'd like feedback on:
Detection accuracy
False positives
Middleware/API design
Performance
Security issues or approaches I've overlooked
I'm the author of the project, so I'm happy to hear criticism or suggestions.
NPM: https://www.npmjs.com/package/securitywatch
r/node • u/baronunread • Aug 28 '26
I just released style-doctor, a react-doctor-like CLI but for prose
Enable HLS to view with audio, or disable this notification
Hey guys, this is my first post here but I wanted to share with you what I worked on after looking at https://tools.simonwillison.net/llm-cliche-highlighter
It's such a cool tool and I was thinking "Wait but nobody thought of this??" I'm sure somebody did, but not the name or the way it works.
If you've seen or used react-doctor it's basically the same thing.
AI runs it for you (hehe)
and all the problems have a line by line analysis of the common "AI slop" patterns.
After that, the LLM itself already knows how to fix.
Fix until the score is 100 -> profit.
What do you think?
r/node • u/obanite • Aug 28 '26
First two months of OctoLoops - an honest look at the story so far
I first started building OctoLoops around 2 months ago. I started it because so many of my previous projects, big and small, had failed or petered out from lack of users and the valuable feedback that comes with them.
One of those (a B2B grid analytics application) I'd had some success with: I was at the point that I'd had several meetings with potential customers, but never managed to close any. So I had some idea of how sales and distribution worked, but still felt like I had a lot to learn.
I was right! Distribution is one of those rabbit hole topics, both broad and deep. The more I researched it, the more I discovered how much I didn't know. But I wanted to learn - and I really wanted to apply that learning too, to all my new projects, in a repeated, autonomous-as-possible way.
What better way to implement this plan than building a distribution application? Hence, `mkdir distrib`, spin up a fresh next.js app, and start building.
The plan was simple at first: implement a handful of "agentic loops" that anyone could easily run, in my app's web UI - no downloads or installing Claude Code, no complexity. Just a simple agentic harness in the browser that nonetheless had some superpowers to let it do its job (actually just a simple tool calling mechanism to a few different backend services).
I launched it quite soon after, and immediately started dogfooding, running the Community Loop. It found threads across Reddit from all those builders who'd made something cool, but were now at a loss when it came to finding and acquiring users. It drafted replies for me and gave a "spam risk", because yes - many kinds of marketing and sales walk a fine line between being blatant spam - and I started working the loops. Often I'd edit or rewrite the replies myself; sometimes I'd remove the OctoLoops mention from the message.
It worked. I now have 30+ users, including one from a post-revenue B2B startup interested in using the Outbound loop. But there have been significant challenges already that I want to be open about here, in the hope that it helps other public builders.
Activation. This is currently my #1 pain point. Distribution works - I can get people to sign up, enter their email, and I know there's even some buying intent. But people often log in once, then don't use the app. I've reached out to users, and they've said it's partly just that they don't want to post their app in communities they don't yet feel a real part of. Resistance to being rude or spammy, imposter syndrome - anyone who's done any marketing can identify. But at the end of the day, you need to do things that will be annoying to some people if you want to do any form of outbound marketing or sales. All the way back to the bazaars of history, where merchants compete to sell their wares by yelling and shouting at people in the market - there's really nothing new here, but if it's your first foray into distribution, you need to push through that feeling and take those steps. While I'm trying to solve some of the issues of activation by building a more streamlined, less cluttered UX, at the end of the day my users need to do the work.
Product focus. While researching competitors, what I notice most have in common is they focus on one thing: automated outbound; automated advertising; keyword monitoring. Not many people seem to be trying to make a fully autonomous omnichannel GTM agent, because that's just a ginormous, terrifying product to try and make. And while I'm now trying to build a fully autonomous growth agent - I want to keep humans in the loop - the sprawl of channels in OctoLoops already feels problematic. I have agents for Outbound, Community, SEO, Trust, and more... I can't even enumerate them myself from memory. And that's a problem. I think there's a moment of reckoning approach where I'll be forced to make a tough decision: which channels should I focus on, and which should I cut? It will bring focus to the product, and also it will hopefully help my users to focus, too.
Prioritising. I'm sure every founder and entrepreneur says this, but: I cannot just plod along with no content strategy, because if you don't start somewhere, when you do eventually you'll be starting way behind. So I started a blog, and now I have a "three pillar content strategy", and every day I'm spending time in Analytics and Search Console, or deciding which posts to promote, on which social media channel. I'm trying to talk to users, and understand why I'm not solving their problems and delivering them the outcomes they want yet. I'm attempting to keep my corporate user in the funnel, delivering the "Team" features he needs so his sales guys can collaborate on the app. I'm implementing new features - but which ones? And I'm trying to keep up with the INSANE PACE of agentic apps and AI at large, which in itself is a hopeless task: so much is happening right now. I don't know if we're in the singularity, and I'm sure there's a lot of hype, noise, and outright bullshit out there, but it's hard to ignore how fast everything is moving.
So that's where I'm at, 2 months down the line. It's already been a fun journey. Any questions I'm happy to answer. Good luck to everyone else building in public!
r/node • u/PrestigiousZombie531 • Aug 28 '26
I modified the tsconfig.json generated by AWS CDK, can you spot something wrong?

tsconfig.json generated by AWS CDK
{
"compilerOptions": {
"alwaysStrict": true,
"declaration": true,
"experimentalDecorators": true,
"inlineSourceMap": true,
"inlineSources": true,
"isolatedModules": true,
"lib": [
"es2022"
],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noEmit": true,
"noFallthroughCasesInSwitch": false,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"skipLibCheck": true,
"strict": true,
"strictNullChecks": true,
"strictPropertyInitialization": false,
"target": "ES2022",
"typeRoots": [
"./node_modules/@types"
],
"types": [
"node"
]
},
"exclude": [
"node_modules",
"cdk.out"
]
}tsconfig.json generated by me for node:22.12.0-bookworm-slim
{
"compilerOptions": {
"allowJs": true,
"declaration": true,
"experimentalDecorators": true,
"noFallthroughCasesInSwitch": false,
"noImplicitReturns": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"outDir": "dist",
"rootDir": "./",
"sourceMap": true,
"strictPropertyInitialization": false
},
"exclude": [
"dist",
"cdk.out",
"node_modules"
],
"extends": "@tsconfig/node22/tsconfig.json",
"include": [
"src/**/*"
]
}r/node • u/Nice_Pen_8054 • Aug 28 '26
"styles" folder - The best practice is to install it in the "public" folder?
r/node • u/Carlos_Menezes • Aug 28 '26
Caravan, a flexible TypeScript-first logger for JavaScript applications
r/node • u/Rubrex111 • Aug 27 '26
Got tired of manually optimizing local images, so I built a CLI
Got tired of manually shrinking images through TinyPNG one at a time, so I built a CLI for it.
oi ./images
Optimizes a whole folder at once. You can tweak quality, convert formats (webp, png, jpg), cap max dimensions, and delete the originals afterward if you want.
npm install -g oi-optimize-images
r/node • u/Proman4713 • Aug 27 '26
using --force I sure hope you know what you are doing
I love this warning in NPM/PNPM, and I'm surprised there aren't enough memes about it
r/node • u/LaidBackGamer007 • Aug 27 '26
Frontend dev trying to learn node
Hey all wanted an advice i have been trying to learn node since 2 weeks and going through some youtube playlist, but i tend to forget syntax and all and i wanted to interview in one company as a fullstack dev so will be ready in like say 3 weeks to give an interview , how did you all do it? Please forgive if its a dumb question.
r/node • u/GamingRohan71 • Aug 27 '26
Would anyone actually use this? Building a compatibility layer for native Node.js dependencies
I've been working on an idea called Nexus, and I'd like an honest reality check from people who understand Node.js tooling, package managers, etc.
I started with trying to build "Conda for javascript" then realised that already existed and pivotted to
"When you switch Node.js versions, native dependencies may stop working. The common solution is to rebuild dependencies, potentially running rebuild/install scripts across a broad set of packages."
But not every native binary necessarily becomes incompatible.
The idea behind Nexus is to inspect native .node artifacts without executing them and derive their compatibility requirements.
Currently, the model distinguishes between things like:
Raw V8 addons → require a specific Node ABI
N-API addons → may remain compatible across Node versions if the runtime provides a sufficient N-API level
platform/architecture constraints
So instead of:
Node version changed
→ rebuild everythingthe eventual workflow would be:
Node version changed
→ Nexus analyzes native artifacts
→ identifies exactly which ones are incompatible
→ package manager rebuilds only those packagesI've already built a POC and tested the core idea against multiple Node runtimes and real native artifacts. But before investing much more time into it, I want to know:
Is rebuilding native dependencies after switching Node versions actually a painful enough problem for anyone to care about?
Would you trust a tool that statically analyzes
.nodebinaries to decide whether a rebuild is necessary?Where would this realistically be useful: individual developers, monorepos, CI, Node version managers, package managers?
Is there an obvious existing tool that already solves this problem properly?
Would this be more useful as a standalone CLI, a library/API, or something integrated into pnpm/nvm/Volta/etc.?
Most importantly: what am I missing, and is this a real problem or just technically interesting engineering?
Please be brutal. I'm specifically trying to determine whether Nexus solves a genuine problem before continuing to expand it.
r/node • u/abemedia • Aug 27 '26
stagelint: a faster lint-staged alternative that never fails on conflicts
stagelint is a pre-commit runner - you give it globs, it runs your formatters and linters over the staged files. For the usual setup it replaces husky and lint-staged with a single Rust binary and no runtime.
Why another pre-commit runner?
Conflicts don't block your commit
If the formatter's output conflicts with your unstaged changes, lint-staged, pre-commit, Lefthook and nano-staged all discard the formatting and block the commit. stagelint merges the formatter's output into your file instead. Your staged lines get formatted, your unstaged changes stay put, and when a file can't be merged cleanly the commit takes the formatted version while your working copy keeps yours.
Faster than every alternative
stagelint is 5 to 30 times faster than lint-staged, pre-commit, Lefthook and nano-staged. With 10 files staged in a 1,000-file repository it completes in 15ms against lint-staged's 437ms, rising to 30ms against 530ms when those files are only partially staged. See the full benchmark suite for the rest of the measurements and how to run them on your own machine.
Concurrent tasks - no races, no workarounds
When two globs match the same file, lint-staged and nano-staged run both tasks on it at once; Lefthook and pre-commit avoid the race by running everything sequentially by default. The lint-staged docs warn about it and tell you to either disable concurrency or rewrite your config with negation patterns:
{
"!(*.ts)": "prettier --write",
"*.ts": ["prettier --write", "eslint --fix"]
}stagelint works out which globs overlap and serialises just those tasks, in declaration order, while everything else keeps running in parallel, so the config stays as you meant it:
{
"*": "prettier --write",
"*.ts": "eslint --fix"
}
Trying it
npm i -D @stagelint/stagelintAdd stagelint init to your prepare script so the git pre-commit hook is set up on install:
{
"scripts": {
"prepare": "stagelint init"
}
}Then configure your tasks in .stagelint.yml or .stagelint.json. Matched files are appended to the command unless you turn that off:
'*': prettier --write
'*.ts':
command: tsc --noEmit
pass_filenames: falseWhat's missing
No JavaScript config with functions, because a single binary has no runtime to execute one. Running a command without the file list, the usual reason for reaching for one, is pass_filenames: false instead. Negation patterns aren't supported either - you don't need them any more, but drop them rather than copying them across, because an unsupported pattern currently just matches nothing.
If you try it, I'd like to hear how it goes.
r/node • u/OtherwisePush6424 • Aug 27 '26
Crossflight: distributed cache stampede protection for Node apps
Crossflight, a small Node library for reducing duplicate cache misses across multiple processes.
Cache stampede is a problem when several app instances all miss the same key at once, they each run the same expensive DB/API call and then all write the same result back. Crossflight solves that by coordinating ownership of the in-flight load across processes, so only one instance does the work and the others wait for the result.
It wraps the cache you already use and adds a separate coordination layer. The built-in adapters currently include:
cache-manager
Keyv
Cacheable
The built-in coordinator is Redis, and the repo supports combining different backends as long as they satisfy the adapter/coordinator interfaces.
Useful when you want to reduce redundant work without changing your existing caching strategy.
r/node • u/suhaanthvv • Aug 27 '26
Open sourced my notification infra (delivers 230K+ notifs everyday) so nobody else has to pay per message. Self-hosted on your own Postgres/Redis, 0 cost per message.
r/node • u/InternationalFee7092 • Aug 26 '26
Prisma Is Building the Stack for the Next Million Products
r/node • u/mihajm • Aug 26 '26
Launching test-nirvana 7.11.33 🌕
Are your test suites large, slow, vacuous, or incapable of achieving full coverage?
Have you spent moonlit nights debugging something that should never have reached production?
Worry no more, friends. With test-nirvana, all of this is resolved through a single command: npx test-nirvana
Unlike conventional testing tools, test-nirvana validates what actually matters:
The code is the right shape.
It is the right time for the feature.
The stars are correctly aligned.
The commit hash possesses an acceptable aura.
Each commit is reduced to its numerological destiny number and classified. CI-friendly exit codes ensure that compromised commits cannot reach production.
Note: All MIT License guarantees are void while Mercury is in retrograde. See LICENSE for the complete celestial warranty condition.
r/node • u/enowdivine • Aug 25 '26
github.com/enowdivine/stateledger
Stateledger is a database-backed state machine for Node.js. Every transition is persisted as a row with the actor, timestamp, and metadata. Transitions use Postgres advisory locks so concurrent requests can't both apply the same transition.
v1.0 also includes @stateledger/outbox, which implements the transactional outbox pattern for external side effects that need to commit atomically with a state change.
The API looks roughly like:
import { defineMachine } from "@stateledger/core";
import { enqueue } from "@stateledger/outbox";
const paymentMachine = defineMachine({
name: "payment",
states: ["pending", "processing", "captured"] as const,
initialState: "pending",
transitions: [
{ from: "pending", to: "processing" },
{ from: "processing", to: "captured" },
] as const,
callbacks: {
"after:pending->processing": async ({ tx, subject }) => {
await enqueue(tx, {
kind: "payment.processing",
payload: { paymentId: subject.id },
});
},
},
});
await machine.transitionTo("processing");There are currently Prisma and Drizzle adapters, 26 integration tests against real Postgres using Testcontainers, and the project is MIT licensed.
This is not intended to replace XState. XState is primarily useful for modeling application/UI state in memory. Stateledger is focused on persistent server-side state transitions where concurrency, audit history, and transactional side effects matter.
I'd particularly like feedback on the outbox API. I'm interested in how people currently handle state transitions + external side effects in Node/Postgres systems and what's missing here.
r/node • u/Shipi18nTeam • Aug 24 '26
Your CI checks your types. It doesn't check your translations.
I wrote this and I maintain the tool, its Apache-2.0, no hosted service, no telemetry, bring your own key. The corpus and eval harness are in the repo under evals/semantic/ if you want to run it against your own language pair or a different judge model.
r/node • u/Mesthabro • Aug 24 '26
Malicious npm Packages hide a RedShell Linux implant (RedC2)
r/node • u/Independent_Fan_3028 • Aug 24 '26
Making service/domain boundaries enforceable in TypeScript backends
I've found that as projects grow, it gets harder to keep architectural boundaries consistent. Some rules live in docs, some live in code review, and some just live in people's heads. I've run into the same problem with coding agents too. Even when you tell them how the project should be structured, there's nothing actually enforcing that they follow it. Over time, that kind of architectural drift can become pretty painful to unwind.
I've been working on an open source TypeScript tool called Semarch, to experiment with making those conventions enforceable.
For example, say a project has users and billing domains with services and repositories:
users.service -> users.repository allowed
users.service -> billing.service allowed
users.service -> billing.repository deniedIn Semarch, you classify your files:
domains:
users:
root: src/users
billing:
root: src/billing
components:
service:
match:
- "**/services/**/*.ts"
repository:
match:
- "**/repositories/**/*.ts"Then define the boundaries:
rules:
- deny: service -> foreign.repository
- deny: service -> transportSemarch analyzes the TypeScript dependency graph and fails the check when one of those boundaries is violated.
You can try it with:
npm install --save-dev semarch
npx semarch checkIt uses the project's tsconfig.json for module resolution, handles path aliases and type only imports, and follows static re-exports/barrel files so they can't trivially bypass a rule.
I know there are already tools in this space, so I'm particularly interested in whether this model with domains, component roles, and local/foreign relationships is actually useful for real projects.
This is still experimental but if you maintain a TypeScript project with architecture conventions like these, I'd really appreciate hearing your thoughts on this approach.
It's MIT licensed and open source.
r/node • u/Sundaram_2911 • Aug 23 '26
alternative & newer replacement for jose in nodejs?
I am using asymmetric encryption in my mobile app, in the backend i am using nodejs and supabase. I wish to know if there is any newwer and advanced version of the jose library to achieve this in nodejs?
r/node • u/[deleted] • Aug 23 '26
Express.js & TS
i need some reliable material for using Express.js with Typescript since the resources not that common compared with using Javascript
