SysVector - PHP Framework


Informações do Projeto

SysVector é um sistema desenvolvido por Marco Costa (contato@syspanel.com.br), com código-fonte licenciado sob a Licença MIT.

Software Gratuito

Project website: https://sysvector.syspanel.com.br

## Donations via PayPal If you wish to support the development of SysVector, consider making a donation via PayPal to:

Doações via PAYPAL

Se você deseja apoiar o desenvolvimento do SysVector, considere fazer uma doação via PAYPAL para Donate via PayPal


🚀 Features

Core Features

  • MVC Architecture - Clean separation of concerns with Models, Views, and Controllers
  • Modern PHP 8.3 - Built with latest PHP features and best practices
  • Database Abstraction - Uses Illuminate Database (Eloquent ORM) for database operations
  • Templating Engine - Twig for powerful and secure template rendering
  • Routing System - Symfony Routing component for flexible URL routing
  • Dependency Injection - PHP-DI for managing class dependencies
  • Security - Built-in CSRF protection and input sanitization

Advanced Features

  • Logging - Monolog for comprehensive application logging
  • Email Logging - Dedicated email logging system with detailed metrics and fallback tracking
  • Advanced Logging - Structured logging system with multiple levels and categories (errors, database, security, performance)
  • Caching - Symfony Cache for performance optimization
  • Console Commands - Symfony Console for CLI operations
  • Email Support - Symfony Mailer for sending emails
  • Image Processing - Intervention Image for image manipulation
  • Multilingual Support - Built-in translation system for multiple languages

🔧 Installation

1. Prerequisites

Before installing SysVector, ensure you have the following:

2. Get the Project

Download the project from the official website: https://sysvector.syspanel.com.br

Extract the file and navigate to the project directory:

cd SysVector

3. Install Dependencies

Use Composer to install the project dependencies:

composer install

4. Configure Environment

Copy the .env.example file to .env and configure your environment variables:

cp .env.example .env

Edit the .env file with your information:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database
DB_USERNAME=your_username
DB_PASSWORD=your_password

5. Set Permissions

Change the permissions of the storage, cache and logs directories to ensure that the web server can write to them:

chmod -R 775 storage
chmod -R 775 cache
chmod -R 775 logs

6. Generate Application Key

php bin/console generate:app-key

7. Run Migrations

Run migrations to create tables in the database:

php bin/console migrate:crudexample

📋 Logging System Configuration

SysVector includes a comprehensive logging system with two main components:

Email Logging System

Dedicated email logging system that tracks all email operations with detailed metrics:

Configuration

# Enable/disable email logging
LOG_EMAILS=true    # Enable detailed email logging
# LOG_EMAILS=false   # Disable email logging

Features

Log Location: logs/email.log

Advanced Logging System

Comprehensive logging system with multiple categories and configurable levels:

Configuration

# Configure logging level
ERROR_REPORTING=true    # Complete logging (DEBUG, INFO, WARNING, ERROR)
# ERROR_REPORTING=false   # Critical errors only (WARNING, ERROR, CRITICAL)
# ERROR_REPORTING=minimal  # Fatal errors only (ERROR, CRITICAL)
# ERROR_REPORTING=disabled # Disable all logging

Log Categories

Usage in Controllers

// Inject LoggingService
public function __construct(
    \App\Services\LoggingService $loggingService
) {
    $this->loggingService = $loggingService;
}

// Log different types of events
$this->loggingService->logApp('info', 'User action completed', $context);
$this->loggingService->logError('Database connection failed', $context, $exception);
$this->loggingService->logSecurity('login_attempt', 'User login', $context);
$this->loggingService->logPerformance('database_query', $duration, $context);

Features

Documentation: See logging_system_documentation.md for complete documentation.


📦 Dependencies

Core Framework

Frontend & Templating

Security & Authentication

Utilities


📁 Project Structure

SysVector/
├── app/                    # Application source code
│   ├── Console/           # Console commands
│   ├── Controllers/       # MVC Controllers
│   ├── Interfaces/        # PHP interfaces
│   ├── Middlewares/       # HTTP middlewares
│   ├── Models/            # MVC Models
│   ├── Repositories/      # Data repositories
│   └── Services/          # Application services
├── bin/                   # Executable scripts
├── bootstrap/             # Application bootstrap files
├── cache/                 # Cache files
├── config/                # Configuration files
├── database/              # Database files and migrations
├── logs/                  # Application logs
│   ├── app.log           # General application logs
│   ├── email.log         # Email operation logs
│   └── error_reporting/  # Advanced logging system
│       ├── errors-YYYY-MM-DD.log      # Error logs
│       ├── database-YYYY-MM-DD.log    # Database logs
│       ├── security-YYYY-MM-DD.log    # Security logs
│       └── performance-YYYY-MM-DD.log  # Performance logs
├── public/                # Public web root
├── resources/             # Application resources
│   └── views/            # Twig templates
├── storage/               # Application storage
├── tests/                 # Test files
└── vendor/                # Composer dependencies

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

📧 Support

If you encounter any issues or have questions, please:

Direitos Autorais