# sinclairzx81/typebox

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/sinclairzx81-typebox).**

6,759 stars · 206 forks · TypeScript · NOASSERTION

## Links

- GitHub: https://github.com/sinclairzx81/typebox
- Homepage: https://sinclairzx81.github.io/typebox/
- awesome-repositories: https://awesome-repositories.com/repository/sinclairzx81-typebox.md

## Topics

`jsonschema` `typescript`

## Description

TypeBox is a JSON schema generator and TypeScript data validator. It functions as a type builder that creates compliant JSON schema definitions while providing a mechanism for synchronizing runtime validation logic with compile-time types.

The project allows for the automatic derivation of static TypeScript interfaces from schema definitions to eliminate redundant type declarations. It converts complex type constructs into schema fragments and resolves static types to maintain consistency between data shapes and code.

The system covers runtime type checking and data validation through the use of compiled validators. These capabilities extend to API request validation and the generation of JSON schemas for cross-platform data exchange.

## Tags

### Programming Languages & Runtimes

- [JSON Schema Generators](https://awesome-repositories.com/f/programming-languages-runtimes/json-schema-converters/json-schema-generators.md) — Generates compliant JSON Schema definitions that provide automatic static type inference for TypeScript. ([source](https://cdn.jsdelivr.net/gh/sinclairzx81/typebox@main/README.md))
- [Schema Type Builders](https://awesome-repositories.com/f/programming-languages-runtimes/json-schema-converters/json-schema-generators/schema-type-builders.md) — Builds JSON Schema definitions that automatically provide static type inference for TypeScript applications.
- [Runtime Validator Compilation](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-validator-compilation.md) — Transforms high-level schema definitions into optimized executable validation functions at runtime for increased performance.
- [Runtime](https://awesome-repositories.com/f/programming-languages-runtimes/type-checking/runtime.md) — Verifies that data received from external sources matches expected TypeScript types using compiled validators.
- [Type-to-Schema Generation](https://awesome-repositories.com/f/programming-languages-runtimes/json-schema-converters/json-schema-generators/type-to-schema-generation.md) — Transforms TypeScript type declarations and constructs into compliant JSON schema fragments. ([source](https://cdn.jsdelivr.net/gh/sinclairzx81/typebox@main/README.md))

### Security & Cryptography

- [Runtime Data Validation](https://awesome-repositories.com/f/security-cryptography/input-validation-schemas/runtime-data-validation.md) — Validates runtime data against schemas to ensure structural integrity within TypeScript applications.

### Software Engineering & Architecture

- [Data Schema Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation.md) — Provides a runtime validation engine that checks data structures against schema definitions for type safety.
- [Data Type Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation.md) — Checks runtime values against predefined schemas to ensure they conform to expected data structures. ([source](https://cdn.jsdelivr.net/gh/sinclairzx81/typebox@main/README.md))
- [Runtime Schema Validations](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/runtime-schema-validations.md) — Executes schema checks against raw JavaScript data at runtime to ensure structural conformity.
- [Static Type Resolvers](https://awesome-repositories.com/f/software-engineering-architecture/static-type-resolvers.md) — Synchronizes runtime validation logic with TypeScript compile-time types to eliminate redundant type declarations.
- [Schema-Driven Type Inference](https://awesome-repositories.com/f/software-engineering-architecture/typescript-type-definitions/schema-driven-type-inference.md) — Maps JSON Schema keywords to corresponding TypeScript types to keep data shapes and code synchronized.
- [Schema Composition](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation/data-type-validation/object-shape-validation/schema-composition.md) — Provides the ability to construct complex JSON schemas by combining and merging reusable primitives.
- [Request Validation](https://awesome-repositories.com/f/software-engineering-architecture/request-validation.md) — Ensures incoming network requests conform to a specific schema before processing in the backend.

### Data & Databases

- [Schema Compilers](https://awesome-repositories.com/f/data-databases/schema-validation-libraries/schema-compilers.md) — Compiles JSON schema definitions into high-performance validator instances for rapid data integrity verification. ([source](https://cdn.jsdelivr.net/gh/sinclairzx81/typebox@main/README.md))
