Welcome to ast-to-entity-definitions! 🎉 This tool allows you to easily generate EntityDefinition and EntityPropertyDefinition from your TypeScript type information. By automating this process, you can streamline the generation of source code that interacts with your domain model.
The motivation behind creating this library was the observation that a significant portion of domain model-driven source code can be automatically generated based on the TypeScript type definitions. Since the domain model is typically well-defined, a lot of the boilerplate code (such as repository implementations, GraphQL resolvers, and test scaffolding) can be generated from the TypeScript types.
This library works by parsing the TypeScript abstract syntax tree (AST) and converting the type information into EntityDefinition and EntityPropertyDefinition objects. These objects can then be used to generate various types of code, such as:
The key features of this library include:
To get started, you can install the ast-to-entity-definitions package via npm or Yarn:
npm install ast-to-entity-definitions
or
yarn add ast-to-entity-definitions
Once installed, you can use the library in your project either through the provided CLI or by importing the getEntityDefinitions function directly.
We hope that ast-to-entity-definitions can help streamline your domain-driven development workflow. If you have any questions, feedback, or contributions, please don't hesitate to reach out!
Quick Links
Legal Stuff
Social Media