Introducing a new way to review your PRs.

Read the announcement

ever-co / ever-gauzy

Ever® Gauzy™ - Open Business Management Platform (ERP/CRM/HRM/ATS/PM) - https://gauzy.co

View on GitHub

27 documents · Updated Nov 23, 2026

docs / plugin-architecture

Plugin architecture

Gauzy uses plugins to add a product area as a bounded unit across the API, worker, and web application. Each host selects the plugins it owns, then connects their server contracts, browser surfaces, data, background work, and outside services. This keeps optional features such as chat, real-time updates, sign-in providers, search, documents, commerce, and task integrations out of deployments that do not enable them. See Backend platform, API application lifecycle, and Background jobs and scheduling for related context.

Plugin boundaries

Server plugin contract

A server plugin is a product boundary for API behavior and data. It can contribute a Nest module, data metadata, permissions, REST or GraphQL interfaces, subscribers, configuration, seed content, and life-cycle work. The host combines these contributions into one process.

Plugins can declare prerequisites. The host resolves these prerequisites before loading the module. A missing or circular dependency fails early. The configured plugin list is therefore a product and ownership boundary, not only a list of imports.

A plugin can also publish a small port or event contract for another plugin. This lets related product areas work together without making their implementation packages mandatory dependencies.

References: packages/…/plugin.interface.ts• L12-69 packages/…/plugin.helper.ts• L315-405 packages/…/chat.plugin.ts• L11-27

UI plugin contract

A UI plugin is a browser definition with a stable ID and an entry point. It can add routes, navigation, tabs, page extensions, widgets, settings, providers, and translations. A parent definition can group child plugins without being a feature module itself. The Ever Platform UI plugin uses this contract to add its integration page, contact action, operator menu entry, and app catalog without coupling those surfaces to core pages.

The definition also carries feature and permission rules. These rules let the host avoid showing a feature that the current user, tenant, or deployment cannot use. Routes may load their page code only when the user visits the route.

The UI plugin can also carry host-facing catalog data. For example, the Ever Connect UI plugin supplies the Ever app catalog so the web host can build its app switcher without moving Ever-specific hosts into core UI packages.

References: packages/…/plugin-ui.types.ts• L145-205 packages/…/plugin-ui.types.ts• L207-398 packages/…/chat-ui.plugin.ts• L177-202 packages/…/ever-connect-ui.plugin.ts• L133-159 packages/…/ever-app-catalog.ts• L3-15

Process ownership

The API, worker, and seed flows use the same server plugin contract but select different plugin sets. The API owns request-facing behavior. The worker owns queue consumers and scheduled work that should run outside the API. Seed flows load the modules needed to create product data.

API registration does not create a worker consumer. A worker also needs the prerequisites and data metadata required by its own module graph. Queue-based integration imports are registered only in a process that owns a queue root. A feature can still run through request-triggered work when no queue root is present. Some sync loops also require host-specific write services, so a process can load a plugin yet correctly remain outside that loop.

References: apps/…/plugins.ts• L96-330 apps/…/plugins.ts• L28-57 apps/…/plugins.ts• L67-202 packages/…/plugin.module.ts• L25-33 packages/…/ever-works-sync.loop.ts• L48-71

Server discovery and registration

API plugin selection

The API builds its active server plugin set from a declared list and deployment checks. Optional identity, analytics, integration, Inbox, real-time, chat, documents, commerce, search, and provider plugins enter the process only when their enablement rules pass. A disabled plugin is absent from the API module graph and does not add its routes, data, GraphQL fields, permissions, or life-cycle work.

Most switches use an exact true value. A feature can still have a second tenant or user gate after the plugin loads. Chat is one example: the API plugin must be loaded and the tenant must have the chat feature enabled before a request is served. Some capabilities are always registered but become usable only through their own runtime settings, such as AI providers and the AI chat surface.

Authentication plugins follow the same boundary. Their switches and usable provider settings are evaluated while the API builds the list. An inactive sign-in method has no route or provider request.

References: apps/…/plugins.ts• L91-187 apps/…/plugins.ts• L218-246 apps/…/plugins.ts• L292-330 packages/…/chat.plugin.ts• L11-16 packages/…/realtime-enabled.ts• L1-22

Dependency ordering

The selected plugin list is ordered from declared prerequisites to dependent plugins. This makes cross-domain contracts available before the plugin that consumes them and turns an omitted prerequisite into a startup error instead of a later provider failure.

Commerce, search, chat, and integration plugins use this model for domain relationships. The readable default list is useful for review, but the declared dependency graph is the actual registration contract.

References: apps/…/plugins.ts• L292-330 apps/…/plugins.ts• L44-57 packages/…/plugin.helper.ts• L147-201

Composition point

Some plugins need a capability owned by another plugin without importing that plugin directly. The API composition point binds these relationships at installation time through small ports. A port is a named contract that a consumer can use when a provider is present.

This keeps packages independently installable. If a provider is absent, the consumer reports the capability as unavailable or follows the contract's defined fallback instead of silently using a different service. The composition point owns no product data or route; it only joins selected capabilities.

