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:
- Create a folder under your appโs
plugins/directory following the layout in Whatโs in a plugin (andraclette.plugin.tsas in Plugin metadata). - 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).
What to read next (short path) โ
| Step | Topic | Where |
|---|---|---|
| Structure | Folders, entry files, optional frontend/backend | Whatโs in a plugin |
| Config | raclette.plugin.ts, entry paths | Plugin metadata |
| Backend | Fastify plugin, routes, payload, generation | Backend overview โ Golden Path โ Backend |
| UI | How to use + layout | Frontend overview |
| Deep dive | One long guide covering many topics | Plugin 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.