h5p/h5p-core
H5P Core is the PHP foundation for integrating interactive H5P content into Laravel and PHP apps. It manages content types, libraries, dependencies, and rendering so you can embed rich HTML5 activities and quizzes.
Architecture fit
h5p/h5p-core (h5p-php-library) is not a Laravel package — it is a framework-agnostic PHP core with no service provider, no config file, no migrations, and no Laravel-facing contracts. It is designed for host-application embedding via two seams:
H5PFrameworkInterface — the host must implement ~40–50 methods covering library registry CRUD, content CRUD, file URL resolution, translation loading, and export/import bookkeeping. This is the real integration surface.content/, libraries/, temp/, editor/) that the core reads and writes directly.Conceptually this fits Laravel well as a bounded-context module (its own service provider, its own DB connection or table prefix, its own storage disk), but it is not a drop-in dependency. The TPM framing should be "adopt a library and build an adapter," not "install a package."
Integration feasibility Moderate-to-high effort, well-bounded. The interface is explicit and stable-ish, which makes the work estimable. The realistic paths are:
laravel-h5p as a reference implementation — faster start, but you inherit an opinionated, thinly maintained wrapper you will likely outgrow.The player itself is client-side JS (h5p.js + per-library bundles); only content resolution, library management, and the editor are PHP-side. That means the PHP footprint can be kept narrow.
Technical risk
Content-Type/X-Content-Type-Options, upload validation) is on the integrator..h5p uploads are ZIPs; need zip-slip, zip-bomb, and size/quota controls around extraction.Key questions
Stack fit Laravel 10/11 on PHP 8.1+ is workable — the core is plain PHP with no conflicting framework assumptions. The natural shape is a self-contained module:
H5PFramework adapter implementation.h5p_*) to isolate schema.content/ and libraries/.Migration path
laravel-h5p. Default to first-party unless timeline is aggressive.Compatibility
Pin the core to an explicit tag and vendor it in-repo (GPL permits and this simplifies patching). Maintain a library lockfile — a versioned manifest of installed H5P content-type libraries — and treat library upgrades as a release-gated operation with regression content. Do not let library versions float; do not run composer update against this dependency unsupervised.
Sequencing Adapter → asset/file serving → player → hardening → editor → lifecycle/upgrade tooling. Editor last: it is the largest surface, the highest security exposure, and the least valuable until players work. Keeping the player on a separate origin from day one avoids a painful retrofit later.
Maintenance You own the adapter permanently; upstream does not know or care about Laravel. Upstream is a small team with an active but modest release cadence — expect periodic security patches (editor, archive handling) and PHP-version bumps. Budget roughly 0.2–0.5 FTE steady state, with spike quarters when a content-type library or the editor needs upgrading. Vendoring the source means you can patch, but also means you must track upstream.
Support Support burden lands mostly on content authors, not infrastructure. The H5P editor UX is idiosyncratic and undocumented for end users; expect training material, a content-type allowlist, and a "why did my presentation break" support path. Infra support is comparatively light once the iframe isolation and storage layout are stable.
Scaling
PHP work is request-bound and modest (content metadata, library resolution). The heavy load is static assets — every content type ships many JS/CSS/font files. Put a CDN in front of libraries/ and content/; that is the difference between a cheap deployment and a slow one. Watch inode/file count: each installed content type expands into dozens-to-hundreds of files, which is unfriendly to object stores and to backup tooling. Editor uploads need size caps and, ideally, async processing.
Failure modes
Ramp-up
No official Laravel documentation exists; onboarding means reading H5PFrameworkInterface and a community wrapper. A competent Laravel engineer reaches a player-only MVP in ~2–4 weeks; a production editor with security hardening, quotas, and library management is realistically 6–10 weeks. Add legal review time for GPL up front and ongoing content-author training on the business side. Total cost of ownership is dominated by the adapter and upgrade discipline, not by the initial integration.
How can I help you explore Laravel packages today?