References: apps/…/plugin-composition.ts• L72-105 apps/…/plugin-composition.ts• L145-241

Plugin module registration

Server registration has two related outcomes. Selected plugins first contribute metadata for data and application setup. The host then loads their modules and runs their life-cycle hooks. A plugin is usable only when both the metadata and runtime module graph contain it.

The flow turns a process-specific plugin list into a ready application:

flowchart LR
    List[Process plugin list] --> Gate[Apply enablement gates]
    Gate --> Order[Resolve prerequisites]
    Order --> Metadata[Collect data and app contributions]
    Metadata --> Modules[Build host module graph]
    Modules --> Hooks[Run plugin life-cycle hooks]
    Hooks --> Ready[Process accepts work]
    Ready --> Stop[Run destroy hooks on shutdown]

References: apps/…/plugin.config.ts• L122-130 packages/…/plugin.helper.ts• L147-201 packages/…/plugin.module.ts• L40-97

Data and seed registration

Plugin data follows the same selection boundary as plugin behavior. When a plugin is active, its entities and migrations become part of the host data setup. Its seed path can add product rows without replacing rows that already exist, so enabling a plugin can initialize new installations and bring existing installations up to date.

References: packages/…/changelog.seed.ts• L8-22 packages/…/changelog.seed.ts• L25-38

Worker selection

The worker has an explicit plugin list for long-running work. It hosts document processing, maintenance schedules, integration imports, commerce sweeps, Inbox delivery, task automation schedules, and selected providers. It does not copy the API list because loading a plugin in the worker can start consumers or schedules there.

The worker loads its plugin list after environment setup. Its queue and schedule choices therefore match the deployment that starts the worker. A plugin that imports a queue worker must be present with the same prerequisites and entity metadata that its module graph needs. A plugin that needs API-only write services must also keep its loop out of the worker.

References: apps/…/plugins.ts• L28-57 apps/…/plugins.ts• L67-202 apps/…/app.module.ts• L95-108 packages/…/docs.config.ts• L276-340 packages/…/ever-works-sync.loop.ts• L108-126

UI plugin integration

UI configuration loading

The web application defines its active UI plugin tree in apps/…/plugin-ui.config.ts. The entry point loads this configuration before Angular starts, so routes, menus, language data, and feature checks use one known set during application startup.

The tree supports flat plugins and grouped plugins. The current tree includes documents, Inbox, chat, task automation, task views, external integrations, jobs, dashboard variants, AI chat, Ever Platform, authentication, and usage statistics. JobsPlugin groups job child plugins, while both Angular and React time-tracking dashboard plugins can register the same area and let tenant preference choose the usable view.

References: apps/…/main.ts• L23-26 apps/…/plugin-ui.config.ts• L29-39 apps/…/plugin-ui.config.ts• L82-155 packages/…/plugin-ui.module.ts• L213-240

Host contribution points

The Angular host supplies registries for navigation, routes, tabs, widgets, translations, permissions, and feature flags. A UI declaration affects the application only when the matching host registry accepts the contribution.

Routes can load code on demand. A plugin can own a page or settings area while the host keeps shared layout, tenant context, and access policy. Chat adds employee, task, and team actions plus a docked direct-message or team-channel surface. Documents adds a routed shell with a shared folder drawer and a detail panel while its child pages manage browsing, upload, review, and editing. Inbox adds a page, settings entries, and a header badge for API-backed items. These surfaces keep product behavior in the plugin while using host navigation and route registries.

References: apps/…/bootstrap.module.ts• L42-77 packages/…/plugin-ui.types.ts• L9-143 packages/…/plugin-ui.helper.ts• L497-643 packages/…/chat-ui.plugin.ts• L77-117 packages/…/chat-dock.service.ts• L40-109 packages/…/docs-ui.module.ts• L103-107 packages/…/docs-shell.component.ts• L21-26 packages/…/docs-tree-drawer.service.ts• L4-10 packages/…/inbox-ui.service.ts• L20-80

UI lifecycle

The UI host creates active plugin instances after validation and calls their bootstrap hooks in dependency order. A plugin can use eager, lazy, or preload behavior for code that is not needed on the first screen.

At shutdown or unload, the host removes the plugin's registered extensions and state. This ownership rule supports runtime loading and unloading without leaving routes, settings, services, or event subscriptions behind.

References: packages/…/plugin-ui.module.ts• L240-264 packages/…/plugin-ui.module.ts• L296-425 packages/…/dynamic-plugin-loader.service.ts• L97-225

Availability controls

Plugin activation and content visibility are separate controls. Activation can skip a whole plugin. A registered route, menu item, tab, or widget can apply a narrower permission, feature, login, or provider check.

This prevents a UI plugin from presenting a complete feature when the API has not enabled its server side. Chat, Inbox, task automation, and external integrations use API availability checks before showing their active navigation or controls. Chat entry points also check the selected organization and user scope before opening a direct conversation or team channel. Documents uses permission checks for create and management actions while keeping the hub route available to users who can read it.

