Plugin structure
When creating a plugin with Plugin SDK, Strapi generates the following boilerplate structure for you in the /src/plugins/my-plugin
folder:
- TypeScript-based plugins
- JavaScript-based plugins
The following diagram is interactive: you can click on any file or folder name highlighted in purple to go to the corresponding documentation section.
. # root of the plugin folder (e.g., /src/plugins/my-plugin)
├── admin # Admin panel part of your plugin.
│ ├── src
│ │ ├── components # Contains your front-end components
│ │ │ ├── Initializer.tsx # Plugin initializer
│ │ │ └── PluginIcon.tsx # Contains the icon of your plugin in the main navigation
│ │ ├── pages # Contains the pages of your plugin
│ │ │ ├── App.tsx # Skeleton around the actual pages
│ │ │ └── HomePage.tsx # Homepage of your plugin
│ │ ├── translations # Translations files to make your plugin i18n-friendly