joi

The most powerful schema description language and data validator for JavaScript

Library
npm
v18.2.3
21,179stars
Custom / Unknown

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
64/100Good
Development Activity52
Maintenance36
Community68
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
78/100Good
Architecture82
Code Quality85
Innovation78
Learning Curve65

Joi is the flagship schema validation library from the hapi.js ecosystem, letting developers describe the exact shape, types, and constraints of JavaScript objects through a fluent, chainable API and then validate real data against that description. It has been a cornerstone of Node.js input validation since 2012, predating and inspiring much of the modern schema-validation landscape (Yup, Zod, and others openly cite Joi as an influence).

Beyond simple type-checking, Joi supports rich composition: conditional schemas, cross-field references, custom extensions, async validation, and detailed, localizable error messages. It ships first-class TypeScript types and a browser build, and remains under active maintenance by the hapi.js core team with a steady release cadence.

What You Get

  • A fluent, chainable schema-building API (Joi.object({...}), Joi.string(), Joi.number(), etc.) covering primitives, arrays, objects, dates, and binary data
  • Conditional validation (.when()), cross-field references (Joi.ref()), and custom extensions for domain-specific rules
  • Both synchronous .validate() and asynchronous .validateAsync() entry points, plus attempt() for throw-on-failure workflows
  • First-class TypeScript typings and a dedicated browser bundle (dist/joi-browser.min.js)
  • Detailed, customizable/localizable error messages with per-rule error codes

Common Use Cases

  • Validating REST/GraphQL API request bodies and query parameters at the edge of a Node.js service
  • Enforcing configuration file and environment variable shapes at application startup
  • Building reusable validation schemas shared between hapi.js route definitions and other frameworks
  • Sanitizing and coercing untrusted user input before it reaches business logic or a database layer

Under The Hood

Architecture - Joi’s core lives in lib/base.js, lib/validator.js, and lib/compile.js, which together implement an internal schema-object model (Any, extended by type-specific classes under lib/types/) that gets compiled into a validation plan and walked against input data. lib/ref.js and lib/template.js implement cross-field references and string interpolation for dynamic rules, while lib/errors.js centralizes structured error generation with per-rule codes, and lib/extend.js provides the public extension API for adding custom types.

Tech Stack - Written in vanilla JavaScript (97.5%) with a thin TypeScript typings layer (lib/index.d.ts), targeting Node.js >= 20. Runtime dependencies are all first-party @hapi/* utility packages (hoek, topo, formula, address, tlds, pinpoint) plus the @standard-schema/spec interop spec, keeping the dependency tree entirely within the hapi.js ecosystem’s own maintained packages.

Code Quality - The test/ directory mirrors lib/ file-for-file with deep coverage (thousands of assertions across base.js, validator.js, each type module), run via @hapi/lab. The project uses @hapi/eslint-plugin for consistent style enforcement and maintains a legacy-compatibility test (@hapi/joi-legacy-test) to catch breaking changes against older major versions — a strong signal of deliberate API stability discipline.

API Design - The chainable builder pattern (Joi.object({name: Joi.string().required()})) reads close to natural language and is widely imitated by later validators. The 4500+ line API.md reference and dedicated joi.dev documentation portal make the large surface area (dozens of type-specific methods) navigable, though the sheer breadth of rules and options does introduce a real learning curve for newcomers wanting more than basic type validation.

Used by 14 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,526

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
53
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated 9 months ago
JavaScript
95%
MIT

AnythingLLM

Developer Tools · Automation · AI Assistants

64,914

The all-in-one AI platform for private document chat, no-code agents, and local LLMs with zero setup friction.

View details
91
Repo Health
78
Technical
68
Dependency
Built with
JavaScript95%
Updated today
TypeScript
49%
MPL 2.0

Artillery

Devops · Developer Tools

9,054

Cloud-scale load testing and functional testing for APIs, WebSockets, gRPC, and headless browsers, distributed across AWS Lambda or Fargate with zero infrastructure to manage.

View details
89
Repo Health
73
Technical
68
Dependency
Built with
TypeScript49%
JavaScript48%
Updated 5 days ago
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
TypeScript
97%
AGPL 3.0

Checkmate

Devops · Analytics · Monitoring

10,556

Self-hosted uptime and infrastructure monitoring with multi-protocol checks, global geo-coverage, and beautiful real-time dashboards.

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

Directus

CMS · Low Code Platforms

37,462

Connect any SQL database and get instant REST and GraphQL APIs, a visual management Studio, and a native MCP server for AI agents — free for most organizations.

View details
93
Repo Health
82
Technical
78
Dependency
Built with
TypeScript80%
Vue18%
Updated yesterday
TypeScript
97%
Other

Kibana

Analytics · Monitoring

21,251

Your open source window into the Elastic Stack — query, visualize, and act on data stored in Elasticsearch with real-time dashboards, AI-assisted search, and automated alerting.

View details
98
Repo Health
87
Technical
68
Dependency
Built with
TypeScript97%
Updated today
Rust
78%
AGPL 3.0

Lemmy

Community · Social Media

14,555

Federated, self-hosted Reddit alternative with full community ownership and no corporate control.

View details
90
Repo Health
74
Technical
63
Dependency
Built with
Rust78%
PLpgSQL14%
Updated yesterday
JavaScript
44%
Other

LimeSurvey

Forms Surveys

3,698

The world's most flexible open-source survey platform with 900+ templates, conditional logic, 80+ languages, and full GDPR compliance for any scale.

View details
86
Repo Health
62
Technical
62
Dependency
Built with
JavaScript44%
PHP34%
CSS12%
Updated today

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