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
63 lines
3.5 KiB
PHP
Executable File
63 lines
3.5 KiB
PHP
Executable File
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Modules\Chatbot\Http\Controllers\ChatbotApiController;
|
|
use App\Modules\Chatbot\Http\Controllers\Admin\ChatbotController;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Chatbot Module - Public Routes (API endpoints for AJAX)
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
Route::post('/chatbot/register', [ChatbotApiController::class, 'registerVisitor'])
|
|
->middleware('throttle:10,1')
|
|
->name('chatbot.register');
|
|
Route::post('/chatbot/send', [ChatbotApiController::class, 'sendMessage'])
|
|
->middleware('throttle:30,1')
|
|
->name('chatbot.send');
|
|
Route::post('/chatbot/end', [ChatbotApiController::class, 'endConversation'])
|
|
->middleware('throttle:10,1')
|
|
->name('chatbot.end');
|
|
Route::post('/chatbot/rate', [ChatbotApiController::class, 'rateConversation'])
|
|
->middleware('throttle:5,1')
|
|
->name('chatbot.rate');
|
|
Route::get('/chatbot/status', [ChatbotApiController::class, 'getStatus'])
|
|
->middleware('throttle:60,1')
|
|
->name('chatbot.status');
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Chatbot Module - Admin Routes
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
|
|
Route::middleware(['auth', 'verified'])->prefix('admin')->name('admin.')->group(function () {
|
|
// Chatbot management (permission: chatbot)
|
|
Route::middleware('permission:chatbot')->group(function () {
|
|
Route::get('/chatbot', [ChatbotController::class, 'index'])->name('chatbot.index');
|
|
Route::get('/chatbot/criar', [ChatbotController::class, 'create'])->name('chatbot.create');
|
|
Route::post('/chatbot', [ChatbotController::class, 'store'])->name('chatbot.store');
|
|
Route::get('/chatbot/{chatbot_knowledge}/editar', [ChatbotController::class, 'edit'])->name('chatbot.edit');
|
|
Route::put('/chatbot/{chatbot_knowledge}', [ChatbotController::class, 'update'])->name('chatbot.update');
|
|
Route::delete('/chatbot/{chatbot_knowledge}', [ChatbotController::class, 'destroy'])->name('chatbot.destroy');
|
|
|
|
// Chatbot conversations (contacts)
|
|
Route::get('/chatbot/conversas', [ChatbotController::class, 'conversations'])->name('chatbot.conversations');
|
|
Route::get('/chatbot/conversas/{conversation}', [ChatbotController::class, 'showConversation'])->name('chatbot.conversation.show');
|
|
Route::delete('/chatbot/conversas/{conversation}', [ChatbotController::class, 'destroyConversation'])->name('chatbot.conversation.destroy');
|
|
|
|
// Chatbot settings
|
|
Route::get('/chatbot/configuracoes', [ChatbotController::class, 'settings'])->name('chatbot.settings');
|
|
Route::post('/chatbot/configuracoes', [ChatbotController::class, 'updateSettings'])->name('chatbot.settings.update');
|
|
|
|
// Chatbot AI rules (configurable behavior rules)
|
|
Route::get('/chatbot/regras', [ChatbotController::class, 'rulesIndex'])->name('chatbot.rules.index');
|
|
Route::get('/chatbot/regras/criar', [ChatbotController::class, 'rulesCreate'])->name('chatbot.rules.create');
|
|
Route::post('/chatbot/regras', [ChatbotController::class, 'rulesStore'])->name('chatbot.rules.store');
|
|
Route::get('/chatbot/regras/{rule}/editar', [ChatbotController::class, 'rulesEdit'])->name('chatbot.rules.edit');
|
|
Route::put('/chatbot/regras/{rule}', [ChatbotController::class, 'rulesUpdate'])->name('chatbot.rules.update');
|
|
Route::delete('/chatbot/regras/{rule}', [ChatbotController::class, 'rulesDestroy'])->name('chatbot.rules.destroy');
|
|
});
|
|
});
|