A modern, declarative reconstruction of the Cwicly WordPress plugin.
This project upgrades the original Cwicly plugin to use the modern WordPress build system (@wordpress/scripts), externals management, and a refactored component-based framework.
This project uses Nix and devenv for a declarative, isolated development environment.
# Enter the nix development shell
nix develop
# Start the environment (Caddy, PHP-FPM, MySQL)
devenv upOnce the environment is up, the site is accessible via the Caddy Gateway:
- URL:
http://cwicly-rebuild.localhost:8000/index.php - Admin:
http://cwicly-rebuild.localhost:8000/wp-admin/ - Prefix Convention: All services route through the gateway on port
8000.
To build plugin assets (always run within nix develop):
npm run buildNote: The build is optimized for ESM and uses explicit entry points defined in package.json.
All development follows the Iterative Reconstruction Mandate defined in gemini.md:
- Iterative Planning: Create an
implementation_plan.mdandtask.mdbefore starting any phase. - ESM Compliance: All JavaScript imports MUST include
.jsextensions due to"type": "module"inpackage.json. - Asset Bundling: High-weight dependencies (Swiper, Leaflet) must be enqueued conditionally in PHP.
- Infrastructure: Services must use Unix Domain Sockets (UDS) for persistence.
- PHP Syntax: Validate changes via
php -l. - Visual Audit: Every phase requires a browser-based visual verification (captured in
walkthrough.md). - Parity Tests: Compare rebuilt block DOM against the original plugin in
sites/original/.
- Cwicly Store: Reconstructed as a standalone Redux store (
cwicly/base). - Standardized Inspector: Unified tabbed interface (
Primary,Design,Advanced). - Dynamic Data Binding: Live resolution via
useDynamicDatahook and Cwicly REST API. - Modern Slider Engine: High-performance Swiper.js integration for
cwicly/slider.
For a detailed history of the rebuild phases and visual verification proofs, see the walkthrough.md.