Roadmap & Planned Improvements
This document consolidates concrete DX (developer experience), API consistency, and extensibility improvement suggestions, based on an analysis of the library's current source code.
Note: Nothing here implies the library is broken — these are evolution opportunities for broader adoption and long-term maintainability.
1. Portuguese field naming
Problem
Schema properties use Portuguese names: nome, tamanho, obrigatorio, opcoes, valor, campos, passos, etc. This creates a barrier for:
- Adoption in international projects or multilingual teams
- Integration with libraries and tools that expect English identifiers
- Unfamiliar IntelliSense for non-Portuguese-speaking developers
Suggestion
Keep PT names as default (compatibility), but provide English aliases in the same type with a soft deprecation:
// Maintain backward-compatible type adapter
export interface FormFieldEN {
id: string; // alias for `nome`
size?: number; // alias for `tamanho`
required?: boolean; // alias for `obrigatorio`
options?: FieldOption[]; // alias for `opcoes`
fields?: FormField[]; // alias for `campos`
}
Or alternatively create a defineField() function that normalises both forms:
const field = defineField({ id: "email", type: "email", required: true });
// or equivalently:
const field = defineField({ nome: "email", tipo: "email", obrigatorio: true });