strapi/docs/3.0.0-beta.x/plugin-development/plugin-architecture.md
Dan Dascalescu 8066bcd963
Fix grammar
2019-10-21 03:41:05 -05:00

3.1 KiB

Plugin Folders and Files Architecture

The logic of a plugin is located at its root directory ./plugins/**. The admin panel related parts of each plugin are contained in the /admin folder. The folders and files structure are 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