
wrap your CRUD in one neat package.
Configure Resources Once, Use Them Over and Over, Naturally
⚠️ Work in progress — crouton is still in active development. APIs, schemas, and components may change without notice; use at your own risk until a stable release is published.
A schema-driven CRUD framework for NestJS + Vue. Define your resources once in JSON — crouton handles the rest: API endpoints, data tables, forms, and filters.
Configure resources once. Use them over and over. No boilerplate, just filling.
Packages
| Package | Description | Status |
|---|---|---|
@ghentcdh/crouton-api | NestJS library — generates controllers, repositories, and /schemas endpoints from a resource.json | 🚧 in development |
@ghentcdh/crouton-vue | Vue 3 component library — renders data tables, forms, filters, and views driven by the schemas | 🚧 in development |
How it works
- Define your resource in a
resource.jsonfile — columns, operations, filters, relations - Register it with crouton-api — fully typed NestJS routes appear automatically
- Connect the Vue components — tables, forms, and filters render from the schema with no extra config
{
"name": "author",
"route": "authors",
"model": "author",
"operations": {
"findAll": true,
"findOne": true,
"create": true,
"update": true
},
"columns": {
"id": {
"hiddenInForm": true,
"idField": true
},
"name": {
"searchable": true,
"filterable": true
},
"bio": {
"fieldInput": {
"type": "textarea"
}
}
}
}That's it. You get a paginated list endpoint, a detail endpoint, create/update with Zod validation, a /schemasresponse the Vue components consume, and a full admin UI — all from that one file.
Installation
# API (NestJS)
pnpm add @ghentcdh/crouton-api
# Vue
pnpm add @ghentcdh/crouton-vueDevelopment
This is an Nx monorepo with pnpm workspaces.
# Install dependencies
pnpm install
# Build all packages
npx nx run-many -t build
# Typecheck
npx nx run-many -t typecheckPackages
packages/
crouton-api/ — NestJS CRUD framework
crouton-core/ — shared schema & builder logic, published as @ghentcdh/crouton-core
crouton-vue/ — Vue 3 UI components
crouton-coreis published as@ghentcdh/crouton-core. It is bundled intocrouton-apiandcrouton-vue, but can also be used directly for offline schema compilation viaparseSchema.
Documentation
The docs site is built with VuePress. Each package documents itself in packages/<name>/docs/; the site is assembled from those files.
# Serve the docs locally
pnpm docs:serve
# Build the docs site
pnpm docs:buildLicense
This project is licensed under the MIT License. See the LICENSE file for details.
Credits
Bo Vandersteene, Ghent University.
Development by Ghent Centre for Digital Humanities - Ghent University. Funded by the GhentCDH research projects.