Collections System
Collections define structured project data: a schema, layouts, JSON-backed entries, relationships and collection-scoped assets. Use them when an App needs data such as exhibitors, sessions, submissions or structured content. Defining a schema, granting an App access, accepting an entry and publishing that entry are separate operations.
Set up a collection
- In the selected project's Collections area, create a name and stable slug. Collection URLs use that slug; entry and asset resources have their own IDs.
- Add field definitions and arrange them in sections/layouts. Configure required fields, options, validation and supported relationships before importing data.
- Configure status, submission/authentication settings, group rules and applicable constraints. An
activestatus or public-submission setting is not a permission grant. - Create representative entries and assets. Check required/nullable fields, updates, excluded fields, relationship IDs and asset ownership.
- For an installed App, declare and bind the supported collection dependency and operations in the current Developer Hub/API catalog. Preserve the installation's project and structural parent binding.
- Test authorized and excluded admin/attendee/guest contexts through the intended runtime interface, then verify the resulting saved data and read responses.
The collection setup and lifecycle guide (repository reference: ../../../developer-tools/getting-started/collections.md) provides the detailed dashboard workflow, entry JSON, import/export and recovery procedure. Browser Apps should use their runtime/page context; dashboard admin-session routes are a separate interface.
Permissions and audience boundaries
| Resource | Read permission | Mutation permission |
|---|---|---|
| Collection design | view_collections | manage_collections |
| Entries | view_collection_entries | manage_collection_entries |
| Collection assets | view_collection_assets | manage_collection_assets |
These are project dashboard policy mappings, not a promise that every browser/API principal uses an admin session. Installed-page grants, data scopes and the selected endpoint's principal still matter. A readable collection definition does not grant every entry, field, target relationship or file.
The collection API's fetch query also applies project/tag/data scoping and the collection's own audience rules. Entry relation fetching checks the parent collection's audience gate and can return 404 for an excluded attendee/guest. Test the particular operation rather than interpreting 404 as proof the slug is absent or assuming all asset/write paths share the same helper. Layout filtering controls accepted submission data; it is not a complete read-isolation policy.
Schemas, layouts and relationships
The raw CollectionFieldDefinition.field_type families are input, option-select, boolean, picker, file, display and relationship. Text/number/email, select/multiselect, checkbox/toggle and date/image controls are styles or family-specific configuration; do not submit those UI labels as interchangeable raw types. Keep field_style, options, validation and configuration compatible with the selected family.
Field definitions describe data; sections place fields in the editor; form layouts select/order fields for a caller context. The entry API currently selects portal layout for an Attendee and admin layout otherwise, then delegates fallback to the layout service. A stored public layout or a missing preferred layout does not independently establish guest authorization or deny all fields.
Relationship types include belongs_to, has_many and belongs_to_many. The current target enum includes collection entries, attendees, credential types, groups and agenda items; it does not expose the commented-out asset/custom-model targets as supported cases. Computed has-many values and writable references have different behavior. Use valid target configuration and project-owned IDs, and test absent/deleted/excluded targets.
Schema import/export copies design rather than migrating all entries/files or guaranteeing every relationship target can be mapped in another project. Review the regenerated fields, layouts, slug and target bindings before writing data.
Entries and constraints
Entry creation resolves the caller layout, builds dynamic rules, filters accepted data and invokes the entry service. Use the nested data payload documented in the setup guide. Updates merge accepted keys: omitted keys are not a universal delete instruction. Creation, status and later publication should be checked separately.
The constraint enforcer supports field-combination uniqueness, attendee-submitter limits and referenced capacity. Submitted-by uniqueness and max-per-submitter checks depend on an Attendee submitter context; other contexts do not receive the same limits. Global uniqueness and applicable capacity checks are separate. Invalid/incomplete constraint configuration can skip checks, and unchanged constrained values have special update handling. Test valid and rejected writes, not just the settings UI.
The enforcer takes a collection-row lock and service writes use transactions. That source ordering does not certify every production concurrency case, cross-collection capacity race, batch failure outcome or direct custom write that bypasses the service.
Versioned API surface
Use the selected portal/API host and /api/v1/projects/{teamSlug}/{projectSlug} base. Collection parents resolve by slug. The registered Orion operations are:
| Resource below the project base | Registered operation families |
|---|---|
/collections and /collections/{collection} | Collection list, detail and search; collection design creation/update is not registered in this versioned route group |
/collections/{collection}/entries | Entry list/detail/create/update/search/delete and batch store/update/delete |
/collections/{collection}/assets | Asset list/detail/create/update/search/delete |
Inspect the deployed REST API reference for exact operation IDs, search/batch envelopes, methods and credential requirements. The older generic POST /collections design-creation example was incorrect for this API group. Dashboard design-management routes remain distinct.
Population and asset responses
Entry list/search results populate named relationships when requested; populate=* on index is rejected with 422. Entry detail defaults to all relationship population unless populate=none is supplied. Population uses depth, cycle, per-relation and total-row guards; expanded results can be truncated. Preserve raw-ID workflows where needed and inspect the intended target shape rather than assuming unbounded recursive expansion.
The current population service declares a depth guard of three and a per-relation guard of 50. Its total-row budget defaults to 1,000 and reads collections.max_populated_rows at runtime. Those are implementation guards, not performance or completeness guarantees.
The entry controller's index/detail response hooks resolve numeric file-field references through AssetResolutionService. Lookup is restricted to the current collection and includes soft-deleted assets; a missing numeric reference can become null. This is not proof that every possible GET/write response uses that resolver or that a deleted file remains available. Signed/variant URLs depend on actual storage and processing, expire or fall back according to the upload configuration, and must not be treated as durable identifiers. See File Uploads and Storage.
Architecture and storage
Project
└── Collection
├── CollectionSection → CollectionSectionField → field placement
├── CollectionFieldDefinition → typed data/configuration
├── CollectionFormLayout → caller-context presentation
├── CollectionEntry → JSON-backed data and lifecycle
└── CollectionAsset → scoped uploaded files
Database Tables
| Table | Purpose |
|---|---|
collections | Definitions (name, slug, settings, asset_classes, constraints) |
collection_field_definitions | Typed field schemas (type, style, validation, options, field_config) |
collection_form_layouts | Per-context form layouts (admin/portal/public) |
collection_entries | Data rows with JSONB data column (GIN indexed) |
collection_sections | Visual grouping of fields in the builder |
collection_section_fields | Pivot: section ↔ field with sort order and column width |
collection_assets | File uploads with Uploadable trait, scoped by asset_class |
Detailed documentation
| Document | Description |
|---|---|
Collection setup and lifecycle (repository reference: ../../../developer-tools/getting-started/collections.md) | Dashboard setup, permissions, exact entry payload, export and recovery |
| frontend/README.md | GXP plugin API guide — setup, CRUD, filtering, relationships, constraints |
| frontend/api-service-module.md | Drop-in collections.js service module for plugins |
Related
Review and runtime acceptance
This overview's source and document-reader review is recorded in repository docs/collections-overview-review-2026-10-14.md and docs/coverage/collections-overview-source-snapshot.json. The linked setup guide retains an exact entry-example fixture and native collection/entry/definition service checks: 74 cases/245 assertions passed in an isolated SQLite environment. Their recorded source files still match; this overview change did not rerun or expand those tests.
That evidence does not certify the Orion HTTP surface, installed-page/attendee/guest isolation, every relationship target, batch partial failures, signed storage transfers, production locking or provider outputs. Test those with the actual selected principal and deployment before relying on the collection for access or production submission limits. The detailed frontend/API service guides have separate review status.