📄️ What is a document model?
This chapter on Document Model Creation will help you with an in-depth practical understanding while building an advanced to-do list document model.
📄️ Specify the state schema
The state schema is the backbone of your document model. It defines the structure, data types, and relationships of the information your document will hold. In Powerhouse, we use the GraphQL Schema Definition Language (SDL) to define this schema. A well-defined state schema is crucial for ensuring data integrity, consistency, and for enabling powerful querying and manipulation capabilities.
📄️ Specify document operations
In the previous section, we defined the state schema for our document model. Now, we turn our attention to a critical aspect of document model creation: specifying document operations. These operations are the heart of your document's behavior, dictating how its state can be modified.
📄️ Use the Document Model Generator
When building document models with Vetra Studio, code generation happens automatically. As you add and update specification documents in your Vetra Studio Drive, Vetra monitors your changes and generates the necessary scaffolding in real-time. You'll receive updates directly in your terminal as Vetra processes your specifications.
📄️ Implement document reducers
The heart of document logic
📄️ Implement document model tests
Ensuring robustness and reliability
📄️ Example: Todo-demo-package
The Todo-demo is maintained by the Powerhouse Team and serves as a reference for testing and introducing new features. It will be continuously updated alongside the accompanying documentation.