Skip to content
NEHONIX edited this page Jun 17, 2025 · 3 revisions

Fortify Schema Wiki

Welcome to the Fortify Schema wiki! This page provides an overview of the project, its current status, roadmap, and guidelines for contributing. It serves as a central resource to document the development of Fortify Schema, a TypeScript-first schema validation library designed for precision, performance, and ease of use.

Overview

Fortify Schema is a lightweight, zero-dependency library that offers an intuitive interface-based syntax for defining and validating schemas. Built with TypeScript in mind, it provides precise type inference, strict validation by default, and a range of features for modern applications. The library is designed to be tree-shakable, with a small bundle size, making it suitable for both server-side and client-side use.

Key features include:

  • Interface-like schema definition.
  • Support for basic types (string, number, boolean, date) and advanced types (arrays, unions, records).
  • Conditional validation with TypeScript inference.
  • Transformation utilities for schema manipulation.
  • Runtime type inference from sample data.

For detailed usage, refer to the Quick Reference and Examples.

Current Status

As of June 17, 2025, Fortify Schema is actively developed with a mix of stable and in-progress features. The following summarizes the current state:

Stable Features

The following features are production-ready:

  • Basic Schema Definition: Define schemas with constraints like "positive", "string(2,50)", and "email".
  • Conditional Validation: Support for conditional fields using "when role=admin *? string[] : string[]?".
  • Runtime Type Inference: Generate schemas from sample data with Make.fromSample().
  • Record Types: Validate key-value pairs with "record<string,any>".

See Examples for working code.

Work in Progress

The following features are under development and not yet stable:

  • TypeScript Compiler API Integration: Compile-time conversion of TypeScript types to schemas (e.g., Make.fromType<T>()).
  • Interface Schema Generation: Automatic schema creation from TypeScript interfaces (e.g., Make.fromInterface<T>()).

Details on these and other TODO items are available in the TODO & Contributing Guide.

Recent Changes

  • Added conditional validation and schema transformation utilities.
  • Fixed regex pattern validation and improved type inference.
  • Enhanced documentation with guides and examples.

For a full changelog, see CHANGELOG.md.

Roadmap

The project roadmap outlines planned and long-term goals to enhance Fortify Schema:

Upcoming Features

  • Async Validation: Support for asynchronous validation rules.
  • Internationalization: Multi-language error messages.
  • Plugin System: Extensible validation plugins.
  • Performance Monitoring: Built-in metrics for validation performance.
  • Custom Error Formatting: Flexible error message customization.

Long-term Goals

  • Runtime Schema Generation: Generate schemas from TypeScript types.
  • Advanced Introspection: Tools for schema analysis and documentation.
  • IDE Integration: VSCode extension with real-time previews and auto-completion.
  • Framework Integrations: Native support for popular frameworks.

Track progress and contribute ideas in the TODO & Contributing Guide and CHANGELOG.md.

How to Contribute

Fortify Schema welcomes contributions from the community. Follow these steps to get involved:

  1. Pick a Task: Choose a TODO item from the TODO & Contributing Guide and claim it via a GitHub issue.
  2. Setup: Clone the repository and install dependencies:
    git clone <repository>
    cd fortify-schema
    npm install
    npm run test
  3. Guidelines:
    • Keep files under 500 lines, using modules as needed.
    • Include comprehensive tests for all changes.
    • Update documentation (e.g., README.md, EXAMPLES.md).
    • Maintain backward compatibility and follow TypeScript best practices.
  4. Submit Changes: Create a feature branch, commit with tests, and submit a pull request with a clear description.

For more details, see the TODO & Contributing Guide.

Documentation

Explore the full documentation suite for detailed information:

Contact & Support

  • Issues: Report bugs or request features via GitHub Issues.
  • Discussions: Share ideas and ask questions in GitHub Discussions.
  • Examples: Review working code in the examples/ folder.

Contributors

Thank you to all contributors who help improve Fortify Schema!


Last Updated: June 17, 2025, 09:40 AM GMT
Next Review: Upon completion of TypeScript Compiler API integration MIGRATION.md QUICK-REFERENCE.md README.md EXAMPLES.md FIELD-TYPES.md