refactor: reorganize project structure for better maintainability
- Move 45 debug/test files from root to organized scripts/ directories - Secure public/ directory by removing debug files (security improvement) - Create structured scripts organization: • scripts/debug/ (20 files) - Framework debugging tools • scripts/test/ (18 files) - Test and validation scripts • scripts/maintenance/ (5 files) - Maintenance utilities • scripts/dev/ (2 files) - Development tools Security improvements: - Removed all debug/test files from public/ directory - Only production files remain: index.php, health.php Root directory cleanup: - Reduced from 47 to 2 PHP files in root - Only essential production files: console.php, worker.php This improves: ✅ Security (no debug code in public/) ✅ Organization (clear separation of concerns) ✅ Maintainability (easy to find and manage scripts) ✅ Professional structure (clean root directory)
This commit is contained in:
36
src/Framework/MagicLinks/Actions/MagicLinkAction.php
Normal file
36
src/Framework/MagicLinks/Actions/MagicLinkAction.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Smartlinks\Actions;
|
||||
|
||||
use App\Framework\Smartlinks\SmartlinkData;
|
||||
use App\Framework\Smartlinks\TokenConfig;
|
||||
|
||||
interface SmartlinkAction
|
||||
{
|
||||
/**
|
||||
* Get the action name
|
||||
*/
|
||||
public function getName(): string;
|
||||
|
||||
/**
|
||||
* Get default configuration for this action
|
||||
*/
|
||||
public function getDefaultConfig(): TokenConfig;
|
||||
|
||||
/**
|
||||
* Validate the payload for this action
|
||||
*/
|
||||
public function validatePayload(array $payload): bool;
|
||||
|
||||
/**
|
||||
* Execute the action
|
||||
*/
|
||||
public function execute(SmartlinkData $smartlinkData, array $context = []): ActionResult;
|
||||
|
||||
/**
|
||||
* Get required permissions/roles for this action
|
||||
*/
|
||||
public function getRequiredPermissions(): array;
|
||||
}
|
||||
Reference in New Issue
Block a user