{"id":50975729,"url":"https://github.com/devgateway/data-viz-wordpress","last_synced_at":"2026-06-19T07:32:41.781Z","repository":{"id":365239757,"uuid":"967419427","full_name":"devgateway/data-viz-wordpress","owner":"devgateway","description":"This repo contains plugins and blocks for the Data Viz and also the core wordpress image.","archived":false,"fork":false,"pushed_at":"2026-06-16T12:37:56.000Z","size":17221,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-06-16T14:23:49.060Z","etag":null,"topics":["dg-data-viz","integration","vizualizations","wordpress","wordpress-integration"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devgateway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.md","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-16T12:31:54.000Z","updated_at":"2026-06-08T07:51:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/devgateway/data-viz-wordpress","commit_stats":null,"previous_names":["devgateway/data-viz-wordpress"],"tags_count":145,"template":false,"template_full_name":null,"purl":"pkg:github/devgateway/data-viz-wordpress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Fdata-viz-wordpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Fdata-viz-wordpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Fdata-viz-wordpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Fdata-viz-wordpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devgateway","download_url":"https://codeload.github.com/devgateway/data-viz-wordpress/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devgateway%2Fdata-viz-wordpress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34522035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dg-data-viz","integration","vizualizations","wordpress","wordpress-integration"],"created_at":"2026-06-19T07:32:41.116Z","updated_at":"2026-06-19T07:32:41.769Z","avatar_url":"https://github.com/devgateway.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# data-viz-wordpress\n\nA **pnpm monorepo** that packages all WordPress plugins, themes, shared npm libraries, and CLI tools required to run a **Data Visualization dashboard** on WordPress. It is maintained by Development Gateway and produces both published npm packages and a Docker image for self-hosted deployments.\n\n---\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Repository Structure](#repository-structure)\n- [Packages](#packages)\n- [Plugins](#plugins)\n- [Theme](#theme)\n- [Docker Image](#docker-image)\n- [Getting Started](#getting-started)\n- [Scripts](#scripts)\n- [Release Management](#release-management)\n- [CI/CD](#cicd)\n- [Contributing \u0026 Support](#contributing--support)\n- [License](#license)\n\n---\n\n## Overview\n\nThis repository brings together everything needed to extend a WordPress site into a full-featured data visualization platform:\n\n| Layer | What lives here |\n|---|---|\n| **React / Gutenberg blocks** | Custom blocks that embed charts, maps, and filters directly in the WordPress editor |\n| **REST API extensions** | Custom endpoints that feed data to those blocks |\n| **Multilingual support** | Full i18n layer via a bundled WP Multilang plugin |\n| **Shared npm packages** | Reusable React components and utility types published to npm under `@devgateway/` |\n| **Scaffolding CLIs** | `create-wp-customizer` and `upgrade-wp-customizer` for bootstrapping new customizer projects |\n| **Custom WordPress theme** | `dg-semantic` — a block-compatible theme pre-wired for data viz pages |\n| **Docker image** | A ready-to-run `wordpress:fpm-alpine`-based image with all plugins and the theme pre-installed |\n\n---\n\n## Repository Structure\n\n```\ndata-viz-wordpress/\n├── packages/                      # Published npm packages\n│   ├── commons/                   # @devgateway/dvz-wp-commons\n│   ├── create-wp-customizer/      # @devgateway/create-wp-customizer CLI\n│   └── upgrade-wp-customizer/     # @devgateway/upgrade-wp-customizer CLI\n├── plugins/                       # WordPress plugins (pnpm workspace members)\n│   ├── wp-react-blocks-plugin/    # Gutenberg blocks for data visualization\n│   ├── wp-react-custom-api/       # Custom REST API endpoints\n│   ├── wp-react-custom-multilang/ # Multilingual plugin (WP Multilang fork)\n│   └── wp-react-custom-rest-menu/ # Menu REST API endpoints\n├── wp-content/                    # Third-party plugins and language files\n├── wp-theme/                      # dg-semantic WordPress theme\n├── custom/                        # PHP runtime config (upload limits, etc.)\n├── Dockerfile                     # Multi-stage production image\n├── wordpress.sh                   # Container entrypoint script\n├── pnpm-workspace.yaml\n└── package.json\n```\n\n---\n\n## Packages\n\nAll packages are versioned and released with [Changesets](https://github.com/changesets/changesets) and published to npm under the `@devgateway` scope.\n\n### `@devgateway/dvz-wp-commons`\n\n\u003e `packages/commons`\n\nShared React components and utilities used across the Gutenberg blocks. Includes:\n\n- **API \u0026 data configuration** — `APIConfig`, `CSVSourceConfig`, `DataFilters`\n- **Chart primitives** — `ChartColors`, `ChartLegends`, `ChartMeasures`, `Tooltip`, `Format`\n- **Block editor helpers** — `BlockEditWithAPIMetadata`, `BlockEditWithFilters`, `ComponentWithSettings`\n\nBuilt with TypeScript; exports both JS and `.d.ts` type definitions.\n\n### `@devgateway/create-wp-customizer`\n\n\u003e `packages/create-wp-customizer`\n\nCLI (`create-wp-customizer`) that scaffolds a new WordPress customizer project from an interactive prompt. Uses `@clack/prompts` for the UX and `cross-spawn` to bootstrap the project.\n\n### `@devgateway/upgrade-wp-customizer`\n\n\u003e `packages/upgrade-wp-customizer`\n\nCLI that upgrades an existing customizer project to the latest conventions. Parses and transforms existing source files using `@babel/parser`.\n\n---\n\n## Plugins\n\n### `wp-react-blocks-plugin`\n\nThe core plugin. Contains all custom [Gutenberg blocks](https://developer.wordpress.org/block-editor/) built with React and [`@wordpress/scripts`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/). Each block is a self-contained React component that fetches data from the REST API and renders charts, maps, or filter controls.\n\n**Environment variables consumed at build time:**\n\n| Variable | Default | Description |\n|---|---|---|\n| `BLOCKS_CATEGORY` | `wp-react-lib-blocks` | Block category slug in the editor |\n| `BLOCKS_NS` | `viz` | Namespace prefix for block names |\n\n### `wp-react-custom-api`\n\nExtends the WordPress REST API with custom endpoints required by the data viz blocks. Register your data sources here.\n\n### `wp-react-custom-multilang`\n\nA bundled fork of [WP Multilang](https://wordpress.org/plugins/wp-multilang/) with configuration for the data viz content types. Provides per-language versions of posts, terms, meta, menus, and widgets — without creating duplicate database rows.\n\n\u003e **Note:** This plugin is excluded from the pnpm workspace because it has no npm build step.\n\n### `wp-react-custom-rest-menu`\n\nAdds REST endpoints for WordPress nav menus:\n\n| Endpoint | Description |\n|---|---|\n| `GET /menus/v1/menus` | List all registered menus |\n| `GET /menus/v1/menus/{slug}` | Get a single menu by slug or ID |\n| `GET /menus/v1/locations` | List all menu locations |\n| `GET /menus/v1/locations/{slug}` | Get the menu assigned to a location |\n\nCompatible with ACF menu attributes and the Menu Image plugin.\n\n---\n\n## Theme\n\n### `dg-semantic`\n\n\u003e `wp-theme/` → deployed to `wp-content/themes/dg-semantic/`\n\nA custom block-compatible WordPress theme built for data visualization pages. Key features:\n\n- `theme.json` v2 — spacing, font sizes, and layout tokens\n- WP Multilang integration (`wpm-config.json`)\n- Custom post type and taxonomy registration\n- ACF field registration (`_custom_fields.php`)\n- Custom admin styles and MIME type support (SVG, etc.)\n\n---\n\n## Docker Image\n\nThe repository ships a multi-stage `Dockerfile` that produces a minimal, production-ready image.\n\n| Stage | Base image | What it does |\n|---|---|---|\n| `base` | `node:22-slim` | Sets up pnpm / corepack |\n| `installer` | — | `pnpm install --frozen-lockfile` |\n| `builder` | — | Builds all npm packages and plugins; assembles `wp-content/` |\n| `runtime` | `wordpress:6.8.2-fpm-alpine` | Copies PHP config, `wp-content.tgz`, and entrypoint |\n\nThe final image exposes ports **80** and **443** and runs via `php-fpm`.\n\n### Entrypoint: `wordpress.sh`\n\nOn startup the script:\n\n1. Extracts `/tmp/wp-content.tgz` into the WordPress root (skipped when `SKIP_WP_UPDATE=1`).\n2. Delegates to the official WordPress Docker entrypoint.\n3. Sets write permissions on `wp-content/uploads/`.\n\n**Development tip:** Set `SKIP_WP_UPDATE=1` to mount your local `wp-content/` without it being overwritten on every restart.\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n- [Node.js 22+](https://nodejs.org/)\n- [pnpm 10+](https://pnpm.io/) (`corepack enable \u0026\u0026 corepack prepare pnpm@latest --activate`)\n- [Docker](https://www.docker.com/) (for the full WordPress stack)\n\n### Install dependencies\n\n```bash\npnpm install\n```\n\n### Build all packages and plugins\n\n```bash\npnpm build\n```\n\n### Build only the npm packages\n\n```bash\npnpm build:npm-packages\n```\n\n### Run with Docker\n\n```bash\ndocker build -t data-viz-wordpress .\n```\n\n\u003e **Warning — Production Deployments:** The default `docker-compose.yml` uses placeholder credentials (`WORDPRESS_DB_PASSWORD: wordpress`, `MYSQL_ROOT_PASSWORD: somewordpress`). These are for local development only. Before any internet-facing deployment, replace all default passwords with strong, unique values.\n\n---\n\n## Scripts\n\n| Script | Description |\n|---|---|\n| `pnpm build` | Build every workspace member recursively |\n| `pnpm build:npm-packages` | Build only the published npm packages |\n| `pnpm version` | Bump versions from pending changesets (`changeset version`) |\n| `pnpm release` | Publish packages to npm (`changeset publish`) |\n\n---\n\n## Release Management\n\nVersioning is handled by [Changesets](https://github.com/changesets/changesets).\n\n1. After making changes, run `pnpm changeset` and follow the prompts to describe what changed.\n2. When ready to release, run `pnpm version` to apply version bumps and update changelogs.\n3. Run `pnpm release` (or let CI do it) to publish to npm.\n\nChangelogs are generated in GitHub format and linked to the `devgateway/data-viz-wordpress` repository.\n\n---\n\n## CI/CD\n\nThree GitHub Actions workflows live in `.github/workflows/`:\n\n| Workflow | Trigger | What it does |\n|---|---|---|\n| `build-and-release-wordpress.yml` | Manual dispatch | Builds the Docker image and pushes it to the registry with a semantic version tag |\n| `build-and-pre-release-wordpress.yml` | Manual dispatch | Same, but for pre-release tags |\n| `release-npm-packages.yml` | Push to `main` (packages/\\* or .changeset/\\* changed) or manual dispatch | Publishes updated npm packages via Changesets |\n\nDependabot is configured to open weekly PRs for npm dependency updates (max 1 open at a time).\n\n---\n\n## Contributing \u0026 Support\n\nContributions are welcome. Please read [CONTRIBUTING.md](.github/CONTRIBUTING.md) before opening a pull request.\n\n| Channel | Purpose |\n|---------|---------|\n| [GitHub Issues](https://github.com/devgateway/data-viz-wordpress/issues) | Bug reports and feature requests |\n| [GitHub Discussions](https://github.com/devgateway/data-viz-wordpress/discussions) | Questions and general discussion |\n| [info@developmentgateway.org](mailto:info@developmentgateway.org) | Direct contact with the Development Gateway team |\n| [SECURITY.md](.github/SECURITY.md) | Reporting security vulnerabilities privately |\n\nThis project is maintained by [Development Gateway](https://www.developmentgateway.org/).\n\n---\n\n## License\n\nGPL-2.0-or-later — see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevgateway%2Fdata-viz-wordpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevgateway%2Fdata-viz-wordpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevgateway%2Fdata-viz-wordpress/lists"}