feat: Complete Woles Framework v1.0 with enterprise-grade UI

- Add comprehensive error handling system with custom error pages
- Implement professional enterprise-style design with Tailwind CSS
- Create modular HMVC architecture with clean separation of concerns
- Add security features: CSRF protection, XSS filtering, Argon2ID hashing
- Include CLI tools for development workflow
- Add error reporting dashboard with system monitoring
- Implement responsive design with consistent slate color scheme
- Replace all emoji icons with professional SVG icons
- Add comprehensive test suite with PHPUnit
- Include database migrations and seeders
- Add proper exception handling with fallback pages
- Implement template engine with custom syntax support
- Add helper functions and facades for clean code
- Include proper logging and debugging capabilities
This commit is contained in:
mwpn
2025-10-11 07:08:23 +07:00
commit 0b42271bfe
90 changed files with 8315 additions and 0 deletions

34
app/Core/Facades/App.php Normal file
View File

@@ -0,0 +1,34 @@
<?php
namespace App\Core\Facades;
/**
* NovaCore App Facade
* Static access to application services
*/
class App
{
/**
* Get service from container
*/
public static function get(string $name)
{
return app($name);
}
/**
* Check if service exists
*/
public static function has(string $name): bool
{
return app()->has($name);
}
/**
* Get all services
*/
public static function all(): array
{
return app()->getServices();
}
}

View File

@@ -0,0 +1,66 @@
<?php
namespace App\Core\Facades;
/**
* NovaCore Request Facade
* Static access to request services
*/
class Request
{
/**
* Get request instance
*/
public static function instance(): \App\Core\Request
{
return app('request');
}
/**
* Get all input data
*/
public static function all(): array
{
return self::instance()->all();
}
/**
* Get input value by key
*/
public static function input(string $key, $default = null)
{
return self::instance()->input($key, $default);
}
/**
* Get request method
*/
public static function method(): string
{
return self::instance()->method();
}
/**
* Get request URI
*/
public static function uri(): string
{
return self::instance()->uri();
}
/**
* Check if request is AJAX
*/
public static function isAjax(): bool
{
return self::instance()->isAjax();
}
/**
* Check if request expects JSON
*/
public static function expectsJson(): bool
{
return self::instance()->expectsJson();
}
}

View File

@@ -0,0 +1,50 @@
<?php
namespace App\Core\Facades;
/**
* NovaCore Response Facade
* Static access to response services
*/
class Response
{
/**
* Get response instance
*/
public static function instance(): \App\Core\Response
{
return app('response');
}
/**
* Set JSON response
*/
public static function json(array $data, int $status = 200): \App\Core\Response
{
return self::instance()->json($data, $status);
}
/**
* Set HTML response
*/
public static function html(string $content, int $status = 200): \App\Core\Response
{
return self::instance()->html($content, $status);
}
/**
* Redirect response
*/
public static function redirect(string $url, int $status = 302): void
{
self::instance()->redirect($url, $status);
}
/**
* Set status code
*/
public static function status(int $code): \App\Core\Response
{
return self::instance()->status($code);
}
}

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Core\Facades;
/**
* NovaCore Security Facade
* Static access to security services
*/
class Security
{
/**
* Get security instance
*/
public static function instance(): \App\Core\Security
{
return app('security');
}
/**
* Generate CSRF token
*/
public static function generateCsrfToken(): string
{
return self::instance()->generateCsrfToken();
}
/**
* Verify CSRF token
*/
public static function verifyCsrfToken(string $token): bool
{
return self::instance()->verifyCsrfToken($token);
}
/**
* Sanitize string input
*/
public static function sanitizeString(string $input): string
{
return self::instance()->sanitizeString($input);
}
/**
* Encrypt data
*/
public static function encrypt(string $data): string
{
return self::instance()->encrypt($data);
}
/**
* Decrypt data
*/
public static function decrypt(string $encryptedData): string
{
return self::instance()->decrypt($encryptedData);
}
/**
* Hash password
*/
public static function hashPassword(string $password): string
{
return self::instance()->hashPassword($password);
}
/**
* Verify password
*/
public static function verifyPassword(string $password, string $hash): bool
{
return self::instance()->verifyPassword($password, $hash);
}
}

42
app/Core/Facades/View.php Normal file
View File

@@ -0,0 +1,42 @@
<?php
namespace App\Core\Facades;
/**
* NovaCore View Facade
* Static access to view services
*/
class View
{
/**
* Get view instance
*/
public static function instance(): \App\Core\View
{
return app('view');
}
/**
* Render a view
*/
public static function render(string $view, array $data = []): string
{
return self::instance()->render($view, $data);
}
/**
* Check if view exists
*/
public static function exists(string $view): bool
{
return self::instance()->exists($view);
}
/**
* Share data with all views
*/
public static function share(string $key, $value): void
{
self::instance()->share($key, $value);
}
}