We built our own npm registry with AI. It took a few endpoints, not a moonshot 🛠️
The trigger was a familiar fear. Deel has 200+ repositories. A popular npm package gets hijacked, and someone has to answer: are we running the bad version, and where? 😬
Answering that by scanning lockfiles is brutal. Three package managers, multiple lockfile formats, side branches that never show up on master. And even a perfect scan is too late, because the postinstall script already ran on someone's laptop.
Scanning fights the problem at the wrong layer. Every install goes through a registry, so that's where the control belongs. 🎯
The npm registry protocol is just HTTP: metadata, tarball, publish, auth. npm, pnpm, and yarn all speak it. So we built a caching proxy behind our VPN and pointed every developer and CI job at it.
What that gave us:
🛡️ Malicious versions blocked before install, not found after
📏 Release-age rules and scanning enforced server-side, for every package manager
🔍 "Are we affected?" becomes a database query, not a fleet-wide grep
📦 Our own S3 copy of every dependency, so upstream outages don't break builds
Prevention instead of detection. Once you own the choke point, a whole class of supply chain problems gets tractable. ✅
Full write-up on @deel blog: https://t.co/arHytuMktZ
Build only what changed: NX + pnpm
Your monorepo works great until CI starts choking. The usual advice is to split into separate repos, but that just trades one mess for another: scattered dependencies, manual version coordination, and nobody knowing which shared library runs where.
There's a smarter fix: only build what changed.
Every CI step is just inputs and outputs. NX hashes your source, config, tool versions, and upstream outputs. Seen that hash before? Restore the result from cache in seconds and skip the work. And because the key is a checksum, not a branch or commit, results are shared across PRs, branches, and developer machines.
pnpm makes it possible: workspaces define the project graph, the catalog keeps versions consistent, and disallowWorkspaceCycles guarantees the graph stays acyclic, which is the one condition NX caching depends on.
The payoff: change one leaf package, and only that package and its dependents run. CI bills drop, feedback loops shrink. Testing 8M lines of code in minutes stops being a heroic feat and becomes the default.
Full breakdown on the Deel blog: https://t.co/LckcqxuVZX
🚀 15,000 real database integration tests in 20 minutes. One machine. No mocks.
The trick is a Postgres feature almost nobody uses: template databases. 🐘
Migrate once per CI run → fork a fully migrated DB per test file in ~200ms → run everything in parallel.
Real rows, real constraints, real auth. When forking a database is cheaper than a network round trip, honest tests stop being a trade-off.
Full write-up 👇
https://t.co/v3NeHb6maX
#Postgres #Testing #deel