Whatβs in a plugin β
A raclette plugin is a directory with a fixed contract to the framework: one metadata file, then optional frontend/ and backend/ trees. The loader uses that layout to register HTTP routes, frontend widgets, generated config, and more.
- The frontend side exposes
frontend/index.ts(plugin API), routes, and widgets for the UI. - The backend side exposes
backend/index.tsand typically routes, models, and services β see Backend overview.
This page stays short on purpose. The same layout is also documented from a repository perspective in Directory structure β plugins/.
Canonical folder layout β
The diagram below is the usual shape for a plugin that has both frontend and backend (names like examplePlugin are placeholders):
exampleCreator__examplePlugin/
βββ raclette.plugin.ts # Main plugin configuration
βββ frontend/ # Frontend-side code (if frontendDir specified)
β βββ [...] # See plugin metadata for more
β βββ widgets/ # Plugin widgets
β βββ Example/ # Your custom Widget folder name
β β βββ ExampleWidget.vue # The widget File. Needs to follow this structure "[CustomName]Widget.vue"
β β βββ setup.ts # Contains details and config for the widget
β β βββ [...]
β βββ [...]
βββ backend/ # Server-side code (if backendDir specified)
βββ index.ts # Server entry point
βββ example.model.ts # The model for your dataType. Currently mongoose
βββ example.schema.ts # The schema for your dataType. Fastify schema, validations etc
βββ example.service.ts # The services for your dataType ie the actuall backend business logic
βββ routes/ # API routes
βββ helpers/ # Business logic helpers and utilsDetails of raclette.plugin.ts
Required configuration β
Every plugin needs raclette.plugin.ts (plugin metadata: name, author, entry paths, β¦). See Plugin metadata for fields and examples.
Optional parts β
- No
backend/β frontend-only plugins are valid (widgets + client-only behavior). - No
frontend/β backend-only plugins are valid (APIs without custom UI).
See also β
- Getting started with plugins
- Frontend overview
- Installing npm plugins (official / npm packages)
- Golden Path β Backend overview