References: packages/…/plugin-ui.types.ts• L238-255 packages/…/plugin-ui.module.ts• L323-338 apps/…/plugin-ui.config.ts• L90-126 packages/…/chat-ui.plugin.ts• L104-117 packages/…/team-chat-button.component.ts• L48-105 packages/…/inbox-ui.plugin.spec.ts• L27-67 packages/…/docs-browse-page.component.ts• L75-101

Task views UI integration

The Task Views UI plugin gives users a task workspace that combines built-in views with saved views scoped to a person, team, project, or organization. It reads the selected scope from the host, checks API availability before showing entry points, and then supports filtering, grouping, paging, manual order, task lookup, keyboard control, and bulk changes with a short undo window.

The plugin keeps view edits separate from task writes. A saved view records its own definition and version, while bulk actions report partial refusals and refresh the current scope before offering undo. A stale view save presents reload or overwrite instead of silently replacing another user's definition.

References: packages/…/task-views-ui.plugin.ts• L31-60 packages/…/task-views-ui.plugin.ts• L79-103 packages/…/task-views-ui.plugin.ts• L116-177 packages/…/task-views-availability.service.ts• L31-105 packages/…/task-views-page.component.ts• L160-165 packages/…/task-views-page.component.ts• L719-789 packages/…/task-views-page.component.ts• L954-1090 packages/…/task-list.component.ts• L88-116 packages/…/bulk-toolbar.component.ts• L46-68 packages/…/go-to-task-box.component.ts• L19-24

Inbox integration

Inbox is an API-backed UI plugin that gives a signed-in user one place for decisions, email items, notifications, and item state. Its page reads the API before loading item data. A missing Inbox API reports the feature as unavailable instead of continuing with requests that cannot succeed.

The header badge is a separate entry point into the same user-scoped data. It refreshes counts and a short item list, then routes a selected item to the page or signals an already open page. The Notifications tab reads Gauzy employee notifications directly, so those records remain distinct from Inbox items.

References: packages/…/inbox-ui.service.ts• L20-80 packages/…/inbox-ui.service.ts• L98-148 packages/…/inbox-page.component.ts• L117-124 packages/…/inbox-header-badge.component.ts• L27-31

Cross-plugin integration

Provider registration

Provider plugins extend a shared service through a stable registry or port. The host feature owns the common contract. Each provider supplies its own capabilities and outside-system behavior. Feature code can therefore work with a capability set instead of a fixed vendor list.

AI providers use this pattern for model and speech selection. Commerce uses the same boundary for price resolution, stock availability, tax calculation and category lookup, promotion evaluation, and shipping rates. The cart asks these capabilities for answers and records the result in its own ledgers or snapshots. The cart does not read the provider's tables or trust caller-supplied prices, discounts, or shipping amounts. Optional ports preserve standalone cart operation where the contract permits it, while price, promotion, and shipping operations fail closed when their required provider is absent.

Tenant credentials stay on the server. The browser receives status or masked data, and the server resolves the usable secret only when it calls a provider.

References: packages/…/provider-registry.ts• L5-43 packages/…/ai-provider-credential.service.ts• L26-147 apps/…/plugins.ts• L218-240 packages/…/cart.types.ts• L16-43 packages/…/cart.types.ts• L65-175 packages/…/cart.types.ts• L183-293 packages/…/cart.types.ts• L303-442 packages/…/commerce-cart.service.ts• L430-538 packages/…/commerce-cart.service.ts• L643-787

Optional capability ports

An optional capability port lets a plugin offer a service without making the consumer mandatory. Ever Connect provides configuration, identity context, and token-vault support to the Ever ID plugin when the connection and launcher are loaded. Without those providers, Ever ID keeps the related feature unavailable and does not keep a refresh token.

Ever Connect can also ask the Ever ID plugin for identity links or session tokens. The port removes the need for either plugin to import the other's implementation. Commerce follows the same rule: the cart depends on the shape of a capability, not on the package that supplies it.

References: packages/…/auth-zitadel.module.ts• L89-116 packages/…/ever-id-session-tokens.port.ts• L24-66 packages/…/ever-connect.module.ts• L93-126 packages/…/cart.types.ts• L31-42 packages/…/cart.types.ts• L126-175

Event bridge

An event bridge lets one plugin announce a product event without importing the consumer plugin. The consumer can subscribe when it is available. The producer can still start when the consumer is absent.

This is a soft dependency. Consumer failure does not break the request that produced the event. Chat uses a stronger variant for its own writes: content-free facts are stored in the platform outbox in the same transaction as the chat change, while optional per-member badge updates are published after commit on a best-effort basis.

References: packages/…/chat-realtime.ts• L23-32 packages/…/chat-realtime.ts• L56-89 packages/…/realtime-hints.service.ts• L175-197

Platform connection flow

Ever Connect is an optional server plugin that links a Gauzy installation to Ever Platform. It owns connection state, organization links, consented integration state, entitlements, and platform event handling. When it is off, it adds no active route or background work and sends nothing. It keeps installation-wide controls separate from organization-scoped controls: an installation operator manages the connection and global policy, while organization administrators manage their link and local integration state.

