bcrypt

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

Library
npm
v6.0.0
7,802stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
49/100Fair
Development Activity12
Maintenance20
Community64
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
82/100Excellent
Architecture80
Code Quality78
Innovation85
Learning Curve85

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
99%
Other

Activepieces

Automation · AI Assistants

23,887

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
65
Dependency
Built with
TypeScript99%
Updated today
TypeScript
94%
MIT

Actual

Invoicing Finance

28,224

Local-first personal finance with envelope budgeting, end-to-end encryption, and multi-device sync — no subscription required.

View details
93
Repo Health
85
Technical
77
Dependency
Built with
TypeScript94%
Updated yesterday
TypeScript
96%
Other

Amplication

Developer Tools · AI Code Assistants · Automation

16,010

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
61
Repo Health
84
Technical
60
Dependency
Built with
TypeScript96%
Updated 1 months ago
JavaScript
100%
Other

Automatisch

Automation · No Code Platforms

13,936

Self-hosted, no-code workflow automation that keeps your data on your own servers—a privacy-first alternative to Zapier with 90+ integrations.

View details
49
Repo Health
78
Technical
64
Dependency
Built with
JavaScript100%
Updated 6 months ago
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,846

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
91
Repo Health
77
Technical
64
Dependency
Built with
TypeScript97%
Updated yesterday
TypeScript
69%
Other

Budibase

Low Code Platforms · No Code Platforms

28,220

Build AI agents, automations, and internal apps on a single open-source platform with full self-hosting control.

View details
92
Repo Health
81
Technical
63
Dependency
Built with
TypeScript69%
Svelte26%
Updated today
JavaScript
99%
Other

ChartBrew

Analytics · Databases

4,041

Open-source reporting platform to build live dashboards from SQL, NoSQL, APIs, and SaaS tools with an AI assistant that creates charts from natural language.

View details
90
Repo Health
83
Technical
65
Dependency
Built with
JavaScript99%
Updated 6 days ago
TypeScript
95%
AGPL 3.0

Docmost

Productivity · Note Taking · Collaboration

21,411

Self-hosted collaborative wiki and knowledge base with real-time editing, diagrams, AI assistance, and enterprise access controls — a modern alternative to Confluence and Notion.

View details
89
Repo Health
70
Technical
71
Dependency
Built with
TypeScript95%
Updated yesterday
TypeScript
99%
Other

Dokploy

Devops · Hosting Control Panel · Security

36,702

Self-hosted PaaS that deploys apps and databases on your own VPS using Docker, Traefik, and multi-build-system orchestration

View details
89
Repo Health
76
Technical
65
Dependency
Built with
TypeScript99%
Updated yesterday

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

Search