strapi/docs/3.0.0-beta.x/plugin-development/plugin-architecture.md
2019-05-24 16:31:20 +02:00

3.1 KiB

Plugin Folders and Files Architecture

The logic of a plugin is located at his root directory ./plugins/**. The admin panel related parts of each plugin is contained in the /admin folder. The folders and files structure is the following:

plugin/
├── config/ # Contains the configurations of the plugin
│     ├── functions/
│     │    └── bootstrap.js # Asynchronous bootstrap function that runs before the app gets started
│     ├── policies/ # Folder containing the plugin's policies
│     ├── queries/ # Folder containing the plugin's models queries
│     └── routes.json # Contains the plugin's API routes
├── controllers/ # Contains the plugin's API controllers
├── middlewares/ # Contains the plugin's middlewares
├── models/ # Contains the plugin's API models
└── services/ # Contains the plugin's API services