After connection, one API process holds the connection lease. That process runs the heartbeat and event feed. It keeps the local cursor before it acknowledges an upstream event. Replayed events are safe because handlers re-read state and record request IDs. The sync loop claims each connection with a database lease, applies inbound events in order, pushes outbound changes, and fences writes after lease loss. It runs only in a process that hosts the Gauzy write services it needs. The optional membership resync also renews and checks that lease while it reads pages and writes role changes, so a process that loses ownership cannot move the feed or change access.

The connection exposes handler registries for product integrations. A catalog entry without a registered handler remains unavailable. A handler can react to enable, disable, and retry events for one linked organization. The UI shows these states together with consent scope and entitlement results, but enabling still occurs through Ever Platform consent rather than a local browser switch.

References: packages/…/ever-connect.module.ts• L54-101 packages/…/ever-connect-instance.controller.ts• L45-82 packages/…/ever-connect.controller.ts• L64-111 packages/…/ever-connect-integration-state.service.ts• L160-175 packages/…/ever-connect-integration-state.service.ts• L239-276 packages/…/integration-handler.registry.ts• L33-63 packages/…/ever-connect-ui.plugin.ts• L41-59 packages/…/ever-connect.service.ts• L156-243 packages/…/ever-platform-page.component.ts• L33-51

Ever Platform configuration boundaries

Ever Connect reads a strict configuration before it starts outside work. The platform address, install source, feed mode, deny list, return address, and optional provisioning or membership features each have a clear enabled or inactive state. An unusable address or key setup stops outbound work instead of falling back to a different address.

The operator boundary also changes with deployment ownership. Self-hosted installations use the shared installation operator rules, while Ever Cloud uses a configured list of active super-admin user IDs. Operator routes return 404 to other users, which keeps installation-wide connection state and policy separate from organization routes.

References: packages/…/ever-connect-config.ts• L10-84 packages/…/ever-connect-config.ts• L99-128 packages/…/ever-connect-config.ts• L270-354 packages/…/ever-connect-operator.service.ts• L11-37 packages/…/ever-connect-operator.guard.ts• L12-45 packages/…/ever-connect-instance.controller.ts• L45-82

Membership synchronization

The optional Ever Connect membership sync turns Ever organization membership events into changes in the linked Gauzy organization. It is registered only when Ever Connect and Ever ID sign-in are enabled together with the exact membership switch, so an installation can receive and acknowledge these events without changing local access when the feature is off.

The handler resolves one already linked Gauzy user from the Ever identity and one live tenant link. It maps Ever owner and admin to Gauzy ADMIN, while member removes only an ADMIN previously granted by this sync. It never creates users, changes SUPER_ADMIN, or removes a role granted directly in Gauzy. Each accepted change and its sync state are recorded in the Ever Connect audit in the same transaction, which makes repeats harmless and older events stale.

The scheduler dispatches membership events from the shared feed. After startup or a feed resync_required response, it can read the current members of each linked Ever organization and reconcile them before it advances the feed position. If that list cannot be read completely, it does not remove members from the local organization and retries the resync later. The sync still records a warning when the platform has disabled membership events, because there is then no membership state to recover.

References: packages/…/membership-sync.config.ts• L3-38 packages/…/membership-sync.handler.ts• L163-198 packages/…/membership-sync.handler.ts• L360-475 packages/…/membership-resync.ts• L5-20 packages/…/ever-connect.module.ts• L118-190 packages/…/ever-connect-scheduler.service.ts• L271-315 packages/…/ever-connect-scheduler.service.ts• L452-498 packages/…/ever-connect-audit.service.ts• L7-29

Ever Platform UI integration

The Ever Platform UI plugin is the browser side of the optional connection. It adds the integration route and provision confirmation route, contributes a contact-page action through a host extension slot, and supplies the Ever app catalog to the host app switcher. The host page asks the API for status before it loads organization data, so a disabled server plugin produces an unavailable page instead of client requests to absent features.

The operator menu entry follows a separate probe. The probe is scoped to the signed-in user and returns 404 when the server module is absent or the user is not the installation operator. Temporary failures retry, while sign-out or user changes hide the entry at once. Organization actions carry the selected organization to the API, and the browser never calls Ever Platform directly.

References: packages/…/ever-connect-ui.plugin.ts• L17-59 packages/…/ever-connect-ui.plugin.ts• L73-159 packages/…/ever-connect.service.ts• L156-243 packages/…/ever-platform-menu.service.ts• L18-53 packages/…/ever-platform-page.component.ts• L33-51 packages/…/ever-platform-page.component.ts• L732-785

External integration boundaries

Integration plugins keep outside-system credentials, tenant scope, and authorization proofs on the server. The browser starts a flow or reads integration status. The API validates ownership, uses stored credentials, and returns only the result needed by the feature.

