Ghassan Yusuf 2a2fac9cdf Add Roles/MQTT-settings/Backup pages, AdminLTE demo shells, and a separate mobile design system
Backend: real endpoints for role-permission overview, MQTT broker settings
(with live reachability check), and SQLite backup download/restore (new
system.manage permission, super-admin only; restore validates the SQLite
file header and keeps a pre-restore safety copy).

Desktop frontend: Roles (read-only permissions view), MQTT Settings,
Backup & Restore wired to those endpoints; plus static AdminLTE-matching
shells for Profile, Settings (embeds the real 2FA flow in its Security
tab), Invoice, Calendar (FullCalendar), Chat, File Manager, and Projects.

Mobile frontend: new frontend/src/styles/mobile.css, a from-scratch design
system (purple theme, cards, slide-out sidebar, bottom tab bar) scoped
entirely under a .mob-app root and mob- prefixed classes so it can never
collide with the desktop Bootstrap/AdminLTE styling. Rebuilt TopBar/
BottomNav, added a new SlideOutNav, and reskinned the Dashboard and Users
pages to it with real data.
2026-08-04 14:51:28 +03:00

42 lines
2.0 KiB
PHP

<?php
use App\Http\Controllers\Api\AuthController;
use App\Http\Controllers\Api\BackupController;
use App\Http\Controllers\Api\DashboardController;
use App\Http\Controllers\Api\MqttController;
use App\Http\Controllers\Api\RoleController;
use App\Http\Controllers\Api\UserController;
use Illuminate\Support\Facades\Route;
Route::prefix('v1')->middleware('throttle:api')->group(function () {
Route::post('/auth/login', [AuthController::class, 'login']);
Route::post('/auth/2fa/verify', [AuthController::class, 'verifyTwoFactor']);
Route::middleware('auth:sanctum')->group(function () {
Route::post('/auth/logout', [AuthController::class, 'logout']);
Route::get('/auth/me', [AuthController::class, 'me']);
Route::post('/auth/2fa/enable', [AuthController::class, 'enableTwoFactor']);
Route::post('/auth/2fa/confirm', [AuthController::class, 'confirmTwoFactor']);
Route::post('/auth/2fa/disable', [AuthController::class, 'disableTwoFactor']);
Route::get('/mqtt/token', [MqttController::class, 'token']);
Route::get('/mqtt/settings', [MqttController::class, 'settings']);
Route::get('/roles', [RoleController::class, 'index']);
Route::get('/roles/overview', [RoleController::class, 'overview']);
Route::get('/users', [UserController::class, 'index']);
Route::post('/users', [UserController::class, 'store']);
Route::get('/users/{user}', [UserController::class, 'show']);
Route::patch('/users/{user}', [UserController::class, 'update']);
Route::delete('/users/{user}', [UserController::class, 'destroy']);
Route::patch('/users/{user}/role', [UserController::class, 'assignRole']);
Route::get('/dashboard/stats', [DashboardController::class, 'stats']);
Route::get('/dashboard/activity', [DashboardController::class, 'activity']);
Route::get('/backup/download', [BackupController::class, 'download']);
Route::post('/backup/restore', [BackupController::class, 'restore']);
});
});