Appearance
Document
Welcome to the heart of aeppic's data model: documents! At its core, every piece of data, configuration, and even code in aeppic is represented as a document. If you’re building or extending an aeppic based application, understanding documents is your first step to mastering the framework.
You can find the reference at Document
What is a Document?
A document is a single node in aeppic's hierarchical data model. Think of it as a self-contained piece of information that is part of a larger tree structure. Documents are:
- JSON-based: Simple, flexible, and easy to work with.
- Typed: Every document is associated with a form that defines its structure and rules.
- Dynamic: Documents can be created, updated, moved, or deleted via aeppic’s API.
Key Characteristics of a Document
Here’s what makes each document unique:
- ID: A unique identifier for the document, typically a UUID.
- Version: Tracks changes to the document. The initial version is always
"initial"
. It is abbreviated asv
. - Form: A reference to the form that defines the document’s schema and behavior. It is abbreviated as
f
. - Data: The actual content of the document, stored as a JSON object.
Anatomy of a Document
Let’s break down parts of a document (See reference):
json
{
"id": "12345",
"v": "initial",
"f": {
"id": "example-form",
"v": "initial",
"text": "Example Form"
},
"data": {
"name": "Sample Document",
"description": "This is a simple example of a document."
}
...
}