Asana, GitHub, Linear, Trello, Jira, Ever Works, and other integrations follow the same product shape. Their server plugins own connection state, mappings, imports, two-way task sync, conflict handling, and webhooks. Their UI plugins own the connect page and organization-scoped settings page. API switches control whether the server side exists; UI permissions control who can use the page.

GitHub list synchronization removes pull requests before mapping issues to tasks because GitHub returns both from the issues endpoint. Repository visibility also fails closed: only a repository known to be public produces a public task.

References: apps/…/plugins.ts• L125-142 apps/…/plugins.ts• L259-265 apps/…/plugin-ui.config.ts• L108-126 packages/…/integration-asana.plugin.ts• L12-28 packages/…/asana.module.ts• L36-90 packages/…/github-issue-filter.ts• L1-18 packages/…/github-sync.service.ts• L220-365

Collaboration plugins

Chat and real-time updates are separate server plugins that can cooperate without requiring each other. Chat owns conversations, messages, permissions, REST reads and writes, GraphQL read fields, notifications, and recipient-scoped change facts. The real-time plugin owns the shared subscription channel, durable change hints, presence, typing signals, catch-up behavior, and replay retention.

The UI integrates chat into both a full page and small entry points on other product pages. Employee and team actions open a direct conversation or a team channel in a page-owned dock. A team channel is found by organization and team name, joined when needed, or created with the first message when no channel exists. Member setup can finish in later attempts without losing the pending work. The dock reads the conversation through the chat API and follows live hints with polling as a safety net. Message rendering resolves mention tokens at display time and sanitizes the rendered body before it reaches the browser.

Chat writes return the facts they caused so the sender can update at once. The outbox gives other subscribers a durable path. Live delivery and reconnect catch-up both re-check the current audience. If the real-time plugin is absent, chat can still serve normal reads and writes.

References: packages/…/chat.plugin.ts• L11-27 packages/…/chat-realtime.ts• L23-70 packages/…/realtime.plugin.ts• L11-29 packages/…/realtime-catch-up.service.ts• L250-263 packages/…/chat-ui.plugin.ts• L73-117 packages/…/chat-dock.service.ts• L40-109 packages/…/chat-dock.component.ts• L47-55 packages/…/chat-dock.component.ts• L823-913 packages/…/chat-dock.component.ts• L967-1107 packages/…/message-item.component.ts• L32-39 packages/…/chat-ui.helpers.ts• L157-187

Search source integration

The search plugin discovers searchable source entities from the ORM that the deployment uses. A plugin-owned entity can join global search through a source declaration, while the search layer keeps tenant scope and source reads aligned with the active data system.

This boundary lets feature plugins add searchable records without making search depend on one ORM or on each feature's internal query code. If no supported ORM connection is available, search fails clearly instead of treating the source as an empty table.

References: packages/…/search-source.connection.ts• L7-33 packages/…/search-source.connection.ts• L54-72 packages/…/search-source.connection.ts• L142-189

Documents processing

Documents uses one processing contract with two dispatch modes. A process with the scheduler queue service sends stages to BullMQ. A process without that service runs the same stage handlers in the background inside the process. If a configured queue rejects a job, the service uses the inline path instead of dropping the stage.

Both modes keep the database row as the source of truth. Queued work adds retry, backoff, stable stage identity, and tenant-aware fairness for AI-heavy stages. Inline work coalesces duplicate stages and records failure for later recovery. The worker normally owns the heavy queue consumer, while the API can remain a producer or use the supported inline path.

The import flow validates the archive and target in the request process, records a tenant-scoped import run, and dispatches the same processing contract. A recovery sweep can resume stalled runs. The queue worker and inline runner call the same pipeline so process choice does not change document outcomes.

References: packages/…/docs.config.ts• L276-340 packages/…/docs-queue.service.ts• L42-67 packages/…/docs-queue.service.ts• L119-175 packages/…/docs-processing.worker.ts• L33-55 packages/…/docs-processing.worker.ts• L157-215 packages/…/document-import.service.ts• L62-73 packages/…/document-import.service.ts• L187-227

Document access and content contract

The Documents server plugin treats each document as tenant- and organization-scoped product data. Visibility, team membership, ownership, sharing, and management rights decide what a request can read or change. A single-document read returns a write capability for the current caller, while unreadable related documents are masked rather than exposed.

Page content has one canonical document form and a monotonic content revision. Saves claim the next revision and reject stale writers, then update the rendered form, mentions, links, and live editing state from the accepted content. Lists use safe metadata projections and return content markers instead of loading full page content.

References: packages/…/document.entity.ts• L60-71 packages/…/document.entity.ts• L131-166 packages/…/document.entity.ts• L361-409 packages/…/document.service.ts• L211-243 packages/…/document.service.ts• L270-464 packages/…/document.service.ts• L635-731 packages/…/document.service.ts• L1003-1063 packages/…/get-document.handler.ts• L10-25

Collaborative documents

Documents also provides live page editing as an API-owned collaboration capability. A page has a live session per browser connection. The API shares edits and presence between sessions and across API processes, then saves the combined state back to the document record.

