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

@@ -0,0 +1,57 @@
<?php
declare(strict_types=1);
use App\Framework\Svg\ValueObjects\Geometry\Position;
test('can create position with coordinates', function () {
$position = new Position(10.5, 20.3);
expect($position->x)->toBe(10.5)
->and($position->y)->toBe(20.3);
});
test('can create zero position', function () {
$position = Position::zero();
expect($position->x)->toBe(0.0)
->and($position->y)->toBe(0.0);
});
test('can translate position', function () {
$position = new Position(10, 20);
$translated = $position->translate(5, -10);
expect($translated->x)->toBe(15.0)
->and($translated->y)->toBe(10.0);
});
test('can calculate distance between positions', function () {
$pos1 = new Position(0, 0);
$pos2 = new Position(3, 4);
$distance = $pos1->distanceTo($pos2);
expect($distance)->toBe(5.0); // 3-4-5 triangle
});
test('can scale position', function () {
$position = new Position(10, 20);
$scaled = $position->scale(2.0);
expect($scaled->x)->toBe(20.0)
->and($scaled->y)->toBe(40.0);
});
test('can check equality with tolerance', function () {
$pos1 = new Position(10.0, 20.0);
$pos2 = new Position(10.0001, 20.0001);
expect($pos1->equals($pos2))->toBeTrue();
});
test('converts to SVG string', function () {
$position = new Position(10.5, 20.3);
expect($position->toSvgString())->toBe('10.50,20.30');
});

View File

@@ -0,0 +1,44 @@
<?php
declare(strict_types=1);
use App\Framework\Core\ValueObjects\RGBColor;
use App\Framework\Svg\ValueObjects\Styling\NamedColor;
use App\Framework\Svg\ValueObjects\Styling\SvgColor;
test('can create color from RGB', function () {
$color = SvgColor::fromRgb(255, 0, 0);
expect($color->toHex())->toBe('#ff0000');
});
test('can create color from hex', function () {
$color = SvgColor::fromHex('#00ff00');
expect($color->rgbColor->green)->toBe(255);
});
test('can create named colors', function () {
$black = SvgColor::black();
$white = SvgColor::white();
$red = SvgColor::red();
expect($black->toSvgValue())->toBe('black')
->and($white->toSvgValue())->toBe('white')
->and($red->toSvgValue())->toBe('red');
});
test('named color uses name over hex in SVG output', function () {
$color = SvgColor::fromNamed(NamedColor::BLUE);
expect($color->toSvgValue())->toBe('blue')
->and($color->toHex())->toBe('#0000ff');
});
test('can check if transparent', function () {
$transparent = SvgColor::transparent();
$opaque = SvgColor::red();
expect($transparent->isTransparent())->toBeTrue()
->and($opaque->isTransparent())->toBeFalse();
});