2022-11-05 00:38:07 +00:00
# Introduction
2022-10-31 03:52:17 +00:00
2022-11-05 00:38:07 +00:00
NocoBase adopts microkernel architecture, functions are extended in the form of plugins. Front and back ends are separated. Various plugin interfaces are provided, and plugins are divided by functional modules with pluggable features.
2022-10-31 03:52:17 +00:00
2022-10-31 14:41:24 +00:00
< img src = "https://www.nocobase.com/images/NocoBaseMindMapLite.png" style = "max-width: 800px;" >
2022-11-05 00:38:07 +00:00
The pluggable design reduces the coupling between modules and increases the reuse rate. As the plugin library continues to expand, common scenarios require only a combination of plugins to complete the base build. NocoBase's no-code platform, for example, is a combination of various plugins.
2022-10-31 14:41:24 +00:00
< img src = "./index/pm-built-in.jpg" style = "max-width: 800px;" / >
2022-10-31 03:52:17 +00:00
2022-11-05 00:38:07 +00:00
## Plugin Manager
2022-10-31 03:52:17 +00:00
2022-11-05 00:38:07 +00:00
NocoBase provides a powerful plugin manager for managing plugins. The flow of the plugin manager is as follows
2022-10-31 03:52:17 +00:00
2022-10-31 14:41:24 +00:00
< img src = "./index/pm-flow.svg" style = "max-width: 580px;" / >
2022-11-05 00:38:07 +00:00
No-code Users can manage the activation and deactivation of local plugins through the interface at
2022-10-31 03:52:17 +00:00
2022-10-31 14:41:24 +00:00
< img src = "./index/pm-ui.jpg" style = "max-width: 800px;" / >
2022-11-05 00:38:07 +00:00
Developers can also manage the complete plugin process by way of the CLI:
2022-10-31 03:52:17 +00:00
```bash
2022-11-05 00:38:07 +00:00
# Create the plugin
2022-10-31 03:52:17 +00:00
yarn pm create hello
2022-11-05 00:38:07 +00:00
# Register the plugin
2022-10-31 03:52:17 +00:00
yarn pm add hello
2022-11-05 00:38:07 +00:00
# Activate the plugin
2022-10-31 03:52:17 +00:00
yarn pm enable hello
2022-11-05 00:38:07 +00:00
# Disable the plugin
2022-10-31 03:52:17 +00:00
yarn pm disable hello
2022-11-05 00:38:07 +00:00
# Remove the plugin
2022-10-31 03:52:17 +00:00
yarn pm remove hello
```
2022-11-05 00:38:07 +00:00
For more plugin examples, see [packages/samples ](https://github.com/nocobase/nocobase/tree/main/packages/samples ).
2022-10-31 03:52:17 +00:00
2022-11-05 00:38:07 +00:00
## Extensibility
2022-10-31 03:52:17 +00:00
2022-11-05 00:38:07 +00:00
Whether it is generic functionality or personalization, it is recommended to write it as a plugin. NocoBase is extensible in all aspects.
2022-10-31 03:52:17 +00:00
2022-11-05 00:38:07 +00:00
- It can be user-intuitive interface-related page modules, block types, action types, field types, etc.
- Filters, validators, access restrictions, etc. for enhancing or restricting the HTTP API
- It can also be enhancements to underlying data tables, migrations, events, command lines, etc.
2022-10-31 03:52:17 +00:00
2022-10-31 14:41:24 +00:00
2022-11-05 00:38:07 +00:00
Distribution of modules.
2022-10-31 14:41:24 +00:00
- Server
2022-11-05 00:38:07 +00:00
- Collections & Fields: mainly used for system table configuration. Business tables are recommended to be configured in "Settings Center - Collection manager".
- Resources & Actions: Mainly used to extend the Action API
- Middleware: Middleware
- Events: Events
- I18n: server-side internationalization
- Commands: Custom command lines
- Migrations: Migration scripts
2022-10-31 14:41:24 +00:00
- Client
2022-11-05 00:38:07 +00:00
- UI Schema Designer: Page Designer
- UI Router: When there is a need for custom pages
- Settings Center: Provides configuration pages for plugins
- I18n: Client side internationalization