{"library":"metadomain","title":"Metadomain","description":"Metadomain is a Metarhia core model library for defining database schemas using a meta-model approach. Current stable version is 1.0.10, with 2.0.0-alpha.2 available for testing. It provides a declarative schema definition using domain objects with relationships, validation, and hooks. Key differentiators: schema-driven data modeling integrated with Metarhia's Impress application server and other Metarhia libraries, supporting PostgreSQL and other databases. Released under the MIT license, it is part of the Metarhia ecosystem for building scalable Node.js applications.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install metadomain"],"cli":null},"imports":["import { Domain } from 'metadomain'","import { Schema } from 'metadomain'","import { Field } from 'metadomain'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { Domain, Schema, Field } from 'metadomain';\n\nconst schema = new Schema('example', {\n  fields: [\n    new Field('id').integer().primary(),\n    new Field('name').string(100).required(),\n    new Field('email').string().email(),\n  ],\n});\n\nconst domain = new Domain();\ndomain.entity('User', schema);\n\nconst user = domain.create('User', { name: 'John', email: 'john@example.com' });\nconsole.log(user.toObject());\n","lang":"typescript","description":"Demonstrates creating a domain, defining a schema with fields, and creating an entity instance.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}