Core Concepts¶
This page introduces the fundamental concepts used by AutoCRUD.
AutoCRUD is built around a versioned resource model where each resource maintains a revision history and metadata.
Resource¶
A Resource is the logical entity stored in the system.
Examples:
- User
- Order
- Document
- Image
Each resource has a stable identifier:
Example:
The resource ID does not change across revisions.
Revision¶
A Revision represents a specific version of a resource.
Each revision has:
Immutable mode (default)¶
Using update or patch creates a new revision.
Draft mode (modify)¶
modify updates the current revision in-place.
This mode is intended for draft editing workflows.
Resource Metadata¶
Metadata is stored separately from resource data.
Example fields:
resource_id
current_revision_id
created_time
updated_time
created_by
updated_by
schema_version
is_deleted
Metadata is accessed via:
Resource Data¶
The data section contains the actual resource payload defined by the schema.
Example:
This section is returned via:
Revision Info¶
Revision info describes a specific version of a resource.
Example fields:
Accessed via:
ResourceManager¶
ResourceManager is the core component responsible for managing resources.
Responsibilities:
- create resources
- update revisions
- validate data
- enforce constraints
- manage metadata
- perform queries
Example:
Blob¶
AutoCRUD supports binary data through the Binary type.
Binary data is stored outside the main resource payload.
Example:
Binary storage:
Retrieval:
Query System¶
Resources can be queried using the QB (Query Builder) syntax.
Example:
This is the recommended query method.