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:
31
app/Modules/Home/Controller.php
Normal file
31
app/Modules/Home/Controller.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Home;
|
||||
|
||||
use App\Core\Controller as BaseController;
|
||||
|
||||
/**
|
||||
* Home Controller
|
||||
* Handles homepage
|
||||
*/
|
||||
class Controller extends BaseController
|
||||
{
|
||||
/**
|
||||
* Show homepage
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if ($this->request()->expectsJson()) {
|
||||
return $this->json([
|
||||
'message' => 'Woles Framework 1.0 running 🚀',
|
||||
'version' => '1.0.0',
|
||||
'status' => 'active'
|
||||
]);
|
||||
}
|
||||
|
||||
return $this->view('Home.view.index', [
|
||||
'title' => 'Woles Framework v1.0',
|
||||
'message' => 'Woles Framework 1.0 running 🚀'
|
||||
]);
|
||||
}
|
||||
}
|
||||
7
app/Modules/Home/routes.php
Normal file
7
app/Modules/Home/routes.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Home Module Routes
|
||||
*/
|
||||
|
||||
$router->get('/', 'Home\Controller@index');
|
||||
143
app/Modules/Home/view/index.php
Normal file
143
app/Modules/Home/view/index.php
Normal file
@@ -0,0 +1,143 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ $title }}</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
'sans': ['Inter', 'system-ui', 'sans-serif'],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="font-sans bg-slate-50 min-h-screen">
|
||||
<!-- Header -->
|
||||
<header class="bg-white border-b border-slate-200">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0">
|
||||
<div class="w-8 h-8 bg-slate-900 rounded-md flex items-center justify-center">
|
||||
<span class="text-white font-bold text-sm">W</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<h1 class="text-xl font-semibold text-slate-900">Woles Framework</h1>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="hidden md:flex space-x-8">
|
||||
<a href="/login" class="text-slate-600 hover:text-slate-900 px-3 py-2 text-sm font-medium">Sign In</a>
|
||||
<a href="/error-reports" class="text-slate-600 hover:text-slate-900 px-3 py-2 text-sm font-medium">Reports</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
|
||||
<div class="text-center">
|
||||
<!-- Hero Section -->
|
||||
<div class="max-w-3xl mx-auto">
|
||||
<h1 class="text-4xl font-bold tracking-tight text-slate-900 sm:text-6xl">
|
||||
Enterprise-Grade PHP Framework
|
||||
</h1>
|
||||
<p class="mt-6 text-lg leading-8 text-slate-600">
|
||||
A minimalist, ultra-secure, high-performance PHP framework designed for modern enterprise applications.
|
||||
</p>
|
||||
<div class="mt-10 flex items-center justify-center gap-x-6">
|
||||
<a href="/login" class="rounded-md bg-slate-900 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-slate-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-slate-900">
|
||||
Get Started
|
||||
</a>
|
||||
<a href="/dashboard" class="text-sm font-semibold leading-6 text-slate-900 border border-slate-300 px-3.5 py-2.5 rounded-md hover:bg-slate-50">
|
||||
View Dashboard
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Features Grid -->
|
||||
<div class="mt-24">
|
||||
<div class="grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-4">
|
||||
<div class="bg-white p-6 rounded-lg border border-slate-200">
|
||||
<div class="w-12 h-12 bg-slate-100 rounded-lg flex items-center justify-center mb-4">
|
||||
<svg class="w-6 h-6 text-slate-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-lg font-semibold text-slate-900 mb-2">Security First</h3>
|
||||
<p class="text-slate-600 text-sm">Built-in CSRF protection, XSS filtering, and Argon2ID password hashing</p>
|
||||
</div>
|
||||
|
||||
<div class="bg-white p-6 rounded-lg border border-slate-200">
|
||||
<div class="w-12 h-12 bg-slate-100 rounded-lg flex items-center justify-center mb-4">
|
||||
<svg class="w-6 h-6 text-slate-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-lg font-semibold text-slate-900 mb-2">High Performance</h3>
|
||||
<p class="text-slate-600 text-sm">Optimized for PHP 8.2+ with JIT compilation and minimal footprint</p>
|
||||
</div>
|
||||
|
||||
<div class="bg-white p-6 rounded-lg border border-slate-200">
|
||||
<div class="w-12 h-12 bg-slate-100 rounded-lg flex items-center justify-center mb-4">
|
||||
<svg class="w-6 h-6 text-slate-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-lg font-semibold text-slate-900 mb-2">Clean Architecture</h3>
|
||||
<p class="text-slate-600 text-sm">Modular HMVC structure with dependency injection and PSR-4 autoloading</p>
|
||||
</div>
|
||||
|
||||
<div class="bg-white p-6 rounded-lg border border-slate-200">
|
||||
<div class="w-12 h-12 bg-slate-100 rounded-lg flex items-center justify-center mb-4">
|
||||
<svg class="w-6 h-6 text-slate-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zM21 5a2 2 0 00-2-2h-4a2 2 0 00-2 2v12a4 4 0 004 4h4a2 2 0 002-2V5z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-lg font-semibold text-slate-900 mb-2">Modern UI</h3>
|
||||
<p class="text-slate-600 text-sm">Professional Tailwind CSS design with responsive layouts</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- System Status -->
|
||||
<div class="mt-16 bg-white rounded-lg border border-slate-200 p-8">
|
||||
<h2 class="text-lg font-semibold text-slate-900 mb-6">System Status</h2>
|
||||
<div class="grid grid-cols-1 sm:grid-cols-3 gap-6">
|
||||
<div class="text-center">
|
||||
<div class="text-2xl font-bold text-slate-900"><?php echo PHP_VERSION; ?></div>
|
||||
<div class="text-sm text-slate-600">PHP Version</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<div class="text-2xl font-bold text-slate-900"><?php echo round(memory_get_usage(true) / 1024 / 1024, 2); ?>MB</div>
|
||||
<div class="text-sm text-slate-600">Memory Usage</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<div class="text-2xl font-bold text-slate-900">v1.0.0</div>
|
||||
<div class="text-sm text-slate-600">Framework Version</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="bg-white border-t border-slate-200 mt-24">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<div class="text-center text-sm text-slate-500">
|
||||
<p>© 2024 Woles Framework. Built for enterprise applications.</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user