Repository navigation
Developer Guide
This guide is for people who want to understand, change, extend, test, or contribute to Stream Engine. It follows the path from a clean checkout to a reviewed pull request and documents the contracts that keep the platform, modules, themes, and site-specific code independent.
Stream Engine uses PHP 8.3 for the backend and TypeScript for browser code. The main development stack also includes MariaDB (MySQL 8.4 is also supported), Memcached, Twig, React, Vite, PHPUnit, and Vitest. You do not need to know every component before starting, but you should be comfortable with Git and command-line tools.
Important
Stream Engine is under active development. Public extension contracts are documented explicitly; do not assume that an internal class or directory is a stable API merely because it is accessible.
- Set up a development environment, install both dependency sets, create a local site, and run the same checks used by continuous integration.
- Read Architecture and request flow before changing shared bootstrap, routing, rendering, caching, or background-task behavior.
- Use the relevant extension chapter before adding a module, page action, theme, frontend entry point, or migration.
- Complete the security, test, documentation, and compatibility checks before
opening a pull request against
main, following Contributing.
- Getting started — fork or clone the repository, start the Docker development stack or prepare a host stack, install the application, build frontend assets, and run the baseline checks.
- Architecture and request flow — understand the composition root, layer ownership, request dispatch, rendering, frontend build, cache, and background-task boundaries.
- Database and migrations — create and test forward migrations, understand combined engine/site history and state, and maintain the fresh-install schema snapshot.
- Modules — discover and compose modules, declare public and runtime contributions, integrate templates and browser code, preserve dependency boundaries, and remove an extension safely.
- Pages and routing — design static and dynamic page trees, bind content, generate canonical URLs, preserve access and method boundaries, and test route changes.
- Themes — create and discover themes, define manifests and settings, inherit templates and assets, override module presentation, preserve the browser UI contract, and test compatibility.
- Frontend development — organize TypeScript and React code, define Vite entries, integrate public and administration features, localize and test browser behavior, and ship generated assets.
- API and security — register versioned JSON routes, define success and error contracts, enforce authentication, authorization and CSRF, validate input, and protect output, uploads, and secrets.
- Testing — choose truthful unit, component, repository, integration, and browser test scopes; manage fixtures and external state; run coverage; write regressions; and reproduce continuous integration.
- Localization and accessibility — maintain server and browser catalogs, plural/date/time and RTL behavior, semantic and keyboard contracts, assistive-technology expectations, and honest verification.
- Performance — design indexed access paths, prevent repeated and unbounded work, use caches safely, measure request, background, and frontend cost, and document current platform limits.
- Releases — choose and synchronize a version, prepare release notes, snapshots and assets, test clean installation and upgrades, tag an immutable commit, and verify public distribution.
-
Contributing — scope an issue, work from a
fork and focused branch, preserve project contracts, submit evidence with a
pull request to
main, respond to review, and meet the definition of done.
The planned core chapter set is now published. Keep each chapter synchronized with the implementation in the same pull request that changes its contract. Add another page only when it has distinct ownership and lifecycle; otherwise extend the existing canonical chapter so guidance cannot drift between pages.
- Commands run from the repository root unless a section says otherwise.
- Docker commands use the development-only
docker-compose.ymlcommitted to the repository. - Commands without a
docker composeprefix run on the host. -
mainis the pull-request target and the reference branch for current development. - Paths are relative to the repository root.
- A documented extension contract is normative; an example is illustrative.