feat: release SysMVC 2.0 with enhanced CSRF protection and UI improvements

Major version upgrade from 1.0.0 to 2.0.0 including copyright year updates, website URL migration to syspanel.com.br, and comprehensive CSRF token handling improvements. The Twig csrf() helper now returns a complete hidden input field instead of a raw token value, and token generation is now automatic when empty. Session initialization has been centralized in BaseController, and child controllers now properly call parent constructors. CRUD views have been modernized with flexbox layouts and consistent CSRF rendering. Documentation has been expanded with features, requirements, and project structure sections, and donation sections have been added across all pages.
This commit is contained in:
marco
2026-09-04 15:43:17 -03:00
parent 281fdee119
commit 5a2482b030
50 changed files with 1318 additions and 199 deletions
+126 -83
View File
@@ -1,85 +1,114 @@
@extends('layout')
@section('title', 'Project Information')
@section('title', 'Readme - SysMVC')
@section('content')
<div class="container mt-5">
<h1 class="display-4 text-primary">SysMVC - PHP Framework</h1>
<br>
<h1 class="display-4 text-primary">SysMVC</h1>
<p class="lead">A lightweight PHP MVC framework by Marco Costa — MIT License</p>
<p>Github: <a href="https://github.com/syspanel/SysMVC.git" target="_blank">https://github.com/syspanel/SysMVC.git</a></p>
<br><br>
<p class="lead">Project Information</p>
<p><strong>SysMVC</strong> is a system developed by <strong>Marco Costa</strong> (<a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a>), with source code licensed under the <strong>MIT License</strong>.</p>
<p>
<strong>SysMVC</strong> is a system developed by <strong>Marco Costa</strong>
(<a href="mailto:syspanel@gmx.com">syspanel@gmx.com</a>), with source code licensed under the <strong>MIT License</strong>.
</p>
<p>This software is offered for free and can be used, modified, and distributed under the terms of the MIT License.</p>
<p>Project website: <a href="https://sysmvc.syspanel.com.br">https://sysmvc.syspanel.com.br</a></p>
## Donations via PayPal
<p>
<strong>Website:</strong> <a href="https://sysmvc.syspanel.com.br" target="_blank">https://sysmvc.syspanel.com.br</a><br>
<strong>GitHub:</strong> <a href="https://github.com/syspanel/SysMVC" target="_blank">https://github.com/syspanel/SysMVC</a>
</p>
If you wish to support the development of SysMVC, consider making a donation via PayPal to:
<hr class="my-5">
<h2 class="mt-4">Donations via PAYPAL</h2>
<p>If you wish to support the development of SysMVC, consider making a donation via PAYPAL to <a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com&currency_code=USD" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal"></a></p>
{{-- Donations --}}
<h2 class="mt-4">&#128590; Support the Project</h2>
<p>If you find this project useful, consider supporting its development with a donation via PayPal:</p>
<p>
<a href="https://www.paypal.com/donate/?business=marcocosta@gmx.com&currency_code=USD" target="_blank">
<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate via PayPal">
</a>
</p>
<hr>
<hr class="my-5">
<h2 class="mt-4">🚀 Installation Tutorial</h2>
<h3>✅ Prerequisites</h3>
{{-- Features --}}
<h2 class="mt-4">&#128640; Features</h2>
<ul>
<li><strong>PHP 8.1</strong> or higher</li>
<li><strong>Composer</strong> (dependency manager for PHP)</li>
<li><strong>Web Server</strong> (Apache or Nginx)</li>
<li><strong>MySQL</strong> or other compatible database</li>
<li><strong>MVC Architecture</strong> &mdash; clean separation of concerns with Models, Views, and Controllers</li>
<li><strong>ORM (Eloquent)</strong> &mdash; database access via <code>illuminate/database</code> (Laravel's Eloquent ORM)</li>
<li><strong>Twin Template Engines</strong> &mdash; BladeOne and Twig, configured side by side</li>
<li><strong>Dependency Injection</strong> &mdash; PHP-DI container with autowiring</li>
<li><strong>Routing</strong> &mdash; flexible HTTP routing via Pecee SimpleRouter</li>
<li><strong>CSRF Protection</strong> &mdash; built-in token generation and validation</li>
<li><strong>Security Headers</strong> &mdash; applied automatically via <code>BaseController</code></li>
<li><strong>Input/Output Sanitisation</strong> &mdash; <code>Sanitizer</code> service with email and URL awareness</li>
<li><strong>CLI Console</strong> &mdash; Symfony Console commands for key generation and database migrations</li>
<li><strong>Logging</strong> &mdash; Monolog writes to <code>logs/app.log</code></li>
<li><strong>Mail</strong> &mdash; Symfony Mailer integration</li>
<li><strong>Authentication</strong> &mdash; Delight Auth and PHP Auth libraries</li>
</ul>
<h3>🔧 Step-by-Step</h3>
<hr class="my-5">
<h4>1️⃣ Unzip the File</h4>
{{-- Requirements --}}
<h2 class="mt-4">&#128295; Requirements</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Requirement</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr><td>PHP</td><td>&gt;= 7.4</td></tr>
<tr><td>Composer</td><td>latest stable</td></tr>
<tr><td>Web Server</td><td>Apache or Nginx</td></tr>
<tr><td>Database</td><td>MySQL 5.7+</td></tr>
</tbody>
</table>
<hr class="my-5">
{{-- Installation --}}
<h2 class="mt-4">&#128736;&#127997; Installation</h2>
<h4>1&deg; Unzip the File</h4>
<p>Download and unzip the SysMVC file to your local environment:</p>
<pre><code>unzip sysmvc.zip -d sysmvc
cd sysmvc
</code></pre>
cd sysmvc</code></pre>
<h4>2️⃣ Install the Dependencies</h4>
<h4>2&deg; Install the Dependencies</h4>
<p>Use Composer to install the project dependencies:</p>
<pre><code>composer install
</code></pre>
<pre><code>composer install</code></pre>
<h4>3️⃣ Configure the Environment</h4>
<h4>3&deg; Configure the Environment</h4>
<p>Copy the <code>.env.example</code> file to <code>.env</code> and configure your environment variables:</p>
<pre><code>cp .env.example .env
</code></pre>
<pre><code>cp .env.example .env</code></pre>
<p>Open the <code>.env</code> file and edit the following lines with your information:</p>
<pre><code>DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database
DB_USERNAME=your_username
DB_PASSWORD=your_password
</code></pre>
DB_PASSWORD=your_password</code></pre>
<h4>4️⃣ Set Permissions</h4>
<p>Change the permissions of the storage and cache directories to ensure the web server can write to them:</p>
<h4>4&deg; Set Permissions</h4>
<p>Change the permissions of the storage, cache, and logs directories to ensure the web server can write to them:</p>
<pre><code>chmod -R 775 storage
chmod -R 775 bootstrap/cache
</code></pre>
chmod -R 775 cache
chmod -R 775 logs
chmod -R 775 bootstrap/cache</code></pre>
<h4>5️⃣ Generate the Application Key</h4>
<pre><code>php bin/console generate:app-key
</code></pre>
<h4>5&deg; Generate the Application Key</h4>
<pre><code>php bin/console generate:app-key</code></pre>
<h4>6️⃣ Run the Migrations</h4>
<h4>6&deg; Run the Migrations</h4>
<p>Run the migrations to create the tables in the database:</p>
<pre><code>php bin/console migrate:crudexample
</code></pre>
<pre><code>php bin/console migrate:crudexample</code></pre>
<h4>7️⃣ Configure the Web Server</h4>
<h4>7&deg; Configure the Web Server</h4>
<h5>📌 Apache</h5>
<h5>&#128196; Apache</h5>
<p>Add the following configuration to your Apache configuration file:</p>
<pre><code>&lt;VirtualHost *:80&gt;
ServerName sysmvc.local
@@ -89,10 +118,9 @@ chmod -R 775 bootstrap/cache
AllowOverride All
Require all granted
&lt;/Directory&gt;
&lt;/VirtualHost&gt;
</code></pre>
&lt;/VirtualHost&gt;</code></pre>
<h5>📌 Nginx</h5>
<h5>&#128196; Nginx</h5>
<p>Add the following configuration to your Nginx configuration file:</p>
<pre><code>server {
listen 80;
@@ -109,46 +137,61 @@ chmod -R 775 bootstrap/cache
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
}
</code></pre>
}</code></pre>
<hr>
<hr class="my-5">
<h2 class="mt-4">📦 Dependencies Used</h2>
{{-- Dependencies --}}
<h2 class="mt-4">&#128230; Dependencies Used</h2>
<p>The project uses the following third-party packages, each with its respective license:</p>
<h3>✅ Packages with MIT License</h3>
<ul>
<li><strong>Illuminate Database</strong> → <a href="https://github.com/illuminate/database" target="_blank">illuminate/database</a></li>
<li><strong>Monolog</strong> → <a href="https://github.com/Seldaek/monolog" target="_blank">monolog/monolog</a></li>
<li><strong>BladeOne</strong> → <a href="https://github.com/EFTEC/BladeOne" target="_blank">eftec/bladeone</a></li>
<li><strong>Twig</strong> → <a href="https://github.com/twigphp/Twig" target="_blank">twig/twig</a></li>
<li><strong>Symfony Console</strong> → <a href="https://github.com/symfony/console" target="_blank">symfony/console</a></li>
<li><strong>Phinx</strong> → <a href="https://github.com/cakephp/phinx" target="_blank">robmorgan/phinx</a></li>
<li><strong>Defuse Encryption</strong> → <a href="https://github.com/defuse/php-encryption" target="_blank">defuse/php-encryption</a></li>
<li><strong>Random Compatibility</strong> → <a href="https://github.com/paragonie/random_compat" target="_blank">paragonie/random_compat</a></li>
<li><strong>Rakit Validation</strong> → <a href="https://github.com/rakit/validation" target="_blank">rakit/validation</a></li>
<li><strong>Carbon</strong> → <a href="https://github.com/briannesbitt/Carbon" target="_blank">nesbot/carbon</a></li>
<li><strong>Flysystem</strong> → <a href="https://github.com/thephpleague/flysystem" target="_blank">league/flysystem</a></li>
<li><strong>Intervention Image</strong> → <a href="https://github.com/Intervention/image" target="_blank">intervention/image</a></li>
<li><strong>Symfony Cache</strong> → <a href="https://github.com/symfony/cache" target="_blank">symfony/cache</a></li>
<li><strong>Predis Redis Client</strong> → <a href="https://github.com/predis/predis" target="_blank">predis/predis</a></li>
<li><strong>PHP Dependency Injection</strong> → <a href="https://github.com/PHP-DI/PHP-DI" target="_blank">php-di/php-di</a></li>
<li><strong>Symfony Dotenv</strong> → <a href="https://github.com/symfony/dotenv" target="_blank">symfony/dotenv</a></li>
<li><strong>Pecee SimpleRouter</strong> → <a href="https://github.com/pecee/pecee-simple-router" target="_blank">pecee/simple-router</a></li>
<li><strong>Nyholm PSR7</strong> → <a href="https://github.com/Nyholm/psr7" target="_blank">nyholm/psr7</a></li>
<li><strong>FakerPHP Faker</strong> → <a href="https://github.com/FakerPHP/Faker" target="_blank">fakerphp/faker</a></li>
<li><strong>Symfony Mailer</strong> → <a href="https://github.com/symfony/mailer" target="_blank">symfony/mailer</a></li>
</ul>
<h3>&#10004; Packages with MIT License</h3>
<ul>
<li><strong>Illuminate Database</strong> &rarr; <code>illuminate/database</code></li>
<li><strong>PHP Auth</strong> &rarr; <code>phpauth/phpauth</code></li>
<li><strong>Monolog</strong> &rarr; <code>monolog/monolog</code></li>
<li><strong>BladeOne</strong> &rarr; <code>eftec/bladeone</code></li>
<li><strong>BladeOne HTML</strong> &rarr; <code>eftec/bladeonehtml</code></li>
<li><strong>Twig</strong> &rarr; <code>twig/twig</code></li>
<li><strong>Symfony Console</strong> &rarr; <code>symfony/console</code></li>
<li><strong>Symfony Mailer</strong> &rarr; <code>symfony/mailer</code></li>
<li><strong>Symfony Cache</strong> &rarr; <code>symfony/cache</code></li>
<li><strong>Symfony Dotenv</strong> &rarr; <code>symfony/dotenv</code></li>
<li><strong>Symfony Event Dispatcher</strong> &rarr; <code>symfony/event-dispatcher</code></li>
<li><strong>Symfony Filesystem</strong> &rarr; <code>symfony/filesystem</code></li>
<li><strong>Symfony Translation</strong> &rarr; <code>symfony/translation</code></li>
<li><strong>Symfony MIME</strong> &rarr; <code>symfony/mime</code></li>
<li><strong>Phinx</strong> &rarr; <code>robmorgan/phinx</code></li>
<li><strong>Defuse Encryption</strong> &rarr; <code>defuse/php-encryption</code></li>
<li><strong>Random Compatibility</strong> &rarr; <code>paragonie/random_compat</code></li>
<li><strong>Rakit Validation</strong> &rarr; <code>rakit/validation</code></li>
<li><strong>Carbon</strong> &rarr; <code>nesbot/carbon</code></li>
<li><strong>Flysystem</strong> &rarr; <code>league/flysystem</code></li>
<li><strong>Intervention Image</strong> &rarr; <code>intervention/image</code></li>
<li><strong>Predis Redis Client</strong> &rarr; <code>predis/predis</code></li>
<li><strong>PHP Dependency Injection</strong> &rarr; <code>php-di/php-di</code></li>
<li><strong>Pecee SimpleRouter</strong> &rarr; <code>pecee/simple-router</code></li>
<li><strong>Nyholm PSR7</strong> &rarr; <code>nyholm/psr7</code></li>
<li><strong>FakerPHP Faker</strong> &rarr; <code>fakerphp/faker</code></li>
<li><strong>Delight Auth</strong> &rarr; <code>delight-im/auth</code></li>
<li><strong>Delight DB</strong> &rarr; <code>delight-im/db</code></li>
<li><strong>Delight Cookie</strong> &rarr; <code>delight-im/cookie</code></li>
<li><strong>Delight HTTP</strong> &rarr; <code>delight-im/http</code></li>
<li><strong>Guzzle HTTP</strong> &rarr; <code>guzzlehttp/guzzle</code></li>
<li><strong>Guzzle Promises</strong> &rarr; <code>guzzlehttp/promises</code></li>
<li><strong>Guzzle PSR7</strong> &rarr; <code>guzzlehttp/psr7</code></li>
</ul>
<hr>
<hr class="my-5">
<h2 class="mt-4">📜 Terms of Use</h2>
{{-- Terms --}}
<h2 class="mt-4">&#128221; Terms of Use</h2>
<p>This project is licensed under the <strong>MIT License</strong>.</p>
<p>You can use, copy, modify, merge, publish, distribute, sublicense, or sell copies of the Software, provided that the license and copyright notice are included in all copies or substantial portions of the Software.</p>
<p>The Software is provided "as is", without any warranty of any kind. For more details, please consult the <a href="https://opensource.org/licenses/MIT" target="_blank">MIT License</a>.</p>
<p>For more information, contact: <a href="mailto:sysmvc@syspanel.com.br" target="_blank">sysmvc@syspanel.com.br</a></p>
<p>You can use, copy, modify, merge, publish, distribute, sublicense, or sell copies of the Software, as long as the license and copyright notice are included in all copies or substantial portions of the Software.</p>
<p>The Software is provided &ldquo;as is&rdquo;, without warranties of any kind. For more details, see the <a href="https://opensource.org/licenses/MIT" target="_blank">MIT License</a>.</p>
<p>For more information, contact: <a href="mailto:syspanel@gmx.com" target="_blank">syspanel@gmx.com</a></p>
<p class="text-center mt-5">&copy; 2026 Marco Costa &mdash; All rights reserved under the MIT License.</p>
<p class="text-center mt-5">© 2025 Marco Costa - All rights reserved under the MIT License.</p>
</div>
@endsection