hapi
Reasonable, with limits. 9th of 10 server frameworks.
hapi is a mature, config-driven Node.js server framework. Its built-in validation, auth, caching and plugin system are solid, and patch releases still ship regularly. Its share of new projects is falling, and Fastify or NestJS now does the same job better for most new work. Keep it where it already runs, but pick something else for a new project.
Best for: Teams that already run hapi, or that want a conservative, configuration-first Node.js framework whose core and plugins all come from one org.
Scores
Overall5.4
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 4.5, likely 3.5 to 5.5
hapi works well and is still patched, so existing apps are safe on it. For new work, Fastify gives the same structured, plugin-based model with more speed, more activity and faster growth, and NestJS or Hono serve other needs better. Growth well below the median, and maintenance that rests mostly on one person, put it in keep-where-it-runs territory.
- peers Fastify: Fastify: 357 commits a year, downloads up 7x.
- npm downloads ratio: 1.98x against a 4.1x median.
- startupstash.com/alternatives/hapi: Still maintained with patch releases in 2026.
GPT-6.2 Sol: 6.3, likely 5.2 to 7.4
Hapi is a sound choice for teams that want per-route auth, Joi validation, and built-in HTTP testing. Fastify is the stronger default for new Node.js APIs because it offers schema-based type inference, higher throughput in basic tests, and more active development. Recent patch releases and current production use support hapi's case, with adoption momentum and maintainer capacity the main uncertainties.
- hapi.dev/api/21.x.x: Documents the route controls and test API that distinguish hapi.
- fastify.dev/docs/latest/Reference/Type-Providers: Fastify can infer route types from schemas.
- github.com/KidlatJS/benchmarks: Fastify led hapi on each published route test.
- npm versionsLastYear, github commitsLastYear, peers Fastify, medianDownloadsRatio: Hapi ships patches, while Fastify shows more development and download growth.
- github.com/elastic/kibana/blob/main/package.json: A current production application pins the latest hapi release.
Needed by many6.5
How many developers need a tool for this job?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
Many JavaScript and TypeScript developers need an HTTP server framework. hapi covers the general API and web-server job but only on Node.js. That makes it a little narrower than runtime-agnostic peers.
- hapi runtime support: Built on Node's http module; no edge or Bun target.
- category.job: Handling HTTP requests and building APIs is a common need.
GPT-6.2 Sol: 6.0, likely 4.9 to 7.1
Building HTTP APIs is a common job for JavaScript and TypeScript developers. Hapi works for a wide range of Node.js services, especially those that share authentication and validation rules across routes. Its reliance on Node.js HTTP APIs narrows its fit, and surveys give only an indirect estimate of how many teams need this approach.
- 2025.stateofjs.com/en-US/libraries/back-end-frameworks: Survey tracks experience across several server frameworks.
- hapi.dev/api/21.x.x: Documents Node.js HTTP integration and route-level controls.
Helps a lot6.7
How well does it do the job for those who need it?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
The core is complete and correct. It has route config, joi validation, auth schemes, caching and request injection for tests. Its TypeScript types still get fixes, but it is slower than Fastify and has fewer integrations than Express, Fastify or NestJS. There is less code online for AI coding agents to learn from, so they write it less reliably than the leaders.
- medium.com/deno-the-complete-reference/express-vs-fastify-vs-hapi-vs-koa-hello-world-performance-comparison-dd8cd6866bdd: Independent benchmark: hapi is behind Fastify and ahead of Express.
- npm-compare.com/express,fastify,hapi,koa: Curated, high-quality plugins, but less variety.
- npm hasTypes: Ships its own types.
GPT-6.2 Sol: 7.3, likely 6.2 to 8.2
Hapi 21.4.13 has well-documented request hooks, authentication, validation, and socket-free route tests. Validation failures have configurable handling, and typed inputs often require explicit generics to match the runtime schema. Fastify handled more requests in two benchmark suites, including the one that tested hapi 21.4.13. Application workloads vary, and evidence on coding-agent accuracy is anecdotal.
- hapi.dev/api/21.x.x: Documents lifecycle hooks, auth, validation errors, and request injection.
- raw.githubusercontent.com/hapijs/hapi/v21.4.13/typescript.md: Shows explicit route generics and module augmentation.
- github.com/KidlatJS/benchmarks: Third-party tests put hapi 21.4.10 behind Fastify on simple routes.
- fastify.dev/benchmarks: Fastify's own November tests also put hapi 21.4.13 behind.
- reddit.com/r/node/comments/1cd2mjf/how_many_of_you_are_using_hapi_js_and_what_do_you: Users describe plugin typing gaps and one failed AI-assisted migration.
Holds up over time5.5
Will it still be a good choice in two years?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Nine npm versions shipped in the last year, with security and protocol fixes as recent as November 2026. Almost all of that work comes from one maintainer, and volunteers fund it through Open Collective. There has been no new major line since 2022, and the ecosystem is moving towards Fastify, Hono and NestJS. A 2025 dispute over an outside pull request suggests contributions are slow to land.
- github.com/hapijs/hapi/commits/master: Commits through Nov 2026, mostly by one maintainer.
- npm versionsLastYear: 9 versions; latest 21.4.13 on 2026-11-04.
- github commitsLastYear: 25 commits, against hundreds for Fastify and Hono.
- news.ycombinator.com/item?id=45242587: Dispute over an outside zstd pull request.
- geekflare.com/open-source/hapi: Volunteer committee, funded through Open Collective.
GPT-6.2 Sol: 6.0, likely 4.8 to 7.2
Hapi published nine npm versions in the past year, including 21.4.13 in November, and recent patches have Git tags. The repo logged 25 commits against Fastify's 357, several pull requests have aged for years, and an upgrade caused a reported typing regression that took about two months to close. Hapi names a six-person steering committee and a staff sponsor. Recent tags came from the same maintainer, leaving the depth of active release coverage uncertain.
- npm versionsLastYear, npm latestPublishedAt, github releasesLastYear: Nine npm versions despite zero formal GitHub Releases in the period.
- github commitsLastYear, peers Fastify commitsLastYear: 25 commits for hapi and 357 for Fastify.
- github.com/hapijs/hapi/pulls: Several pull requests opened in 2022 to 2024 remain open.
- github.com/hapijs/hapi/issues/4561: Typing regression reported in December and closed in February.
- github.com/hapijs/hapi: Lists six steering committee members.
- hapi.dev/policies/sponsors: Lists Big Room Studios as staff sponsor.
- github.com/hapijs/hapi/releases/tag/v21.4.12: Identifies the maintainer who tagged the October patch.
- github.com/hapijs/hapi/releases/tag/v21.4.13: The same maintainer tagged the November patch.
Used widely4.4
How many use it, and is that growing?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
8.3M downloads in 4 weeks, up about 2x in a year against a 4.1x median, so it is losing share. ecosyste.ms counts 18.4k dependent repositories, about the same as Fastify, but much of that is older code. It gets no Bluesky posts and little discussion, which points to few new projects choosing it.
- npm downloadsLast4Weeks: 8.27M, up from 4.17M a year before (1.98x).
- medianDownloadsRatio: The median is 4.1x, so hapi is falling behind.
- dependents.repos: 18,401 repositories, similar to Fastify and Restify.
- bluesky posts: 0 posts, against 12 to 25 for leading peers.
GPT-6.2 Sol: 4.8, likely 3.7 to 6.0
The index found 18,401 dependent repositories and 1,017 packages, with slightly more repositories than Fastify and far fewer than Express. Downloads rose from 4.17 million to 8.27 million over comparable four-week windows, or 1.98× against the 4.1× catalog median, suggesting a loss of relative share. About 14,800 stars show accumulated attention, and the Bluesky scan found zero posts linking to the repo. The dependents index has partial coverage, and downloads include CI and indirect installs, so the rate of new adoption is uncertain.
- dependents repos, dependents packages, peers dependentRepos: About 18,400 indexed repos versus 16,700 for Fastify and 1.85 million for Express.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: Download growth was about half the catalog median ratio.
- github stars, bluesky posts, peers blueskyPosts: 14,800 stars and fewer recent Bluesky repo links than most peers.
Vouched for5.3
Who stands behind it being good?
Claude Opus 5.5: 4.0, likely 3.0 to 6.0
It began at Walmart and still powers the Kibana server, which is a real production backer. Current independent write-ups mostly list it next to others, without fresh endorsements. The State of JS 2025 survey covers it, but only Express, Nest and newer frameworks stand out there.
- Elastic Kibana: Kibana's server is built on hapi.
- 2025.stateofjs.com/en-US/libraries/back-end-frameworks: Express leads usage and Nest is growing; hapi is not highlighted.
- stackshare.io/stackups/expressjs-vs-fastify-vs-hapi: Comparison that positions hapi as a structured, legacy option.
GPT-6.2 Sol: 6.6, likely 5.4 to 7.7
Elastic's Kibana pins hapi 21.4.13, and Oracle lists hapi in its Financial Services Accounting Foundation Cloud Service. Those are two current production signals. State of JS highlights Hono, Nitro, and Elysia as satisfaction leaders, and independent benchmark results cover only simple routes, so evidence for a broader preference is limited.
- github.com/elastic/kibana/blob/main/package.json: Kibana pins hapi 21.4.13.
- docs.oracle.com/en/industries/financial-services/ofs-analytical-applications/accounting-foundation/26d/licensing/afcs-lium.pdf: Oracle's October 2026 cloud-service license inventory lists hapi.
- 2025.stateofjs.com/en-US/libraries/back-end-frameworks: The survey names Hono, Nitro, and Elysia as satisfaction leaders.
- github.com/KidlatJS/benchmarks: Publishes reproducible tests for basic HTTP workloads.
Safe6.6
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
There is one advisory, a DoS fixed in 2020, and none in the last 24 months. Security fixes still ship quickly. The 18 dependencies are almost all @hapi packages from the same org, and the licence is BSD-3-Clause. The Scorecard is weak at 4.4, with no branch protection, unpinned dependencies and little code review, and releases depend on one person.
- advisories: 1 total (2020), 0 in the last 24 months.
- scorecard score: 4.4: Branch-Protection 0, Code-Review 2, Pinned-Dependencies 0.
- npm dependencies: 18 dependencies, mostly from the @hapi org.
- github.com/hapijs/hapi/commits/master: Host-header and subtext security fixes in Oct and Nov 2026.
GPT-6.2 Sol: 6.1, likely 4.8 to 7.4
Hapi uses the permissive BSD-3-Clause license and brings in 18 direct dependencies under its own npm scope. The advisory database records a 2020 denial-of-service issue patched in both affected release lines and no direct advisories in the last two years. The 4.4 OpenSSF Scorecard gives full marks for the security policy and low marks for code review, branch protection, dependency pinning, and workflow token permissions. The latest Git tag is traceable, while npm publishing provenance and active publisher coverage remain unclear.
- npm license, npm dependencies: BSD-3-Clause and 18 direct dependencies.
- raw.githubusercontent.com/hapijs/hapi/v21.4.13/package.json: All direct dependencies are under the @hapi scope.
- advisories total, advisories last24Months: One advisory in the record and zero over the past 24 months.
- github.com/advisories/GHSA-23vw-mhv5-grv5: Lists patched versions 18.4.1 and 19.1.1.
- scorecard score, scorecard checks: Weak review and workflow controls, with packaging and signing unscored.
- github.com/hapijs/hapi/releases/tag/v21.4.13: Links the source tag to a specific commit and maintainer.
Good
- Validation, auth strategies, caching, cookies and a plugin system with clear boundaries are built into the core.
- Its dependencies are almost all @hapi packages from the same org, so few outside parties are in the tree.
- Security and protocol fixes ship steadily as patch releases, such as the host-header and cookie fixes in 2026.
- The API has been stable for years, so upgrades within v21 rarely break code.
Bad
- It runs on Node.js only; it does not target edge runtimes, Bun or Deno the way Hono and Elysia do.
- No major release since v21 in 2022; recent work is maintenance, mostly by one maintainer.
- It is slower than Fastify, and its plugin ecosystem is far smaller than those of Express, Fastify or NestJS.
- Downloads grew about 2x in a year against a 4.1x median, so it is losing ground.
The numbers
- npm downloads, 4 weeks
- 8.3M +98% in a year
- GitHub stars
- 15k
- Commits, 12 months
- 25
- npm version
- 21.4.13 Nov 2026
- Versions, 12 months
- 9
- Advisories, 24 months
- 0 of 1 ever
- OpenSSF Scorecard
- 4.4 out of 10, Nov 2026
- Licence
- BSD-3-Clause
Read on 21 November 2026 from GitHub (hapijs/hapi), npm (@hapi/hapi), OSV and the OpenSSF Scorecard.