This project is not covered by Drupal’s security advisory policy.
Node Data Synchronization & API Module
Automates JSON storage, synchronization, and dynamic data endpoints for Drupal content types.
The Node Data module extends Drupal's content management capabilities by creating dedicated JSON storage tables for selected content types, enabling efficient data synchronization, and exposing structured data via dynamic routes. Ideal for headless architectures, data aggregation, or custom API-driven applications, this module ensures seamless integration between Drupal nodes and external systems.
Key Features
Dynamic Table Creation
Creates custom database tables (e.g., article_data, booking_data) for chosen content types via an intuitive admin interface.
Tables include:
nid (Node ID, primary key)
json_data (LONGTEXT field for storing aggregated JSON).
Lists active content types and associated tables in the admin overview.
Automatic Node Synchronization
Listens for node insert, update, or delete events to synchronize JSON data in real time.
Automatically scans all fields attached to a content type, serializes field values into a structured JSON object, and stores it in the corresponding *_data table.
Supports all core and custom field types (e.g., entities, media, taxonomies).
Cron-Based Synchronization Check
Runs periodic checks via Drupal cron to identify and process unsynced nodes (e.g., nodes modified during downtime or sync failures).
Provides a status report in the admin interface to monitor sync health.
Dynamic Route & Theming
Exposes JSON data via the route /[content-type-machine-name]/[nid] (e.g., /article/45).
Renders JSON data in a customizable Twig template (node-data.html.twig), allowing themers to control markup and styling.
Supports access control via Drupal's permission system.
Installation & Configuration
Install the module via Composer or manually.
Navigate to Administration > Configuration > Node Data Settings.
Select content types to enable JSON storage. Submit to generate tables.
Configure cron sync intervals under Administration > Configuration > Cron.
Use Cases
Headless Drupal Backends: Serve clean JSON data to frontend frameworks.
Data Archiving: Maintain lightweight JSON snapshots of complex nodes.
Batch Processing: Integrate with external APIs or analytics tools using cron-synced data.
Custom Reporting: Query *_data tables directly for aggregated content metrics.
Maintenance & Extensibility
Uses Drupal's Database API for secure table operations.
Implements hooks (hook_cron, hook_entity_presave) for extensibility.
Developers can override the default JSON serializer or theme template.
Contribute & Report Issues: [GitHub Repository Link]
Compatibility: Drupal 10/11, PHP 8.3+.
Empower your content types with structured JSON storage and API endpoints today!
Project information
- Project categories: Integrations
- Created by felixzz on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
