vtseditor
v1.0.5
Published
VTS Editor
Readme
VTS & VTS-Editor
📦 VTS — Type-Safe Data Validation in TypeScript
🧰 Key Features
- ✅ Simple validators like isString(), isFunction(), etc.
- 🧠 Strict type guards for maximum safety and reliability.
- 🧱 Composable schema classes for defining structured, reusable validation logic.
- 💡 Built with TypeScript types in mind — works seamlessly with typeof, instanceof, and conditional typing.
Read more by VTS project: https://github.com/OpenSourcePKG/vts
🎨 VTS-Editor
The VTS Editor is a graphical tool for building and managing VTS schemas visually. It provides a drag-and-drop interface where developers can create, modify, and connect schema definitions without writing raw code.
With the editor, you can:
- 📄 Define new schema types with fields and inheritance.
- 🔗 Create references between schemas (e.g. nested types or extensions).
- 💾 Export/import schemas as JSON
- 🔍 Get an overview of schema structure and dependencies at a glance.
- ⚙️ Automatically generate TypeScript schema and type files
- ✅ Drag and Drop
- 🧠 AI Provider support
This is especially useful for large projects, team collaboration, or when sharing schema definitions with non-developers.
Screenshots
Schema in use
Schema with Extend
Schema edit
Schema field edit
AI Schema create
Output
The schemas are generated in Typescript and the result is the schema/enum and the type:
// Import section - automatically generated
import {ExtractSchemaResultType, Vts} from 'vts';
import {SchemaName1, SchemaName2} from './relative/path.js';
import {ExternalSchema} from 'external-package';
// Enum definitions (if present)
export enum StatusEnum {
'active' = 'active',
'inactive' = 'inactive',
}
// Schema definitions
export const UserSchema = Vts.object({
id: Vts.string({description: 'User identifier'}),
status: Vts.enum(StatusEnum),
profile: ProfileSchema,
}, {
description: 'User entity schema',
objectSchema: {
ignoreAdditionalItems: true
}
});
// TypeScript type definitions (optional)
export type User = ExtractSchemaResultType<typeof UserSchema>;Install
install the vts editor
Github
a) for your project:
npm install --save-dev git+https://github.com/stefanwerfling/vtseditor.gitb) or for global:
npm install -g git+https://github.com/stefanwerfling/vtseditor.gitnpm
a) for your project:
npm install --save-dev vtseditorb) or for global:
npm install -g vtseditorcreate your config
vtseditor.jsonexample:{ "projects": [ { "schemaPath": "./schemas/schema.json", "code": { "schemaPrefix": "Schema", "createTypes": true, "createIndex": true, "codeComment": true, "codeIndent": " " }, "autoGenerate": false, "destinationPath": "./schemas/src", "destinationClear": false, "scripts": { "before_generate": [], "after_generate": [ { "path": "./schemas", "script": "npm run compile" } ] } } ], "server": { "port": 5173 }, "browser": { "open": true } }Read more by Config-Description.
start the vts editor
npx vtseditoropen the vts editor in your browser: http://localhost:5173
create your schemas, have fun
🧠 Configuring AI Providers in VTS Editor
The VTS Editor can connect to different AI providers to help you generate or refine your schemas 🚀.
Currently supported providers are:
- Gemini (Google AI Studio)
- LocalAI (self-hosted)
- OpenAI
Read more by Config-AI-Description.
🛠️ Contributing
Contributions welcome! Feel free to submit issues, suggestions, or pull requests.
Supported by
Special thanks to the following companys:
Contributors
Special thanks to the following contributors:
