marwa-framework

Architecture

Overview

Marwa Framework is intentionally small. The architecture is built around a few core responsibilities:

Boot Flow

  1. Application is created with the host app base path.
  2. The container is initialized with reflection-based autowiring.
  3. .env is loaded and core singletons are bound.
  4. HttpKernel loads app config and delegates provider, module, and middleware setup to dedicated bootstrappers.
  5. Module providers are booted, menu contributions are collected, module routes are loaded, and module view namespaces are registered when enabled.
  6. The request enters RelayPipelineAdapter.
  7. RouterMiddleware dispatches to marwa-router.
  8. HttpKernel::terminate() emits the final response.

Console Boot Flow

  1. Application loads the environment and binds shared services.
  2. ConsoleKernel loads config/app.php and config/console.php.
  3. ProviderBootstrapper registers application service providers and ModuleBootstrapper binds the module registry/runtime.
  4. CommandRegistry collects built-in commands, configured commands, discovered commands, module commands, and optional package commands such as marwa-db.
  5. ConsoleApplication boots the Symfony Console runtime and runs the selected command.

Extension Points

Design Notes