feat(cms): implement complete SysSiteCMS content management system

Initial implementation of the HomeSysPanel CMS built with Laravel 13.0.
Includes complete admin panel, content management, user authentication,
modular architecture for products/services/chatbot, and marketing tools.

Key features:
- User authentication with email verification and password reset
- Role-based access control (Admin/User with granular permissions)
- Content management (pages, news, FAQ, downloads, galleries, banners)
- Contact management system with subjects and responses
- Marketing tools (email campaigns, visitor analytics, social sharing)
- Modular architecture (Products, Services, Chatbot modules)
- AI Chatbot integration with OpenRouter.ai and LlamaCpp support
- Visitor tracking with geolocation
- SEO optimization with meta tags and Open Graph
- Responsive design with Bootstrap 5
- Dark mode support
- Maintenance mode
- Feature request system
This commit is contained in:
marco
2026-09-07 19:06:53 -03:00
commit 38295e7e88
279 changed files with 33691 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use App\Models\User;
class FeatureRequestNotification extends Notification
{
use Queueable;
protected $user;
protected $description;
/**
* Create a new notification instance.
*/
public function __construct($user, string $description)
{
$this->user = $user;
$this->description = $description;
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(object $notifiable): array
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*/
public function toMail(object $notifiable): MailMessage
{
return (new MailMessage)
->subject('Solicitação de Nova Funcionalidade - ' . config('app.name'))
->greeting('Olá, equipe SysSiteCMS!')
->line('Um usuário solicitou uma nova funcionalidade para o sistema.')
->line('**Dados do Usuário:**')
->line('- **Nome:** ' . $this->user->name)
->line('- **E-mail:** ' . $this->user->email)
->line('- **Empresa:** ' . ($this->user->company ?? 'Não informado'))
->line('**Necessidade Descrita:**')
->line($this->description)
->line('Favor entrar em contato com o cliente para orçamento.');
}
}
+100
View File
@@ -0,0 +1,100 @@
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use App\Models\Gallery;
use App\Models\User;
class GalleryActionNotification extends Notification
{
use Queueable;
protected $gallery;
protected $user;
protected $action; // 'created', 'updated', 'photo_added', 'photo_deleted'
/**
* Create a new notification instance.
*/
public function __construct(Gallery $gallery, User $user, string $action)
{
$this->gallery = $gallery;
$this->user = $user;
$this->action = $action;
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(object $notifiable): array
{
$channels = [];
$prefs = $notifiable->preferences ?? [];
if ($prefs['notifications_gallery_actions'] ?? true) {
if ($prefs['notifications_email'] ?? true) {
$channels[] = 'mail';
}
if ($prefs['notifications_system'] ?? true) {
$channels[] = 'database';
}
}
return $channels;
}
/**
* Get the mail representation of the notification.
*/
public function toMail(object $notifiable): MailMessage
{
$actionMap = [
'created' => 'criada',
'updated' => 'atualizada',
'photo_added' => 'com nova foto adicionada',
'photo_deleted' => 'com foto removida',
];
$actionText = $actionMap[$this->action] ?? 'modificada';
return (new MailMessage)
->subject('Galeria ' . ucfirst($actionText) . ' - ' . config('app.name'))
->greeting('Olá, ' . $notifiable->name)
->line('Uma galeria de fotos foi ' . $actionText . ' por ' . $this->user->name . '.')
->line('**Título da Galeria:** ' . $this->gallery->title)
->action('Gerenciar Galerias', route('admin.galleries.index'))
->line('Obrigado por usar nosso sistema!');
}
/**
* Get the array representation of the notification.
*
* @return array<string, mixed>
*/
public function toArray(object $notifiable): array
{
$actionMap = [
'created' => 'criada',
'updated' => 'atualizada',
'photo_added' => 'foto adicionada',
'photo_deleted' => 'foto removida',
];
$actionText = $actionMap[$this->action] ?? 'modificada';
return [
'gallery_id' => $this->gallery->id,
'name' => $this->user->name,
'email' => $this->user->email,
'action' => $this->action,
'message' => "Galeria '{$this->gallery->title}': {$actionText}.",
'link' => route('admin.galleries.edit', $this->gallery->id)
];
}
}
+80
View File
@@ -0,0 +1,80 @@
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use App\Models\ContactMessage;
class NewContactMessageNotification extends Notification
{
use Queueable;
protected $contact;
/**
* Create a new notification instance.
*/
public function __construct(ContactMessage $contact)
{
$this->contact = $contact;
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(object $notifiable): array
{
$channels = [];
// Verifica as preferências do usuário (notifiable)
$prefs = $notifiable->preferences ?? [];
if ($prefs['notifications_email'] ?? true) {
$channels[] = 'mail';
}
if ($prefs['notifications_system'] ?? true) {
$channels[] = 'database';
}
return $channels;
}
/**
* Get the mail representation of the notification.
*/
public function toMail(object $notifiable): MailMessage
{
return (new MailMessage)
->subject('Novo Contato Recebido - ' . config('app.name'))
->greeting('Olá, ' . $notifiable->name)
->line('Você recebeu uma nova mensagem de contato através do site.')
->line('**Nome:** ' . $this->contact->name)
->line('**E-mail:** ' . $this->contact->email)
->line('**Mensagem:**')
->line($this->contact->message)
->action('Visualizar no Painel', route('admin.contacts.show', $this->contact->id))
->line('Obrigado por usar nosso sistema!');
}
/**
* Get the array representation of the notification.
*
* @return array<string, mixed>
*/
public function toArray(object $notifiable): array
{
return [
'contact_id' => $this->contact->id,
'name' => $this->contact->name,
'email' => $this->contact->email,
'message' => 'Nova mensagem de contato recebida.',
'link' => route('admin.contacts.show', $this->contact->id)
];
}
}
+79
View File
@@ -0,0 +1,79 @@
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use App\Models\User;
class NewUserRegisteredNotification extends Notification
{
use Queueable;
protected $newUser;
/**
* Create a new notification instance.
*/
public function __construct(User $newUser)
{
$this->newUser = $newUser;
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(object $notifiable): array
{
$channels = [];
$prefs = $notifiable->preferences ?? [];
// Se o admin quiser receber notificações de novos usuários
if ($prefs['notifications_new_users'] ?? true) {
if ($prefs['notifications_email'] ?? true) {
$channels[] = 'mail';
}
if ($prefs['notifications_system'] ?? true) {
$channels[] = 'database';
}
}
return $channels;
}
/**
* Get the mail representation of the notification.
*/
public function toMail(object $notifiable): MailMessage
{
return (new MailMessage)
->subject('Novo Usuário Cadastrado - ' . config('app.name'))
->greeting('Olá, ' . $notifiable->name)
->line('Um novo usuário acaba de se cadastrar no site.')
->line('**Nome:** ' . $this->newUser->name)
->line('**E-mail:** ' . $this->newUser->email)
->line('**Empresa:** ' . ($this->newUser->company ?? 'Não informado'))
->action('Gerenciar Usuários', route('admin.users.index'))
->line('Obrigado por usar nosso sistema!');
}
/**
* Get the array representation of the notification.
*
* @return array<string, mixed>
*/
public function toArray(object $notifiable): array
{
return [
'user_id' => $this->newUser->id,
'name' => $this->newUser->name,
'email' => $this->newUser->email,
'message' => 'Novo usuário cadastrado: ' . $this->newUser->name,
'link' => route('admin.users.edit', $this->newUser->id)
];
}
}
+98
View File
@@ -0,0 +1,98 @@
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use App\Models\News;
use App\Models\User;
class NewsActionNotification extends Notification
{
use Queueable;
protected $news;
protected $user;
protected $action; // 'created', 'updated', 'photo_added', 'photo_deleted'
/**
* Create a new notification instance.
*/
public function __construct(News $news, User $user, string $action)
{
$this->news = $news;
$this->user = $user;
$this->action = $action;
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(object $notifiable): array
{
$channels = [];
$prefs = $notifiable->preferences ?? [];
if ($prefs['notifications_system'] ?? true) {
$channels[] = 'database';
}
if ($prefs['notifications_email'] ?? true) {
$channels[] = 'mail';
}
return $channels;
}
/**
* Get the mail representation of the notification.
*/
public function toMail(object $notifiable): MailMessage
{
$actionMap = [
'created' => 'criada',
'updated' => 'atualizada',
'photo_added' => 'com nova imagem adicionada',
'photo_deleted' => 'com imagem removida',
];
$actionText = $actionMap[$this->action] ?? 'modificada';
return (new MailMessage)
->subject('Notícia ' . ucfirst($actionText) . ' - ' . config('app.name'))
->greeting('Olá, ' . $notifiable->name)
->line('Uma notícia foi ' . $actionText . ' por ' . $this->user->name . '.')
->line('**Título:** ' . $this->news->title)
->action('Gerenciar Notícias', route('admin.news.index'))
->line('Obrigado por usar nosso sistema!');
}
/**
* Get the array representation of the notification.
*
* @return array<string, mixed>
*/
public function toArray(object $notifiable): array
{
$actionMap = [
'created' => 'criada',
'updated' => 'atualizada',
'photo_added' => 'imagem adicionada',
'photo_deleted' => 'imagem removida',
];
$actionText = $actionMap[$this->action] ?? 'modificada';
return [
'news_id' => $this->news->id,
'name' => $this->user->name,
'email' => $this->user->email,
'action' => $this->action,
'message' => "Notícia '{$this->news->title}': {$actionText}.",
'link' => route('admin.news.edit', $this->news->id)
];
}
}
+88
View File
@@ -0,0 +1,88 @@
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use App\Models\Page;
use App\Models\User;
class PageActionNotification extends Notification
{
use Queueable;
protected $page;
protected $user;
protected $action; // 'created' or 'updated'
/**
* Create a new notification instance.
*/
public function __construct(Page $page, User $user, string $action)
{
$this->page = $page;
$this->user = $user;
$this->action = $action;
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(object $notifiable): array
{
$channels = [];
$prefs = $notifiable->preferences ?? [];
// Se o admin quiser receber notificações de alterações em páginas
if ($prefs['notifications_page_actions'] ?? true) {
if ($prefs['notifications_email'] ?? true) {
$channels[] = 'mail';
}
if ($prefs['notifications_system'] ?? true) {
$channels[] = 'database';
}
}
return $channels;
}
/**
* Get the mail representation of the notification.
*/
public function toMail(object $notifiable): MailMessage
{
$actionText = $this->action === 'created' ? 'criada' : 'atualizada';
return (new MailMessage)
->subject('Página ' . ucfirst($actionText) . ' - ' . config('app.name'))
->greeting('Olá, ' . $notifiable->name)
->line('Uma página do site foi ' . $actionText . ' por ' . $this->user->name . '.')
->line('**Título da Página:** ' . $this->page->title)
->line('**Slug:** ' . $this->page->slug)
->action('Gerenciar Páginas', route('admin.pages.index'))
->line('Obrigado por usar nosso sistema!');
}
/**
* Get the array representation of the notification.
*
* @return array<string, mixed>
*/
public function toArray(object $notifiable): array
{
$actionText = $this->action === 'created' ? 'criada' : 'atualizada';
return [
'page_id' => $this->page->id,
'name' => $this->user->name,
'email' => $this->user->email,
'action' => $this->action,
'message' => "Página '{$this->page->title}' foi {$actionText}.",
'link' => route('admin.pages.edit', $this->page->id)
];
}
}