Glossary
Key terms and concepts used throughout the Locospec framework.
A reference list of key concepts and terms used across the Locospec ecosystem.
🔖 Spec
A Spec is a JSON definition that describes the structure and behavior of data, views, or actions in Locospec. Specs are used to generate APIs, forms, filters, tables, and more.
🗃 Model Spec
Defines the structure of a database entity. It includes attributes (fields), relationships, scopes, aliases, and optional config for soft deletes, primary keys, etc.
📊 View Spec
Describes how a collection of records should be displayed and queried. Includes filters, pagination, sorts, and table/list/kanban-style views.
📇 Entity Spec
Defines how a single record should be displayed using a sectioned layout. Typically used for detail pages, profile views, or cards.
⚙️ Mutator Spec
A declarative form specification for creating, updating, or deleting a record. Includes generators, validations, layout spec, and UI spec.
🔁 Action Spec
A low-level DB operation spec like insert, update, delete, or select. Typically used internally by mutators and views.
🧱 Attributes
Define the fields of a model or mutator. Includes type, label, generation rules, and validations. Can also be used to configure file inputs, JSON fields, and relationships.
🔍 Filters
Declarative logic for querying data. Can be simple ({ key: value }) or deeply nested with logical groups (and, or) and multiple operators like is, contains, etc.
🧠 Scopes
Reusable named filters defined at the model level. These can be referenced in views, mutators, or queries.
🪄 Aliases
Virtual fields that derive their value from other fields or relationships using source or transform. Helpful for exposing related values or computed fields.
🗂 Registry
The Registry is the runtime layer responsible for loading, validating, and caching specs. It ensures that each spec is structurally correct, complete, is available for execution, and can be reused efficiently across the system.
Think of it as the spec manager — it keeps everything typed, organized, and ready to run.
🔄 State Machine
The State Machine in Locospec is a JSON-defined task runner that enables conditional execution, branching logic, and context-driven workflows. It was originally introduced to handle advanced logic in mutators and views—allowing you to orchestrate multiple steps (like fetching data, validating, or transforming input) before committing an action.
Later, it was extended to support generators as well—powering dynamic payload generation for insert/update operations.
🧩 JSON Schema
The formal structure used to validate specs. Locospec follows JSON Schema Draft 07 to enforce structure and type safety.
🪪 Expand
A way to declare which relationships should be resolved and included when querying data. Used in Views, Entities, and Select Actions.
🚀 Rocket
A project scaffolding CLI/tool that connects to your database, reads structure, and auto-generates Locospec-compatible specs (model, view, entity, etc.).