📄️ What is a document model?
This chapter on Document Model Creation will help you with an in depth practicial 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
In the Powerhouse Document Model development workflow, after specifying your document model's state schema and operations within the Connect application and exporting it as a .phdm.zip file, the next crucial step is to translate this specification into a tangible codebase. This is where the Powerhouse Document Model Generator comes into play.
📄️ Implement document reducers
The heart of document logic
📄️ Implement document model tests
Ensuring robustness and reliability
📄️ Example: Todo-demo-package
The Todo-demo-package 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.