The live service checks access when a session opens and again while it remains open. It can make a session read-only for a locked page, missing write access, session limits, or an oversized state. Server-side saves and restores are applied to the live copy so open editors keep changes that do not conflict with the outside write. Failed persistence stays loaded for retry or recovery instead of being silently discarded.

References: packages/…/document-live.service.ts• L176-209 packages/…/document-live.service.ts• L240-349 packages/…/document-live.service.ts• L618-757 packages/…/document-live.service.ts• L837-930 packages/…/document-live.service.ts• L1178-1305 packages/…/document-live.service.ts• L1413-1481

Observability integration

Observability plugins connect host errors and browser activity to outside monitoring services without changing each feature's main path. Server monitoring observes supported transports. Browser monitoring adds route, error, feature flag, and session signals after browser initialization.

Tenant settings can disable reporting for one request context. Browser event properties redact token or code values from URL fields.

References: apps/…/plugins.ts• L96-101 packages/…/sentry.interceptor.ts• L26-145 packages/…/posthog-manager.service.ts• L21-79

Change checklist

When these files or sections are changed, remember to consider these:

  • When changing server plugin metadata, keep the selected process list, data metadata, runtime module graph, API contributions, seed content, and life-cycle hooks aligned.
  • When changing dependsOn, update every process-specific plugin list and preserve the missing-prerequisite failure contract.
  • When adding queue or scheduled work, decide which process owns the consumer and which process owns the scheduler root.
  • When changing a feature switch, keep the server selection rule, dependent-plugin rule, tenant feature gate, and UI availability response aligned.
  • When changing a UI plugin ID or group, update dependency references, activation rules, contribution ownership, and dynamic-load callers.
  • When adding a UI contribution, bind the matching host registry and service adapter. A declaration without its registry has no user-facing effect.
  • When changing authentication, keep its load switch, provider configuration gate, public status, callback contract, session boundary, and sign-in handoff aligned.
  • When changing an optional port, handler registry, or provider registry, preserve provider-absent behavior and keep the injection token independent of the provider implementation.
  • When changing commerce capability ports, update the API composition binding and the cart's absent-provider behavior. Do not reintroduce caller-controlled price, tax, promotion, stock, or shipping values.
  • When changing chat or real-time events, keep REST answers, GraphQL read fields, event names, recipient scope, outbox declarations, catch-up names, and UI state updates aligned.
  • When changing chat entry points, keep the API availability check, organization scope, page ownership of the dock, team-channel naming and visibility rules, and full-chat route handoff aligned.
  • When changing external integrations, keep the API switch, catalog entry, OAuth or token flow, tenant mapping, webhook target, worker import, conflict state, and UI route aligned.
  • When changing Ever Connect membership sync, keep the exact enablement prerequisites, identity-to-user match, role grant ownership, event ordering, audit state, transaction boundary, and feed resync warning aligned.
  • When changing Ever Connect operator or public-address behavior, keep the deployment ownership rule, 404 boundary, address consent gate, normalization rules, and browser status view aligned.
  • When changing Ever Connect integration catalog behavior, keep the offered definition, registered handler, consent state, entitlement gate, local disable path, remote retry, and UI state mapping aligned.
  • When changing membership recovery, keep complete-list detection, absent-member handling, lease checks, feed cursor movement, and retry behavior aligned.
  • When changing Ever Works sync handlers, keep inbound and outbound registrations, process write capability checks, database lease fencing, and retry or dead-letter states aligned.
  • When changing the plugin registry, preserve tenant boundaries and the separation between public catalog data, installation data, settings, and subscription data.
  • When changing Documents processing, keep the queue worker and inline runner on the same pipeline, preserve stable stage identity, and retain a database recovery path.
  • When changing live Documents editing, keep subscription frames, update and awareness routes, cross-process relay, access rechecks, revision claims, and shutdown persistence aligned.
  • When changing Documents reads or writes, keep tenant and organization scope, visibility and share checks, masked relations, write capability, content revision, and canonical content fields aligned.
  • When changing Task Views entry points, keep the API availability probe, selected user and organization scope, hidden navigation state, shortcut registration, and task reference extension aligned.
  • When changing Task Views writes, keep saved-view versions, conflict actions, selection limits, partial bulk outcomes, undo payloads, and post-write refresh scope aligned.
  • When changing browser observability, preserve URL secret redaction before capture.

Important failure modes

