Skip to content

Getting started with plugins โ€‹

In raclette, plugins are the main way you add your own business logic on top of the framework: HTTP APIs, data, UI widgets, and integration hooks live in a plugin-shaped package the tooling knows how to load. This guide is about how raclette expects you to organize that code โ€” not about publishing to npm (that is optional and covered separately).

Before you write a plugin โ€‹

You need a running raclette app. The supported path is create-raclette-app (npx create-raclette-app or yarn create raclette-app), which scaffolds a full project with services, config, and a plugins/ directory where your code will live.

If you prefer to assemble a project by hand, you still need @raclettejs/core (and usually @raclettejs/workbench); see the same Getting Started page for raclette.config and scripts.

Your first plugin (local folder) โ€‹

Until a dedicated raclette CLI can generate plugin boilerplate for you, start from one of these:

  1. Create a folder under your appโ€™s plugins/ directory following the layout in Whatโ€™s in a plugin (and raclette.plugin.ts as in Plugin metadata).
  2. Copy an example from the cookbook or the monorepo (e.g. a minimal todo-style plugin) and rename the plugin id, author, and routes to match your domain.

The framework discovers plugins from the filesystem โ€” you do not manually register each file; you do need a valid raclette.plugin.ts and the expected entry paths (frontend/, backend/, โ€ฆ) so the loader can find your code.

Using a plugin from npm (not writing one) โ€‹

If you are consuming a published plugin instead of coding your own folder under plugins/, follow Installing npm plugins (dependency + raclette.config plugins list).

StepTopicWhere
StructureFolders, entry files, optional frontend/backendWhatโ€™s in a plugin
Configraclette.plugin.ts, entry pathsPlugin metadata
BackendFastify plugin, routes, payload, generationBackend overview โ†’ Golden Path โ€” Backend
UIHow to use + layoutFrontend overview
Deep diveOne long guide covering many topicsPlugin backend (full reference) (under Plugin Development โ†’ Backend โ†’ Advanced)

Recipes such as Setting up a Todo plugin walk through concrete edits step by step if you learn better by doing.