By PluginPal
A production-ready starter template for building Strapi v5 plugins. Clone this repo, rename the plugin, and start building — the development environment, test infrastructure, linting, and CI pipeline are already wired up.

A production-ready starter template for building Strapi v5 plugins. Clone this repo, rename the plugin, and start building — the development environment, test infrastructure, linting, and CI pipeline are already wired up.
apps/
playground/ # Full Strapi v5 app with the plugin installed
packages/
dev-utils/ # Shared test utilities (setupStrapi, Playwright config, DB helpers)
plugins/
plugin-boilerplate/ # The plugin itself (admin + server)Managed with pnpm workspaces and Turborepo. Strapi and Playwright versions are pinned in the workspace catalog so all packages stay in sync.
The plugin ships with a minimal but complete scaffold:
Server
services/service.ts) with a getWelcomeMessage() methodcontrollers/controller.ts) that calls the service and returns the responseGET /api/plugin-boilerplate) wired to the controllerAdmin
HomePage component rendered at /admin/plugins/plugin-boilerplateInitializer component that marks the plugin as ready on mountreact-intl with a translations/en.json file ready to populategetTranslation helper that namespaces keys under the plugin IDTwo test layers are included out of the box:
Integration tests (Vitest + Supertest) — server/test/example.test.ts
setupStrapi() from dev-utilsE2E tests (Playwright) — admin/test/example.spec.ts
admin/test/setup/auth.setup.tspackages/dev-utils)A shared internal package used by both test layers:
| Export | What it does |
|---|---|
setupStrapi() | Boots a Strapi instance from the playground for integration tests |
stopStrapi() | Tears the instance down and cleans up |
createPlaywrightConfig(options) | Returns a full Playwright config with webServer, auth projects, and DB setup |
registerAuthSetup(authFilePath) | Registers the Playwright auth setup test (login + save session) |
dev-strapi (bin) | Starts the playground in dev mode and restarts Strapi automatically whenever compiled plugin output changes |
with-db (bin) | Wraps a command with an ephemeral DB — SQLite file or Postgres/MySQL database — and cleans it up on exit |
rename-plugin (bin) | Interactive CLI that renames the plugin across the entire repo in one command |
Biome handles both formatting and linting across the entire monorepo. It replaces ESLint and Prettier with a single fast tool. Config lives in biome.json at the root.
lint-staged runs automatically on every commit via a Husky pre-commit hook. It checks only the files you've staged:
*.{ts,tsx,js,json,...} — Biome lint + format (pnpm run lint)*.{ts,tsx,...} — TypeScript type-check (pnpm run lint:ts:server)GitHub Actions runs the full matrix on every push and PR to main/develop:
node_modules, built dist, and Playwright browser cache are all cached between runsVersioning, changelogs, and npm publishing are handled by Changesets. On every push to main, the Release workflow either opens/updates a Version Packages PR (when there are pending changesets) or, once that PR is merged, builds the plugin and publishes it to npm. See Releasing for details.
The repo is set up for coding agents (Claude Code, Cursor, Codex, Copilot, …):
AGENTS.md: the repo's conventions, commands and testing layout, read by any agent.
CLAUDE.md imports it for Claude Code..claude/settings.json registers the marketplace, and Claude Code offers to install the plugin
when you trust the folder. For other agents: npx skills add ayhid/strapi-skills.strapi-design-system skill..claude/brain/: what has been learned about working on the repo (a glossary, checked facts and a
retro log), committed so every session starts from it. Say "remember that" or "that went
wrong" and the brain-remember and brain-retro skills write to it. Adapted from
brain-template.pnpm installpnpm dev # SQLite (default)
pnpm dev:postgres # Postgres (requires Docker)
pnpm dev:mysql # MySQL (requires Docker)This starts the playground Strapi app with file-watching. Changes to the plugin's server/src or admin/src are picked up automatically.
Run the interactive rename command from the repo root:
pnpm rename-pluginIt will prompt you for:
| Prompt | Example |
|---|---|
| Plugin name (kebab-case Strapi ID) | my-awesome-plugin |
| Display name | My Awesome Plugin |
| Description | A Strapi plugin that does X |
| NPM scope (without @) | my-org |
| Author name | Jane Doe |
| Author email | jane@example.com |
| GitHub org or username | my-org |
| GitHub repository name | strapi-plugin-my-awesome-plugin |
| License | MIT |
Press Enter to keep any current value. When finished, the command updates all references across the repo (package names, plugin IDs, route paths, test URLs, README, changeset changelog repo) and renames the plugins/ directory. Then run:
pnpm install
pnpm buildAll test commands are run from the repo root.
Tests the server-side code (controllers, services, routes) against a real Strapi instance.
pnpm test:integration # SQLite
pnpm test:integration:postgres # Postgres (requires Docker)
pnpm test:integration:mysql # MySQL (requires Docker)Tests the admin UI end-to-end in a real browser. Playwright starts the playground automatically if it isn't already running.
pnpm test:e2e # SQLite
pnpm test:e2e:postgres # Postgres (requires Docker)
pnpm test:e2e:mysql # MySQL (requires Docker)pnpm build # Build all packages and the plugin
pnpm lint # Lint and format with Biome
pnpm lint:ts # TypeScript type-check (admin + server)
pnpm changeset # Add a changeset describing your changeReleases are managed with Changesets. If your change affects the published plugin, add a changeset describing it and commit it along with your change:
pnpm changesetWhen changes with changesets land on main, the Release workflow (.github/workflows/release.yml):
CHANGELOG.md (pnpm release:prepare). The Tests workflow is dispatched for that PR automatically.pnpm release:publish).Private workspace packages (apps/playground, packages/dev-utils) are never versioned or published.
Note: the release job is skipped in the
pluginpal/strapi-plugin-boilerplaterepo itself, since the boilerplate is a template and is never released. In a repo created from it, releases work without any changes.
Setup: the workflow publishes with npm trusted publishing (OIDC, id-token: write), so configure this repository and the release.yml workflow as a trusted publisher for your package on npmjs.com. Also enable Settings → Actions → General → Allow GitHub Actions to create and approve pull requests so the Version Packages PR can be opened.
plugins/plugin-boilerplate/
├── admin/
│ ├── src/
│ │ ├── index.ts # Plugin registration (menu link, lazy page load)
│ │ ├── pluginId.ts # PLUGIN_ID constant
│ │ ├── pages/
│ │ │ ├── App.tsx # Route wrapper
│ │ │ └── HomePage.tsx # Main plugin page
│ │ ├── components/
│ │ │ ├── Initializer.tsx # Marks plugin ready on mount
│ │ │ └── PluginIcon.tsx # Sidebar icon
│ │ ├── utils/getTranslation.ts # i18n key helper
│ │ └── translations/en.json # English strings
│ └── test/
│ ├── setup/auth.setup.ts # Playwright auth setup
│ └── example.spec.ts # E2E tests
├── server/
│ ├── src/
│ │ ├── index.ts # Plugin export (lifecycle + features)
│ │ ├── bootstrap.ts # Startup hook
│ │ ├── register.ts # Register hook
│ │ ├── destroy.ts # Teardown hook
│ │ ├── config/index.ts # Plugin config schema
│ │ ├── controllers/controller.ts # Request handler
│ │ ├── services/service.ts # Business logic
│ │ ├── routes/
│ │ │ ├── content-api/index.ts # Public API routes
│ │ │ └── admin/index.ts # Admin panel routes
│ │ ├── content-types/index.ts # Custom content types
│ │ ├── policies/index.ts # Custom policies
│ │ └── middlewares/index.ts # Custom middlewares
│ └── test/
│ └── example.test.ts # Integration tests
├── playwright.config.ts
└── vitest.config.tsShare your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
