Extract Ladill Servers as standalone app at servers.ladill.com.

VPS and dedicated server ordering, managed panels, SSO, billing, and launcher integration — forked from hosting infrastructure with server-focused routes and dashboard.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-06 19:18:30 +00:00
co-authored by Cursor
commit b6c8ac343f
382 changed files with 67315 additions and 0 deletions
+83
View File
@@ -0,0 +1,83 @@
<?php
use App\Http\Controllers\Auth\SsoLoginController;
use App\Http\Controllers\Hosting\AccountController;
use App\Http\Controllers\Hosting\AfiaController;
use App\Http\Controllers\Hosting\DeveloperController;
use App\Http\Controllers\Hosting\HostingProductController;
use App\Http\Controllers\Hosting\OverviewController;
use App\Http\Controllers\Hosting\SearchController;
use App\Http\Controllers\Hosting\ServerPanelController;
use App\Http\Controllers\Hosting\TeamController;
use App\Http\Controllers\NotificationController;
use Illuminate\Support\Facades\Route;
// Ladill Servers — VPS & dedicated servers (servers.ladill.com).
Route::get('/', fn () => auth()->check()
? redirect()->route('servers.dashboard')
: redirect()->route('sso.connect'))->name('servers.root');
Route::get('/login', [SsoLoginController::class, 'connect'])->name('login');
Route::get('/sso/connect', [SsoLoginController::class, 'connect'])->name('sso.connect');
Route::get('/sso/callback', [SsoLoginController::class, 'callback'])->name('sso.callback');
Route::post('/logout', [SsoLoginController::class, 'logout'])->name('logout');
Route::get('/sso/logout-frontchannel', [SsoLoginController::class, 'frontchannelLogout'])->name('sso.logout-frontchannel');
Route::get('/signed-out', fn () => auth()->check() ? redirect()->route('servers.dashboard') : view('servers.signed-out'))->name('servers.signed-out');
Route::middleware(['auth'])->group(function () {
Route::get('/notifications', [NotificationController::class, 'index'])->name('notifications.index');
Route::get('/notifications/unread', [NotificationController::class, 'unread'])->name('notifications.unread');
Route::post('/notifications/{id}/read', [NotificationController::class, 'markAsRead'])->name('notifications.mark-read');
Route::post('/notifications/mark-all-read', [NotificationController::class, 'markAllAsRead'])->name('notifications.mark-all-read');
Route::get('/search', SearchController::class)->name('servers.search');
Route::get('/dashboard', [OverviewController::class, 'index'])->name('servers.dashboard');
Route::get('/vps', [HostingProductController::class, 'vps'])->name('servers.vps');
Route::get('/dedicated', [HostingProductController::class, 'dedicated'])->name('servers.dedicated');
Route::redirect('/hosting/vps', '/vps');
Route::redirect('/hosting/dedicated', '/dedicated');
Route::redirect('/hosting', '/dashboard');
Route::get('/orders/{order}', [HostingProductController::class, 'show'])->name('servers.orders.show')->where('order', '[0-9]+');
Route::get('/hosting/orders/{order}', fn (int $order) => redirect()->route('servers.orders.show', $order))->where('order', '[0-9]+');
Route::post('/orders', [HostingProductController::class, 'storeServer'])->name('servers.orders.store');
Route::post('/hosting/orders', [HostingProductController::class, 'storeServer'])->name('hosting.servers.store');
Route::post('/orders/{order}/cancel', [HostingProductController::class, 'cancel'])->name('servers.orders.cancel')->where('order', '[0-9]+');
Route::post('/hosting/orders/{order}/cancel', [HostingProductController::class, 'cancel'])->name('hosting.orders.cancel')->where('order', '[0-9]+');
Route::prefix('orders/{order}/panel')->where(['order' => '[0-9]+'])->group(function () {
Route::get('/', [ServerPanelController::class, 'show'])->name('hosting.server-panel.show');
Route::get('/{path}', [ServerPanelController::class, 'show'])->where('path', '.*')->name('hosting.server-panel.show.path');
Route::post('/sync', [ServerPanelController::class, 'sync'])->name('hosting.server-panel.sync');
Route::post('/power/{action}', [ServerPanelController::class, 'power'])->whereIn('action', ['start', 'stop', 'reboot'])->name('hosting.server-panel.power');
Route::post('/tasks/domain', [ServerPanelController::class, 'queueDomain'])->name('hosting.server-panel.tasks.domain');
Route::post('/tasks/database', [ServerPanelController::class, 'queueDatabase'])->name('hosting.server-panel.tasks.database');
Route::post('/tasks/ssl', [ServerPanelController::class, 'queueSsl'])->name('hosting.server-panel.tasks.ssl');
Route::post('/tasks/file', [ServerPanelController::class, 'queueFile'])->name('hosting.server-panel.tasks.file');
Route::post('/tasks/php', [ServerPanelController::class, 'queuePhp'])->name('hosting.server-panel.tasks.php');
Route::post('/tasks/site-delete', [ServerPanelController::class, 'queueSiteDelete'])->name('hosting.server-panel.tasks.site-delete');
Route::post('/tasks/cron', [ServerPanelController::class, 'queueCron'])->name('hosting.server-panel.tasks.cron');
Route::post('/tasks/log', [ServerPanelController::class, 'queueLog'])->name('hosting.server-panel.tasks.log');
});
Route::get('/account/wallet', [AccountController::class, 'wallet'])->name('account.wallet');
Route::get('/account/billing', [AccountController::class, 'billing'])->name('account.billing');
Route::get('/account/settings', [AccountController::class, 'settings'])->name('account.settings');
Route::put('/account/settings', [AccountController::class, 'updateSettings'])->name('account.settings.update');
Route::get('/account/team', [TeamController::class, 'index'])->name('account.team');
Route::post('/account/team', [TeamController::class, 'store'])->name('account.team.store');
Route::patch('/account/team/{member}/role', [TeamController::class, 'updateRole'])->name('account.team.role');
Route::delete('/account/team/{member}', [TeamController::class, 'destroy'])->name('account.team.destroy');
Route::post('/account/switch', [TeamController::class, 'switchAccount'])->name('account.switch');
Route::get('/account/developers', [DeveloperController::class, 'index'])->name('account.developers');
Route::post('/account/developers', [DeveloperController::class, 'store'])->name('account.developers.store');
Route::delete('/account/developers/{token}', [DeveloperController::class, 'destroy'])->whereNumber('token')->name('account.developers.destroy');
Route::post('/afia/chat', [AfiaController::class, 'chat'])->name('servers.afia.chat');
});