The Code Architecture

This page describes the Pushword monorepo and its development setup. For application structure, see Symfony best practices and the dev app. For extension points, see Extensions.

Code Architecture

The core and all officially maintained extensions live in one repository. The core provides the shared entities and rendering pipeline; optional bundles add product features. Larger core features that do not warrant a package live under Component/.

The experimental Rust acceleration design describes how selected Pushword operations could gain an optional native implementation while the complete PHP path remains available on shared hosting.

The dev app is the test, demo and documentation application, not a project template. The installer copies selected starter files from it into new projects.

On top of Symfony

The core and feature packages are built as Symfony bundles. The installer, project template, documentation and Node tooling packages are not bundles.

The core package requires a Symfony app installed to be functional.

Development environment

This setup is for contributing. To build a site, follow the installation guide.

  1. Check you have installed all the required dependencies.
  1. Fork if needed, then clone the repository.
  1. Install dependencies and initialize the dev app.
composer update && composer reset-dev-app

Useful commands

# php-cs-fixer
composer format

# run Rector and format
composer rector

# run phpstan
composer stan

# run the test suite
composer test

# to play with default app console (dev-app)
composer console ...

Packages

PackagePurposeDepends on
coreBase entities (Page, Media, User), entity filters, events, controllers, Twig extensions—
adminCRUD interface for Page, Media, User built on EasyAdmincore
admin-block-editorRich text / block editor for the admincore
advanced-main-imageMain image format options (hidden, hero, etc.) and default templatescore, admin
ai-skillsAI authoring skills (the /pw router skill and its reference playbooks) — Node package—
apiToken-authenticated REST API mirroring the admin, with an OpenAPI endpointcore, flat
conversationComments, contact forms, user inputcore, flat
docsProject documentation (ships to end users as vendor/pushword/docs/content/)—
flatFlat-file CMS mode: sync pages/media between database and filesystemcore
installerBootstraps a new Pushword projectcore
js-helperShared JavaScript utilities (Node package)—
admin-monaco-editorMonaco editor for the admin: Twig/YAML/JSON fields, and the markdown body with its toolbar (Node package)—
newProject template whose Flex requirements install the standard bundles—
link-improverAdd bounded, auditable internal links at render timecore
newsletterAudiences, contacts, segmented campaigns and criteria-driven automationscore
page-scannerDead link detection, 404/301 checks, TODO scanningcore
page-update-notifierEmail notifications on page editscore
quizInteractive client-side QCM / personality tests via a {% quiz %} blockcore
repurposeTurn a page into social carousels rendered as SVG slides (PNG/PDF export)core
searchOptional SQLite full-text search via Loupe (zero infra)core
dev-appDev/test/demo app (not a copy-paste starter for end users; formerly named skeleton)core
snippetReusable content fragments + dev-registered components, via snippet()core
static-generatorGenerate static HTML sitescore
template-editorEdit Twig templates from the admin UIcore
versionPage versioningcore