docs: consolidate documentation into organized structure

- Move 12 markdown files from root to docs/ subdirectories
- Organize documentation by category:
  • docs/troubleshooting/ (1 file)  - Technical troubleshooting guides
  • docs/deployment/      (4 files) - Deployment and security documentation
  • docs/guides/          (3 files) - Feature-specific guides
  • docs/planning/        (4 files) - Planning and improvement proposals

Root directory cleanup:
- Reduced from 16 to 4 markdown files in root
- Only essential project files remain:
  • CLAUDE.md (AI instructions)
  • README.md (Main project readme)
  • CLEANUP_PLAN.md (Current cleanup plan)
  • SRC_STRUCTURE_IMPROVEMENTS.md (Structure improvements)

This improves:
 Documentation discoverability
 Logical organization by purpose
 Clean root directory
 Better maintainability
This commit is contained in:
2025-10-05 11:05:04 +02:00
parent 887847dde6
commit 5050c7d73a
36686 changed files with 196456 additions and 12398919 deletions

View File

@@ -14,29 +14,29 @@ use App\Framework\Meta\MetaData;
use App\Framework\Router\ActionResult;
use App\Framework\Router\Result\Redirect;
use App\Framework\Router\Result\ViewResult;
use App\Framework\Smartlinks\Actions\ActionRegistry;
use App\Framework\Smartlinks\Commands\ExecuteSmartlinkCommand;
use App\Framework\Smartlinks\Commands\GenerateSmartlinkCommand;
use App\Framework\Smartlinks\Commands\GenerateSmartlinkHandler;
use App\Framework\Smartlinks\Services\SmartlinkService;
use App\Framework\Smartlinks\SmartLinkToken;
use App\Framework\Smartlinks\TokenAction;
use App\Framework\MagicLinks\Actions\ActionRegistry;
use App\Framework\MagicLinks\Commands\ExecuteMagicLinkCommand;
use App\Framework\MagicLinks\Commands\GenerateMagicLinkCommand;
use App\Framework\MagicLinks\Commands\GenerateMagicLinkHandler;
use App\Framework\MagicLinks\Services\MagicLinkService;
use App\Framework\MagicLinks\MagicLinkToken;
use App\Framework\MagicLinks\TokenAction;
final readonly class Smartlink
final readonly class MagicLink
{
public function __construct(
private CommandBus $commandBus,
private ActionRegistry $actionRegistry,
private SmartlinkService $smartlinkService,
private GenerateSmartlinkHandler $handler,
private MagicLinkService $magiclinkService,
private GenerateMagicLinkHandler $handler,
) {
}
#[Route('/smartlink/{token}', method: Method::GET)]
#[Route('/smartlink/{token}', method: Method::POST)]
#[Route('/magiclink/{token}', method: Method::GET)]
#[Route('/magiclink/{token}', method: Method::POST)]
public function execute(string $token, Request $request): ActionResult
{
$command = new GenerateSmartlinkCommand(
$command = new GenerateMagicLinkCommand(
action: new TokenAction('email_verification'),
payload: ['user_id' => 123, 'email' => 'user@example.com'],
baseUrl: 'https://localhost'
@@ -45,13 +45,13 @@ final readonly class Smartlink
#debug($this->handler->handle($command));
try {
$smartlinkToken = new SmartlinkToken($token);
$magiclinkToken = new MagicLinkToken($token);
// Token validieren
$smartlinkData = $this->smartlinkService->validate($smartlinkToken);
if (! $smartlinkData) {
$magiclinkData = $this->magiclinkService->validate($magiclinkToken);
if (! $magiclinkData) {
return new ViewResult(
template: 'smartlinks-error',
template: 'magiclinks-error',
metaData: new MetaData(
title: 'Ungültiger Link',
description: 'Der Link ist ungültig oder abgelaufen'
@@ -65,10 +65,10 @@ final readonly class Smartlink
}
// Action holen
$action = $this->actionRegistry->get($smartlinkData->action);
$action = $this->actionRegistry->get($magiclinkData->action);
if (! $action) {
return new ViewResult(
template: 'smartlinks-error',
template: 'magiclinks-error',
metaData: new MetaData(
title: 'Unbekannte Aktion',
description: 'Die angeforderte Aktion ist nicht verfügbar'
@@ -92,7 +92,7 @@ final readonly class Smartlink
];
// Command ausführen
$command = new ExecuteSmartlinkCommand($smartlinkToken, $context);
$command = new ExecuteMagicLinkCommand($magiclinkToken, $context);
$result = $this->commandBus->dispatch($command);
// Ergebnis verarbeiten
@@ -132,7 +132,7 @@ final readonly class Smartlink
} catch (\Exception $e) {
return new ViewResult(
template: 'smartlinks-error',
template: 'magiclinks-error',
metaData: new MetaData(
title: 'Systemfehler',
description: 'Ein unerwarteter Fehler ist aufgetreten'