Elestia Open Source Ratings
5.4

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.

WebsiteGitHubnpm

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Server frameworks

  1. 8.4Hono
  2. 8.3Fastify
  3. 8.2NestJS
  4. 7.3Express
  5. 7.0AdonisJS
  6. 6.8Elysia
  7. 6.7h3
  8. 5.5Koa
  9. 5.4hapi
  10. 3.8Restify
Compare all 10 on six scores