# @ghentcdh/crouton-api

Latest version **0.0.1-alpha.7** (published 2026-06-24) · 0 weekly downloads

## Install

```sh
npm install @ghentcdh/crouton-api
pnpm add @ghentcdh/crouton-api
yarn add @ghentcdh/crouton-api
bun add @ghentcdh/crouton-api
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.1-alpha.7 |
| Published | 2026-06-24 |
| First published | 2026-06-23 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 899.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Maintainers | flamsens, joren_gcdh, araath |

## Links

- npm: https://www.npmjs.com/package/@ghentcdh/crouton-api
- Repository: https://github.com/GhentCDH/crouton
- Homepage: https://github.com/GhentCDH/crouton#readme
- Issues: https://github.com/GhentCDH/crouton/issues
- npm.io page: https://npm.io/package/@ghentcdh/crouton-api

## Recent versions

- 0.0.1-alpha.7 (latest) — 2026-06-24
- 0.0.1-alpha.87 (alpha) — 2026-10-21
- 0.0.1-alpha.86 — 2026-10-19
- 0.0.1-alpha.85 — 2026-10-19
- 0.0.1-alpha.84 — 2026-10-16
- 0.0.1-alpha.83 — 2026-10-16
- 0.0.1-alpha.82 — 2026-10-08
- 0.0.1-alpha.81 — 2026-10-07
- 0.0.1-alpha.80 — 2026-10-07
- 0.0.1-alpha.79 — 2026-10-06
- 0.0.1-alpha.78 — 2026-10-01
- 0.0.1-alpha.77 — 2026-10-01
- 0.0.1-alpha.76 — 2026-09-29
- 0.0.1-alpha.75 — 2026-09-23
- 0.0.1-alpha.74 — 2026-09-23
- … 61 more at https://npm.io/package/@ghentcdh/crouton-api/versions

## README

<div align="center">
  <img src="./assets/crouton-logo.png" alt="crouton" width="300" />

<h3>wrap your CRUD in one neat package.</h3>

  <p><em><strong>C</strong>onfigure <strong>R</strong>esources <strong>O</strong>nce, <strong>U</strong>se <strong>T</strong>hem <strong>O</strong>ver and Over, <strong>N</strong>aturally</em></p>

[![Build](https://github.com/GhentCDH/crouton/actions/workflows/merge-request.yml/badge.svg)](https://github.com/GhentCDH/crouton/actions/workflows/merge-request.yml)
[![Publish](https://github.com/GhentCDH/crouton/actions/workflows/publish.yml/badge.svg)](https://github.com/GhentCDH/crouton/actions/workflows/publish.yml)
[![Publish Docs](https://github.com/GhentCDH/crouton/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/GhentCDH/crouton/actions/workflows/publish-docs.yml)
[![crouton-api](https://img.shields.io/npm/v/@ghentcdh/crouton-api.svg?label=crouton-api)](https://www.npmjs.com/package/@ghentcdh/crouton-api)
[![crouton-vue](https://img.shields.io/npm/v/@ghentcdh/crouton-vue.svg?label=crouton-vue)](https://www.npmjs.com/package/@ghentcdh/crouton-vue)
[![crouton-forms-vue](https://img.shields.io/npm/v/@ghentcdh/crouton-forms-vue.svg?label=crouton-forms-vue)](https://www.npmjs.com/package/@ghentcdh/crouton-forms-vue)
[![crouton-cli](https://img.shields.io/npm/v/@ghentcdh/crouton-cli.svg?label=crouton-cli)](https://www.npmjs.com/package/@ghentcdh/crouton-cli)
[![create-crouton](https://img.shields.io/npm/v/@ghentcdh/create-crouton.svg?label=create-crouton)](https://www.npmjs.com/package/@ghentcdh/create-crouton)

[Documentation](https://ghentcdh.github.io/crouton/) · [llms.txt](https://ghentcdh.github.io/crouton/llms.txt) · [llms-full.txt](https://ghentcdh.github.io/crouton/llms-full.txt)
</div>

---

> ⚠️ **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 |
| `@ghentcdh/crouton-forms-vue`  | Standalone `<CroutonForm>` component — embed a crouton form anywhere without the full admin UI        | 🚧 in development |
| `@ghentcdh/crouton-editor-vue` | Dev-mode resource editor UI — visual builder and `ResourceJsonEditor` component                       | 🚧 in development |
| `@ghentcdh/crouton-core`       | Shared browser-safe foundation — schema builders, filter models, request/response types               | 🚧 in development |
| `@ghentcdh/crouton-codegen`    | Shared Node-only codegen tooling — Prisma introspection, scaffolding, shell wrappers                  | 🚧 in development |
| `@ghentcdh/crouton-prisma`     | Prisma data-source adapter and Prisma-specific utilities                                              | 🚧 in development |
| `@ghentcdh/crouton-cli`        | `crouton` CLI — `create-datasource`, `update resources`, and dev server commands                      | 🚧 in development |
| `@ghentcdh/create-crouton`     | `npm create @ghentcdh/crouton` scaffolder — bootstraps a new project                                 | 🚧 in development |
| `@ghentcdh/add-crouton`        | `npx @ghentcdh/add-crouton` — adds crouton to an existing project                                    | 🚧 in development |

## How it works

1. **Define** your resource in a `resource.json` file — columns, operations, filters, relations
2. **Register** it with crouton-api — fully typed NestJS routes appear automatically
3. **Connect** the Vue components — tables, forms, and filters render from the schema with no extra config

```json
{
  "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 `/schemas`response
the Vue components consume, and a full admin UI — all from that one file.

## Installation

```sh
# API (NestJS)
pnpm add @ghentcdh/crouton-api

# Vue
pnpm add @ghentcdh/crouton-vue
```

## Development

This is an [Nx](https://nx.dev) monorepo with pnpm workspaces.

```sh
# Install dependencies
pnpm install

# Build all packages
npx nx run-many -t build

# Typecheck
npx nx run-many -t typecheck
```

### Packages

```
packages/
  crouton-api/        — NestJS CRUD framework (@ghentcdh/crouton-api)
  crouton-vue/        — Vue 3 admin UI components (@ghentcdh/crouton-vue)
  crouton-forms-vue/  — standalone CroutonForm component (@ghentcdh/crouton-forms-vue)
  crouton-editor-vue/ — dev-mode visual resource editor (@ghentcdh/crouton-editor-vue)
  crouton-core/       — shared browser-safe types & builders (@ghentcdh/crouton-core)
  crouton-codegen/    — shared Node-only codegen/Prisma tooling (@ghentcdh/crouton-codegen)
  crouton-prisma/     — Prisma data-source adapter (@ghentcdh/crouton-prisma)
  crouton-cli/        — crouton CLI (@ghentcdh/crouton-cli)
  create-crouton/     — npm create scaffolder (@ghentcdh/create-crouton)
  add-crouton/        — npx add-crouton for existing projects (@ghentcdh/add-crouton)
```

### Documentation

The docs site is built with [VuePress](https://vuepress.vuejs.org/). Each package documents itself in
`packages/<name>/docs/`; the site is assembled from those files.

```sh
# Serve the docs locally
pnpm docs:serve

# Build the docs site
pnpm docs:build
```

---



---

## License

This project is licensed under the **MIT License**. See the [LICENSE](./LICENSE) file for details.

## Credits

Bo Vandersteene, Ghent University.

Development by [Ghent Centre for Digital Humanities - Ghent University](https://www.ghentcdh.ugent.be/). Funded by
the [GhentCDH research projects](https://www.ghentcdh.ugent.be/projects).

<img src="https://www.ghentcdh.ugent.be/ghentcdh_logo_blue_text_transparent_bg_landscape.svg" alt="GhentCDH" width="500">

---
_Source: https://npm.io/package/@ghentcdh/crouton-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
