tachybase_todo/docs/en-US/development/index.md

62 lines
2.5 KiB
Markdown
Raw Normal View History

2022-11-05 08:38:07 +08:00
# Introduction
2022-11-05 08:38:07 +08: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.
<img src="https://www.nocobase.com/images/NocoBaseMindMapLite.png" style="max-width: 800px;" >
2022-11-05 08:38:07 +08: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.
<img src="./index/pm-built-in.jpg" style="max-width: 800px;" />
2022-11-05 08:38:07 +08:00
## Plugin Manager
2022-11-05 08:38:07 +08:00
NocoBase provides a powerful plugin manager for managing plugins. The flow of the plugin manager is as follows
<img src="./index/pm-flow.svg" style="max-width: 580px;" />
2022-11-05 08:38:07 +08:00
No-code Users can manage the activation and deactivation of local plugins through the interface at
<img src="./index/pm-ui.jpg" style="max-width: 800px;" />
Developers can also manage the complete plugin process by way of the CLI:
```bash
2022-11-05 08:38:07 +08:00
# Create the plugin
yarn pm create hello
2022-11-05 08:38:07 +08:00
# Register the plugin
yarn pm add hello
2022-11-05 08:38:07 +08:00
# Activate the plugin
yarn pm enable hello
2022-11-05 08:38:07 +08:00
# Disable the plugin
yarn pm disable hello
2022-11-05 08:38:07 +08:00
# Remove the plugin
yarn pm remove hello
```
2022-11-05 08:38:07 +08:00
For more plugin examples, see [packages/samples](https://github.com/nocobase/nocobase/tree/main/packages/samples).
2022-11-05 08:38:07 +08:00
## Extensibility
2022-11-05 08:38:07 +08:00
Whether it is generic functionality or personalization, it is recommended to write it as a plugin. NocoBase is extensible in all aspects.
2022-11-05 08:38:07 +08: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-11-05 08:38:07 +08:00
Distribution of modules.
- Server
- Collections & Fields: mainly used for system table configuration. Business tables are recommended to be configured in "Plugin Settings Manager - Collection manager".
2022-11-05 08:38:07 +08:00
- Resources & Actions: Mainly used to extend the Action API
- Middleware: Middleware
- Events: Events
- I18n: server-side internationalization
- Commands: Custom command lines
- Migrations: Migration scripts
- Client
2022-11-05 08:38:07 +08:00
- UI Schema Designer: Page Designer
- UI Router: When there is a need for custom pages
- Plugin Settings Manager: Provides configuration pages for plugins
2022-11-05 08:38:07 +08:00
- I18n: Client side internationalization