How tempestphp/tempest-framework works
Project type and purpose
• Tempest is not a single full‑stack application but a modular PHP framework (monorepo) comprising multiple reusable packages (Core, Router, Database, View, Console, EventBus, CommandBus, etc.) plus a Vite plugin in JavaScript.
• Its README emphasizes “zero config, zero overhead” framework components that auto‑discover and wire application code (controllers, commands, migrations, view components) via dependency injection, middleware, events, and initializers.
File structure
• Top‑level directories:
– src/Tempest – each subfolder is a standalone Composer package (Auth, Cache, Clock, …, Vite).
– packages/vite‑plugin‑tempest – JavaScript plugin for integrating Vite into Tempest apps.
– bin/ and monorepo‑builder.php – CLI scripts to build, test, release packages.
– .github/workflows – CI pipelines for linting, testing, publishing.
• Composer.json and package.json define PHP and JS package metadata.
• public/index.php is a sample HTTP entrypoint.
• Tests directories (tests/, tests/Integration) validate each package’s functionality and end‑to‑end behavior.
README for additional insights
• Tempest is composed of:
a. Core kernel & configuration loader
b. HTTP stack (Router, Http, HttpClient)
c. Console (CLI command discovery/execution)
d. Database (ORM, migrations)
e. EventBus & CommandBus
f. View rendering (Blade/Twig-like)
g. Support libraries (Logging, Validation, Filesystem, Cache, Generation, Reflection, Container)
h. Vite integration (JS asset pipeline)
Details
• Package boundary and show how Initializers register services in the Container.
• Middleware ordering and how Console or HTTP layers invoke the same underlying EventBus/CommandBus.
• Vite plugin as a sidecar JS component that integrates at view‑rendering time.