# Architecture Style Guide ## Plugin Architecture These are a collection of architectural styles to follow when building Kibana plugins. This includes applications meant to be accessed from the Kibana sidebar, as applications are simply one type of plugin. ### File and Folder Structure Kibana plugins, both in core and those developed independent of Kibana, should follow this basic file and folder structure: ``` plugin_root: . ├── common/ ├── public/ ├── server/ └── index.js ```
kibana
server object and initializes your application. This is where you define things like the id, any uiExports, dependencies on other plugins and applications, any configuration, any initialization code, and the location of the public folder.plugins/{id}
, where id
is what you defined in the plugin entry point. If your application's id
is utile
, and you were trying to import a module from public/lib/formatter.js
, you could import the module as plugins/utile/lib/formatter
.
../common
to your public code, you could use webpackShims to resolve the path without traversing backwards.