# FlowDrop

> Core module providing the NodeProcessor plugin system, entity serializer, and centralized admin dashboard for the FlowDrop workflow suite.

## Overview

The `flowdrop` module is the foundation of the FlowDrop system. It defines the NodeProcessor plugin type used by all workflow nodes, provides a shared entity serializer for converting Drupal entities into workflow-compatible data structures, and serves as the central admin dashboard entry point.

All other FlowDrop modules depend on this module either directly or transitively. It establishes the plugin discovery mechanism, routing namespace (`/admin/flowdrop/`), and core permissions that the rest of the system builds upon.

## Dependencies

- [flowdrop_ui_components](flowdrop_ui_components.md) (for dashboard UI components)

## Configuration

### Admin Pages

| Path | Description |
|------|-------------|
| `/admin/flowdrop` | Dashboard — central landing page for all FlowDrop administration |
| `/admin/flowdrop/config` | Configuration overview — links to all configuration pages |
| `/admin/flowdrop/structure` | Structure overview — links to entity type/bundle management |
| `/admin/flowdrop/config/flowdrop` | FlowDrop settings form |

### Permissions

| Permission | Description |
|------------|-------------|
| `administer flowdrop` | Full administrative access to all FlowDrop entities and configuration. Restricted. |
| `administer flowdrop configuration` | Access to FlowDrop configuration pages |

## Tips and Tricks

### Dashboard as Entry Point

The FlowDrop dashboard at `/admin/flowdrop` provides quick access to all sections — workflows, pipelines, triggers, and configuration. It uses the [flowdrop_ui_components](flowdrop_ui_components.md) SDC components for a consistent card-based layout.

### NodeProcessor Plugin System

All workflow node types are backed by NodeProcessor plugins. The plugin manager (`flowdrop.node_processor_plugin_manager`) discovers plugins across all enabled modules using PHP 8 attributes. When creating a custom module that provides new node types, your plugins will be automatically discovered as long as they are in the correct namespace (`Plugin\FlowDropNodeProcessor`).

### Entity Serializer

The entity serializer (`flowdrop.entity_serializer`) converts Drupal content and config entities into associative arrays for use in workflow execution. This is the same serializer used by [flowdrop_trigger](flowdrop_trigger.md) when passing entity data into triggered workflows — ensuring consistent data shapes regardless of the entry point.

## Developer API

### Services

| Service ID | Class | Stability | Description |
|-----------|-------|-----------|-------------|
| `flowdrop.node_processor_plugin_manager` | `FlowDropNodeProcessorPluginManager` | `@api` | Plugin manager that discovers and instantiates NodeProcessor plugins |
| `flowdrop.entity_serializer` | `EntitySerializer` | `@internal` | Converts Drupal entities into associative arrays for workflow execution |
| `flowdrop.route_subscriber` | `RouteSubscriber` | `@internal` | Routing event subscriber for dynamic route alterations |
| `flowdrop.hooks` | `FlowDropHooks` | `@internal` | Hook handler class using Drupal's hook attribute system |

> Only `@api` classes are part of the stable public API. `@internal` classes may change without notice in any release. See the [BC Policy](../reference/api/bc-policy.md) for details.

### Plugin Types

#### NodeProcessor

The core plugin type for all workflow nodes. Every node type in the visual editor is backed by a NodeProcessor plugin.

**Namespace:** `Drupal\{module}\Plugin\FlowDropNodeProcessor`

**Discovery:** PHP 8 attributes via `FlowDropNodeProcessorPluginManager`

See the [Defining Node](../development/quick-reference/define-node.md) guide for a step-by-step tutorial on creating custom NodeProcessor plugins.

## References

- [Defining Node — Quick Reference](../development/quick-reference/define-node.md)
- [FlowDrop Node Processor Concepts](../development/flowdrop-node-processor.md)
- [Module Dependency Graph](../development/module-dependency.md)