TriggerConsequenceGuard
A selected plugin omits a declared prerequisiteStartup fails through a missing provider or incomplete module graphResolve dependsOn before bootstrap in every hosting process
A worker hosts a module without its entity metadataThe process fails during boot when a dependent service requests repository metadataList every hosted plugin and its prerequisites in the worker plugin set
A UI contribution has no matching host registryThe plugin starts but its route, menu, or settings entry is absentBind every required registry in the root bootstrap module
A UI plugin remains visible after the API feature is offUsers see a partial feature or a route with no server supportSeparate plugin registration from API-backed availability checks
A team chat action uses a channel from another organization or visibilityThe dock opens the wrong team conversation or sends to an invalid channelMatch organization, team name, and visibility before joining or creating a channel
A cart receives a caller-supplied price, promotion amount, tax, or shipping amountA buyer can change the payable total without the owning domain's rulesResolve values through the registered capability ports and fail closed where the port is required
Chat facts are written outside the chat transactionA successful chat write can lack the durable event needed by other subscribersAppend chat facts with the write transaction; keep only non-critical fan-out best effort
Durable real-time rows are removed without a replay watermarkA reconnecting client trusts a cursor that points before deleted eventsAdvance the scope watermark with retention and return resync
A chat dock survives an organization or page changeRequests can use the wrong tenant context or show a conversation outside its opening pageClose the dock on scope or page change and route to the full conversation when needed
A queue-backed plugin is loaded without a queue rootScheduled work has no valid owner or starts in the wrong processRegister queue-dependent modules only where the queue root is enabled
A process has no queue service and drops a document stageAn upload or reprocess remains incompleteUse the inline runner and record stage failure on the document row
A document live session keeps write access after a lock or share changeA user can edit a page that no longer permits the actionRecheck access on a timer and on document access events
A public registry read accepts unrestricted relations or filtersA visitor can receive tenant settings, subscribers, or billing dataAllow only marketplace fields and tenant-safe filters
An integration catalog row has no handlerConsent can appear to exist while no product behavior runsKeep catalog availability tied to the registered handler
A GitHub issues list is mapped without removing pull requestsPull requests become duplicate or incorrect tasksFilter list responses before task mapping and keep webhook handling separate
Ever Works work continues after its database lease movesTwo processes can write conflicting inbound or outbound resultsFence each handler write and stop the drain when lease ownership is lost
A membership event is applied without a unique linked Ever identityAccess changes for the wrong Gauzy user or cannot be safely reversedRequire one tenant user match and reject missing or mismatched identity links
Membership state is changed without its audit rowA later repeat or demotion cannot tell which role the sync grantedWrite the membership change and audit state in one transaction
The Ever feed resumes beyond retained eventsMembership changes in the skipped range are not appliedWarn on resync and require operator review of linked organization roles
Ever Connect uses an invalid platform address or unreadable connection keyThe connection cannot safely send or resume workReject the setup and keep outbound work idle until the operator corrects it
A non-operator reaches an installation-wide Ever Connect routeA tenant administrator can view or change installation stateResolve the operator from current database state and return 404 for other users
Ever Connect shows a consented integration without a local handler or entitlementThe UI suggests a feature can run although no local effect or license permits itDerive availability from the handler registry and entitlement result
Membership resync removes members after an incomplete page readLocal access is removed for users who may still belong to the Ever organizationRemove absent members only after a complete list and retry failed resyncs
A document request omits organization scope or returns an unreadable relationA user can see another organization or infer private document dataRequire explicit scope and apply visibility checks to the requested row and joined rows
A document writer saves an old revision or only HTMLA newer edit is overwritten or canonical and rendered content divergeClaim the next content revision and require canonical content JSON
Task Views keeps old navigation or shortcuts after availability changesUsers open a partial feature or keyboard commands affect an unavailable pageHide host entries and unmount shortcuts when the scoped API probe is false
Task Views applies undo or a late write to a new organization or viewAnother scope receives stale task changes or stale view stateBind writes to the opening and scope, then refresh only the matching scope

Key files

