feat(Production): Complete production deployment infrastructure

- Add comprehensive health check system with multiple endpoints
- Add Prometheus metrics endpoint
- Add production logging configurations (5 strategies)
- Add complete deployment documentation suite:
  * QUICKSTART.md - 30-minute deployment guide
  * DEPLOYMENT_CHECKLIST.md - Printable verification checklist
  * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle
  * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference
  * production-logging.md - Logging configuration guide
  * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation
  * README.md - Navigation hub
  * DEPLOYMENT_SUMMARY.md - Executive summary
- Add deployment scripts and automation
- Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment
- Update README with production-ready features

All production infrastructure is now complete and ready for deployment.
This commit is contained in:
2025-10-25 19:18:37 +02:00
parent caa85db796
commit fc3d7e6357
83016 changed files with 378904 additions and 20919 deletions

View File

@@ -1,43 +0,0 @@
<?php
declare(strict_types=1);
namespace App\Framework\View\ValueObjects;
use ReflectionClass;
final readonly class ComponentMetadata
{
/**
* @param class-string<HtmlElement> $class
* @param array<string, \ReflectionMethod> $factories
* @param array<string, \ReflectionMethod> $modifiers
*/
public function __construct(
public string $class,
public array $factories,
public array $modifiers,
public ReflectionClass $reflection
) {
}
public function hasFactory(string $name): bool
{
return isset($this->factories[$name]);
}
public function hasModifier(string $name): bool
{
return isset($this->modifiers[$name]);
}
public function getFactory(string $name): ?\ReflectionMethod
{
return $this->factories[$name] ?? null;
}
public function getModifier(string $name): ?\ReflectionMethod
{
return $this->modifiers[$name] ?? null;
}
}

View File

@@ -11,7 +11,7 @@ final readonly class FormElement implements HtmlElement
public HtmlAttributes $attributes,
public string $content = ''
) {
if (!$this->tag->isFormElement()) {
if (! $this->tag->isFormElement()) {
throw new \InvalidArgumentException("Tag {$this->tag} is not a form element");
}
}
@@ -70,24 +70,28 @@ final readonly class FormElement implements HtmlElement
public static function submitButton(string $text = 'Submit'): self
{
$attributes = HtmlAttributes::empty()->withType('submit');
return new self(HtmlTag::button(), $attributes, $text);
}
public static function button(string $text, string $type = 'button'): self
{
$attributes = HtmlAttributes::empty()->withType($type);
return new self(HtmlTag::button(), $attributes, $text);
}
public static function label(string $text, string $for = ''): self
{
$attributes = $for ? HtmlAttributes::empty()->with('for', $for) : HtmlAttributes::empty();
return new self(HtmlTag::label(), $attributes, $text);
}
public static function textarea(string $name, string $content = ''): self
{
$attributes = HtmlAttributes::empty()->withName($name);
return new self(HtmlTag::textarea(), $attributes, $content);
}
@@ -128,4 +132,4 @@ final readonly class FormElement implements HtmlElement
return "<{$tagName}{$attributesPart}>{$this->content}</{$tagName}>";
}
}
}

View File

@@ -15,7 +15,7 @@ final readonly class FormId
throw new \InvalidArgumentException('FormId cannot be empty');
}
if (!preg_match('/^[a-zA-Z][a-zA-Z0-9_-]*$/', $value)) {
if (! preg_match('/^[a-zA-Z][a-zA-Z0-9_-]*$/', $value)) {
throw new \InvalidArgumentException('FormId must start with a letter and contain only letters, numbers, underscores, and hyphens');
}
}
@@ -24,6 +24,7 @@ final readonly class FormId
{
// Use the existing FormIdGenerator logic
$formId = $generator->generateFormId($route, $method);
return new self($formId);
}
@@ -51,4 +52,4 @@ final readonly class FormId
{
return $generator->isValidFormId($this);
}
}
}

View File

@@ -11,7 +11,8 @@ final readonly class HtmlAttributes
*/
public function __construct(
public array $attributes = []
) {}
) {
}
public static function empty(): self
{
@@ -128,4 +129,4 @@ final readonly class HtmlAttributes
return implode(' ', $parts);
}
}
}

View File

@@ -7,8 +7,10 @@ namespace App\Framework\View\ValueObjects;
interface HtmlElement
{
public HtmlTag $tag { get; }
public HtmlAttributes $attributes { get; }
public string $content { get; }
public function __toString(): string;
}
}

View File

@@ -8,7 +8,8 @@ final readonly class HtmlTag
{
public function __construct(
public TagName $name
) {}
) {
}
public static function div(): self
{
@@ -64,4 +65,4 @@ final readonly class HtmlTag
{
return $this->name->value;
}
}
}

View File

@@ -10,7 +10,8 @@ final readonly class StandardHtmlElement implements HtmlElement
public HtmlTag $tag,
public HtmlAttributes $attributes = new HtmlAttributes(),
public string $content = ''
) {}
) {
}
public static function create(TagName $tagName, ?HtmlAttributes $attributes = null, string $content = ''): self
{
@@ -48,4 +49,4 @@ final readonly class StandardHtmlElement implements HtmlElement
return "<{$tagName}{$attributesPart}>{$this->content}</{$tagName}>";
}
}
}

View File

@@ -23,7 +23,10 @@ enum TagName: string
case H5 = 'h5';
case H6 = 'h6';
case A = 'a';
case LINK = 'link';
case IMG = 'img';
case NAV = 'nav';
case HEADER = 'header';
case UL = 'ul';
case OL = 'ol';
case LI = 'li';
@@ -38,7 +41,7 @@ enum TagName: string
public function isSelfClosing(): bool
{
return match ($this) {
self::INPUT, self::IMG => true,
self::INPUT, self::IMG, self::LINK => true,
default => false
};
}
@@ -50,4 +53,4 @@ enum TagName: string
default => false
};
}
}
}