Plugin System
Ever Gauzy uses a modular plugin architecture that allows extending the platform with new features, integrations, entities, and UI components without modifying the core codebase.
Plugin Architecture
Plugin Types
Backend Plugins
Backend plugins can add:
| Capability | Description |
|---|---|
| Entities | New database tables/columns |
| Controllers | New API endpoints |
| Services | Business logic |
| Commands/Queries | CQRS handlers |
| Event Handlers | React to platform events |
| Middleware | Request processing |
| Guards | Authorization rules |
UI Plugins
UI plugins provide:
| Capability | Description |
|---|---|
| Pages | New routes and views |
| Components | Reusable UI components |
| Modules | Angular feature modules |
| Services | Frontend business logic |
Creating a Plugin
Step 1: Create Plugin Module
// packages/plugins/my-plugin/src/lib/my-plugin.module.ts
import { Module } from "@nestjs/common";
import { TypeOrmModule } from "@nestjs/typeorm";
import { MikroOrmModule } from "@mikro-orm/nestjs";
import { MyPluginEntity } from "./my-plugin.entity";
import { MyPluginService } from "./my-plugin.service";
import { MyPluginController } from "./my-plugin.controller";
@Module({
imports: [
TypeOrmModule.forFeature([MyPluginEntity]),
MikroOrmModule.forFeature([MyPluginEntity]),
],
controllers: [MyPluginController],
providers: [MyPluginService],
exports: [MyPluginService],
})
export class MyPluginModule {}
Step 2: Define Entity
import { MultiORMEntity, MultiORMColumn } from "@gauzy/core";
import { TenantOrganizationBaseEntity } from "@gauzy/core";
@MultiORMEntity("my_plugin_data")
export class MyPluginEntity extends TenantOrganizationBaseEntity {
@MultiORMColumn()
name: string;
@MultiORMColumn({ type: "jsonb", nullable: true })
config?: Record<string, any>;
}