bcrypt

Battle-tested password hashing for Node.js using the adaptive bcrypt algorithm.

Library
npm
v6.0.0
7,805 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
47 /100 Fair
Development Activity 4
Maintenance 20
Community 64
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
82 /100 Excellent
Architecture 80
Code Quality 78
Innovation 85
Learning Curve 85

bcrypt is the de facto Node.js library for securely hashing and verifying user passwords. It wraps a native C++ implementation of the OpenBSD bcrypt algorithm, exposing a tiny, focused API for generating salts, hashing passwords with a configurable work factor, and constant-time comparison against stored hashes.

Designed for real-world authentication systems, it offers callback, Promise, and synchronous variants, ships prebuilt binaries for common platforms, and deliberately keeps its surface area small so teams can adopt safe password storage without wiring together low-level cryptographic primitives themselves.

What You Get

  • A native C++ implementation of the OpenBSD bcrypt algorithm exposed through a clean JavaScript API.
  • Async (callback), Promise, and synchronous variants of every core operation for flexible integration.
  • Automatic salt generation with a configurable work factor (cost rounds) to tune resistance against brute-force attacks.
  • Prebuilt binaries for Windows, Linux (glibc and musl), and macOS across x64 and arm64, with source-build fallback via node-gyp.

Common Use Cases

  • Hashing user passwords before persisting them in a database during signup.
  • Verifying a submitted password against a stored hash during login.
  • Upgrading legacy password storage to a modern, adaptive hashing scheme.

Under The Hood

Architecture — The public surface lives in bcrypt.js, a thin JavaScript layer that validates arguments and delegates to a native addon loaded via node-gyp-build. The native side (src/bcrypt_node.cc, src/bcrypt.cc, src/blowfish.cc, src/node_blf.h) ports the OpenBSD bcrypt/Blowfish implementation and is bridged through node-addon-api (N-API). Async operations dispatch to libuv’s thread pool so CPU-intensive hashing never blocks the event loop, while *Sync calls run inline. Salt entropy comes from Node’s built-in crypto.randomBytes, and promises.js supplies a pluggable Promise wrapper when no callback is passed.

Tech Stack — The codebase is roughly 51% C++, 38% JavaScript, and 6% C. Runtime dependencies are minimal: node-addon-api (^8.3.0) for the N-API bindings and node-gyp-build (^4.8.4) for loading prebuilt or source-compiled binaries. Builds use prebuildify with node-gyp/binding.gyp, and the library targets Node 18+.

Code Quality — The repository ships a Jest suite spanning five files (async.test.js, promise.test.js, sync.test.js, implementation.test.js, repetitions.test.js) that exercise the sync, callback, and Promise paths plus edge cases. The JavaScript layer performs thorough argument validation, routes errors to callbacks via process.nextTick (or rejected Promises) rather than throwing inconsistently, and keeps naming conventional and predictable.

API Design — The API is deliberately minimal and ergonomic: genSalt/genSaltSync, hash/hashSync, compare/compareSync, and getRounds. Each async method transparently returns a Promise when no callback is supplied, so callback, Promise, and async/await styles all work without configuration. Sensible defaults (10 rounds) and the ability to pass a cost number directly to hash minimize boilerplate for the common case.

Used by 34 apps in this directory

TypeScript
49%
MIT

Nginx Proxy Manager

Developer Tools · Networking · Security

34,517

Manage Nginx reverse proxies and free Let's Encrypt SSL through a beautiful web interface — no Nginx expertise required.

View details
92
Repo Health
77
Technical
72
Dependency
Built with
TypeScript 49%
JavaScript 47%
Updated 1 weeks ago
TypeScript
98%
Other

Novu

Developer Tools

40,195

Open-source communication infrastructure that connects your products and AI agents to every channel your users live on — Inbox, Email, SMS, Push, Chat, and more.

View details
93
Repo Health
80
Technical
64
Dependency
Built with
TypeScript 98%
Updated 5 days ago
TypeScript
91%
AGPL 3.0

OpenPanel

Analytics

7,187

Open-source Mixpanel alternative with session replay, MCP integration, and privacy-first product analytics you fully control.

View details
83
Repo Health
74
Technical
64
Dependency
Built with
TypeScript 91%
Updated 6 days ago
Vue
41%
AGPL 3.0

Operational

Analytics · Automation · Monitoring

474

Open-source event tracker with real-time push notifications and action buttons for tech founders.

View details
54
Repo Health
68
Technical
68
Dependency
Built with
Vue 41%
JavaScript 39%
MDX 13%
Updated 3 weeks ago
JavaScript
64%
AGPL 3.0

overleaf

Collaboration · Productivity

18,266

Open-source, real-time collaborative LaTeX editor with sandboxed compilation and full TeXLive support for self-hosted academic and research teams.

View details
84
Repo Health
80
Technical
59
Dependency
Built with
JavaScript 64%
TypeScript 30%
Updated 1 months ago
TypeScript
91%
AGPL 3.0

PeerTube

Social Media

15,362

A federated, ActivityPub-based video hosting platform built by Framasoft — self-hostable instances interconnect into a network with no vendor lock-in, P2P-assisted streaming, and no ads.

View details
96
Repo Health
75
Technical
66
Dependency
Built with
TypeScript 91%
Updated 1 weeks ago
TypeScript
90%
MIT

Plasmic

CMS · Design Tools · Low Code Platforms

7,125

The open-source visual builder that lets teams design React apps and websites with drag-and-drop while integrating seamlessly with your codebase.

View details
81
Repo Health
78
Technical
64
Dependency
Built with
TypeScript 90%
Updated 6 days ago
TypeScript
81%
AGPL 3.0

Postiz

Automation · Social Media

37,683

The agentic social media scheduler — AI-powered content creation, 33-platform posting, and team workflows, all self-hosted.

View details
92
Repo Health
70
Technical
63
Dependency
Built with
TypeScript 81%
JavaScript 11%
Updated 6 days ago
TypeScript
64%
AGPL 3.0

Puter

Developer Tools · File Storage

43,864

A self-hostable, web-based internet OS with desktop GUI, cloud storage, AI drivers, and a developer SDK — all running in your browser.

View details
88
Repo Health
88
Technical
67
Dependency
Built with
TypeScript 64%
JavaScript 33%
Updated 5 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers