This glossary defines the key terms and concepts used throughout Nuxt Crouton documentation.
Server-side route that handles HTTP requests for a collection. Nuxt Crouton generates RESTful endpoints for CRUD operations:
GET /api/teams/[teamId]/[layer]-[collection] - List itemsPOST /api/teams/[teamId]/[layer]-[collection] - Create itemPATCH /api/teams/[teamId]/[layer]-[collection]/[id] - Update itemDELETE /api/teams/[teamId]/[layer]-[collection]/[id] - Delete itemSee also: Server API
Fields automatically added to every collection by the generator:
id - Always added (primary key)teamId, owner - Always added (team-scoped by default)createdAt, updatedAt, createdBy, updatedBy - Added when useMetadata: true (default)Important: Never define these manually in your schema.
See also: Schema Format
Process of clearing cached data when underlying data changes. Nuxt Crouton automatically invalidates caches after mutations using refreshNuxtData().
Example:
// Invalidate all queries for a collection
await refreshNuxtData((key) => key.startsWith('collection:products:'))
See also: Caching
The fundamental building block of Nuxt Crouton. A collection represents a data model (like products, users, or posts) and includes:
Naming: Always use plural names (products, not product)
See also: Collections
JSON file that defines the structure of a collection, including:
refTarget)Location: schemas/[name].json
See also: Schema Format
Replacing a generated component with your own custom implementation by creating a component with the same name in your layer.
Example:
layers/shop/collections/products/app/components/
└── _Form.vue ← Generated form, yours to customize
See also: Customization
Vue Composition API function that encapsulates reusable logic. Nuxt Crouton provides composables for data operations:
useCollectionQuery() - Fetch datauseCollectionMutation() - Create/update/deleteuseCrouton() - Open forms in modals/slideovers/dialogsuseNotify() - User notificationsNaming: Always start with use prefix
See also: Composables API
The base Nuxt Crouton framework code in node_modules/@fyit/crouton. This code is never modified directly.
See also: Architecture
Create, Read, Update, Delete - The four basic operations for persistent storage. Nuxt Crouton auto-generates CRUD operations for every collection.
Software design approach that organizes code by business domain rather than technical function. Nuxt Crouton uses layers to implement DDD.
Example:
layers/
├── shop/ # Shop domain (products, orders)
├── blog/ # Blog domain (posts, authors)
└── auth/ # Auth domain (users, sessions)
See also: Architecture
TypeScript ORM (Object-Relational Mapping) used by Nuxt Crouton for database operations. Provides type-safe query builder.
External: Drizzle ORM Docs
See also: Drizzle Integration
A property of a collection that represents a single piece of data (like title, price, createdAt).
Field Types:
string, textnumber, decimalbooleandatejson, repeater, arrayimage, fileReferences use type: "string" with a refTarget property.
Naming: Use camelCase (firstName, isActive, publishedAt)
See also: Schema Format
Auto-generated Vue component that renders a form for creating/editing collection items. Includes validation, error handling, and save/cancel actions.
Component: _Form.vue (generated per collection)
Customization: Edit the generated _Form.vue directly, as it lives in your project.
See also: Forms
Code automatically created by the Nuxt Crouton CLI based on your collection schemas. Includes components, composables, API routes, and database schema.
Location: layers/[collection-name]/
Regeneration: Safe to regenerate without losing customizations if you follow conventions
See also: Generated Code
A Nuxt layer created by the Nuxt Crouton generator for a specific collection or domain. Contains all generated code for that collection.
Example:
layers/products/ ← Generated layer for products collection
├── components/
├── composables/
├── server/
└── types/
See also: Layers
Multi-language support feature that allows translating collection fields into multiple languages.
Status: Stable ✅
See also: Internationalization
Nuxt's mechanism for extending applications with reusable code. Nuxt Crouton uses layers to organize collections by domain.
Types:
@fyit/crouton)layers/products/)@fyit/crouton-i18n)External: Nuxt Layers Guide
See also: Architecture
Database schema change managed by Drizzle ORM. Generated automatically when schemas change.
See also: Migration Guide
Operation that modifies data (create, update, delete). In Nuxt Crouton, handled by useCollectionMutation() or useCroutonMutate().
See also: Mutation Composables API, Data Operations
Component library used by Nuxt Crouton for UI elements (forms, tables, modals, buttons, etc.).
Version: Nuxt Crouton uses Nuxt UI v4
External: Nuxt UI Docs
Splitting large datasets into smaller pages for performance and usability.
See also: Patterns - Tables
Operation that retrieves data without modifying it. In Nuxt Crouton, handled by useCollectionQuery().
useCollectionQuery patterns including filters and sorting, see Querying Data.See also: Querying Data
A field that creates a relationship between collections. Uses type: "string" with a refTarget property to specify the target collection.
Example:
{
"authorId": { "type": "string", "refTarget": "users" }
}
See also: Relations
Property of a reference field that specifies which collection it points to. Must be a plural collection name.
Example:
{ "categoryId": { "type": "string", "refTarget": "categories" } }
See also: Relations
Connection between two collections, implemented using reference fields.
Types:
See also: Relations
Vue mechanism for customizing component content. Generated components like _Form.vue and List.vue live in your project and can be edited directly for customization.
See also: Customization
Label indicating production-readiness of a feature:
See also: Features Overview
Auto-generated Vue component that displays collection items with sorting, filtering, and pagination.
Component: List.vue (generated per collection)
Customization: Edit the generated List.vue directly, as it lives in your project.
See also: Tables
TypeScript feature that catches errors at compile-time. Nuxt Crouton generates TypeScript types for all collections.
Example:
import type { Product } from '~/layers/shop/collections/products/types'
const { items } = await useCollectionQuery<Product>('products')
// items is typed as Product[]
See also: TypeScript Types
Checking data against rules before saving. Nuxt Crouton uses Zod for schema validation.
Example:
import { z } from 'zod'
const schema = z.object({
title: z.string().min(1, 'Required'),
price: z.number().min(0, 'Must be positive')
})
See also: Forms
JSON format used for collection schema definitions.
Example:
{
"title": { "type": "string", "meta": { "required": true } },
"description": { "type": "text" }
}
See also: Schema Format