Synchronize backend data with WordPress post collections over HTTP APIs, enabling remote and automated web content management.
With Posts Bridge you can move your workspace from the WordPress admin to collaboration tools like Google Spreadsheets, Airtable or Grist, or get your Odoo and Dolibarr data automatically synchronized with your website. Don't bother your team with context switching and manual web content synchronizations. Work where your data is, and use Posts Bridge to seamlessly transform it to web content without effort.
Posts Bridge treats post collections as indexes that represents your backend data and allows you to use Gutenberg, WordPress' powerful page builder, as the frontend editor of your backend. Whether through manual or automatic synchronization —using ahead-of-time or live fetches— Posts Bridge fully integrates your backend data into the WordPress CMS system.
Think of a bridge as a mapping that links your backend data with a post type collection from your WordPress web page. Each item on your backend database can be converted to a post, and each field on your backend tables can be mapped to a post field or taxonomy. Once a bridge is configured, you can trigger manual synchronizations, or let Posts Bridge automatically synchronize content between the two sides in the background.
Posts Bridge comes with free add-ons. Each add-on add to the plugin new bridges to work with specific APIs.
Posts Bridge has the following add-ons:
📊 CRM & Sales
🗓️ Productivity
📦 ERP & Accounting
✏️ CMS
Need a custom integration?
Connect to any custom API using standard HTTP methods and authentication using the abstract REST API add-on. Perfect for integrating with proprietary or less common systems.
In Posts Bridge, a backend is a set of configurations that handles the information required to get your posts synchronized over HTTP requests with remote systems.
To register a new backend you only have to set 3 fields:
- A unique name for the new connection
- The URL of your backend
- An array of HTTP headers with connection metadata and credentials
- Optional, an HTTP authentication credential (Basic, Bearer, etc)
Once registered, you can reuse your backend connection on your post bridges.
Field mappers allow you to mutate your backend API responses to match the WordPress post model (e.g., post_title, post_content, post_name, etc.). This enable automatic conversion of backend data into WordPress posts on each synchronization loop (ahead-of-time).
With mappers you can map backend data to post fields, custom fields and into taxonomy terms (such as categories and tags).
If you want your backend data loaded dynamically on each render, you can use the Remote Field custom block. This block lets you designate parts of your post templates as remote content. On render time, this blocks will be replaced with the data fetched from the backend.
Forms Bridge registers custom REST API endpoints for each bridge to easily connect to WordPress from your backend over HTTP requests.
Authenticate your HTTP requests to the WordPress REST API with JWT tokens.
Browse the plugin's documentation on postsbridge.codeccoop.org.
The plugin offers some hooks to expose its interanl API. Go to documentation to see more details about the hooks.
The repository handles dependencies as git submodules.
In order to work local, you have to clone this repository and initialize its submodules with this command:
git submodule sync
git submodule update --init
Once done, install JS dependenices with npm install and PHP dependencies with
composer install.
Frontend builds are made with esbuild. Once you
have your JS dependencies installed you can run npm run dev to perform
a live build, or npm run build to get a production build.
For JavaScript the project uses prettier as a formatter eslint as the linter.
For PHP the project uses phpcs as the linter and formatter.
Lint and format will be applied to staged files before each commit. In addition, merge requests performs a lint test in order to be accepted.
To run the projects test you have to execute the script bin/install-wp-tests.sh
in order to get the WordPress test suit installed in your local machine. Once done,
run composer run test to run project's unit tests.
If you have docker on your local machine, you can run tests in an ephemeral environment
with the script bin/test-on-docker.sh.