-
-
Notifications
You must be signed in to change notification settings - Fork 2
Home
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.
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.
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:
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.
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.
- 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.
The project roadmap outlines planned and long-term goals to enhance Fortify Schema:
- 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.
- 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.
Fortify Schema welcomes contributions from the community. Follow these steps to get involved:
- Pick a Task: Choose a TODO item from the TODO & Contributing Guide and claim it via a GitHub issue.
-
Setup: Clone the repository and install dependencies:
git clone <repository> cd fortify-schema npm install npm run test
-
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.
- 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.
Explore the full documentation suite for detailed information:
- Complete Documentation: Project overview and setup instructions.
- Quick Reference: Syntax and usage guide.
- Field Types Reference: Comprehensive list of field types and constraints.
- Examples: Real-world schema examples.
- Migration Guide: Instructions for migrating from Zod, Joi, or Yup.
- CHANGELOG.md: Release notes and version history.
- TODO & Contributing Guide: Development tasks and contribution steps.
- 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.
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