FileWhy to read it
apps/…/plugins.tsThe API plugin set, feature switches, providers, authentication plugins, collaboration plugins, commerce domains, and composition point
apps/…/plugin.config.tsThe handoff from the API list to dependency-ordered application configuration
apps/…/plugin-composition.tsInstallation-level bindings between independently owned server capabilities
packages/…/plugin.interface.tsThe server contribution, dependency, life-cycle, and seed contract
packages/…/plugin.helper.tsCollection and ordering of plugin metadata and contributions
packages/…/plugin.module.tsThe server module loading and life-cycle boundary
apps/…/plugins.tsWorker-only plugin ownership and environment-dependent queue or schedule selection
apps/…/app.module.tsScheduler placement and runtime loading of the worker plugin set
packages/…/cart.types.tsThe optional capability ports that connect cart behavior to pricing, inventory, tax, promotion, and fulfilment domains
packages/…/commerce-cart.service.tsThe cart boundary that resolves capability answers and records consistent totals
packages/…/ever-connect.module.tsEver Connect registration, optional feature providers, lifecycle startup, and exported cross-plugin capabilities
packages/…/ever-connect-scheduler.service.tsConnection lease ownership, heartbeat, feed dispatch, cursor handling, and resync behavior
packages/…/ever-connect-config.tsStrict outbound configuration, deployment ownership, feed mode, and optional Ever Connect features
packages/…/ever-connect-instance.controller.tsInstallation operator routes, connection probe, global policy, and public address boundary
packages/…/ever-connect.controller.tsOrganization-scoped connection status, links, integration state, entitlements, and audit routes
packages/…/ever-connect-integration-state.service.tsConsent, handler availability, entitlement checks, local disable behavior, and remote state reconciliation
packages/…/ever-connect-link.service.tsOrganization-to-Ever linking, entitlement verification, archive behavior, and link state changes
packages/…/membership-resync.tsThe current-members read used to recover membership state after feed gaps
packages/…/membership-sync.config.tsMembership switch prerequisites, event names, role mapping, and event ordering rules
packages/…/membership-sync.handler.tsIdentity resolution, safe role and membership changes, audit-backed state, and transaction boundaries
packages/…/ever-connect-audit.service.tsThe append-only audit boundary used by Ever Connect features and membership sync
packages/…/integration-handler.registry.tsThe optional handler contract for integrations that run through Ever Connect
packages/…/ever-works-sync.loop.tsProcess selection, database lease ownership, and the inbound/outbound sync order
packages/…/ever-works-inbound.applier.tsOrdered inbound handler dispatch and deferred or dead-letter outcomes
packages/…/ever-works-outbound.pusher.tsOutbound handler dispatch, claims, retries, and external API failure handling
packages/…/chat.plugin.tsA feature-gated plugin with REST, GraphQL, data, and life-cycle contributions
packages/…/realtime.module.tsThe shared real-time channel, audience checks, catch-up, presence, hints, and retention services
packages/…/chat-ui.plugin.tsChat routes, page extensions, availability-gated navigation, header entry points, and translations
packages/…/chat-team-suggestions.tsTeam-channel naming, organization matching, and duplicate-channel selection rules
packages/…/chat-dock.service.tsThe page- and scope-owned browser entry point for direct conversations and team channels
packages/…/chat-dock.component.tsThe compact chat surface and its API, live-update, permission, team setup, and route handoffs
packages/…/team-chat-button.component.tsThe team-page extension that loads scoped team details before opening chat
packages/…/docs.config.tsQueue, worker, and inline processing choices for Documents
packages/…/docs-queue.service.tsThe single queued-or-inline dispatch seam and recovery behavior
packages/…/docs-processing.worker.tsThe worker adapter that runs the shared document pipeline and limits AI work per tenant
packages/…/document-live.service.tsLive page sessions, cross-process collaboration, access rechecks, and persistence
packages/…/document-import.service.tsTenant-scoped import validation, run tracking, queue dispatch, and stale-run recovery
packages/…/docs-ui.module.tsDocuments route registration, host contributions, translations, and feature services
packages/…/docs-shell.component.tsThe Documents shell that joins the folder drawer, routed content, and detail state
packages/…/search-source.connection.tsORM-neutral source discovery and reads for plugin-owned searchable data
packages/…/github-issue-filter.tsThe boundary that keeps pull requests out of issue-to-task synchronization
packages/…/github-sync.service.tsGitHub issue, label, task, and repository synchronization
packages/…/integration-asana.plugin.tsThe server shape of an external integration and its worker maintenance gate
apps/…/plugin-ui.config.tsThe active browser plugin tree, feature grouping, locale defaults, and UI variants
apps/…/bootstrap.module.tsThe host registries and adapters supplied to UI plugins
packages/…/plugin-ui.types.tsUI definitions, contribution points, gates, and load strategies
packages/…/plugin-ui.module.tsUI validation, ordering, activation, bootstrap, and shutdown
packages/…/inbox-ui.service.tsThe browser boundary for optional Inbox items, notifications, user state, and page handoff
packages/…/inbox-page.component.tsThe Inbox page flow, availability state, tabs, filters, item actions, and detail view
packages/…/inbox-header-badge.component.tsThe header count, compact item menu, scope reset, and page handoff
packages/…/ever-app-catalog.tsThe Ever app catalog supplied by the UI plugin to the web host
packages/…/ever-connect-ui.plugin.tsEver Platform routes, contact extension, app catalog, and operator menu contribution
packages/…/ever-platform-menu.service.tsUser-scoped operator probe and retry behavior for the Settings menu entry
packages/…/ever-connect.service.tsThe browser-to-API contract for connection, organization links, integrations, entitlements, and audit
packages/…/ever-platform-page.component.tsThe operator and organization integration page flow and API-first unavailable state
packages/…/task-views-ui.plugin.tsTask Views routes, task-page extension, navigation, and availability-controlled shortcuts
packages/…/task-views-availability.service.tsUser- and organization-scoped API availability and bounded retry behavior
packages/…/task-views-page.component.tsSaved and built-in view lifecycle, task reads, conflicts, bulk updates, undo, and scope refresh
packages/…/task-list.component.tsTask row grouping, selection, keyboard focus, display, and manual order events
packages/…/bulk-toolbar.component.tsBulk task change choices and the single action contract sent to the page
packages/…/go-to-task-box.component.tsTask reference lookup and navigation entry point
packages/…/index.tsRegistry command and query surfaces for discovery and installation
packages/…/plugin.controller.tsThe public marketplace read boundary
packages/…/plugin-tenant.controller.tsTenant installation and user access flow
packages/…/plugin-subscription.controller.tsSubscription boundaries and plan change routes