Current state

This commit is contained in:
2026-02-07 08:23:18 +01:00
commit 0a4372c40d
22479 changed files with 1553543 additions and 0 deletions

35
routes/api.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Support\Facades\Route;
/**
* API v1 routes for Artworks module
*
* GET /api/v1/artworks/{slug}
* GET /api/v1/categories/{slug}/artworks
*/
Route::prefix('v1')->name('api.v1.')->group(function () {
// Public browse feed (authoritative tables only)
Route::get('browse', [\App\Http\Controllers\Api\BrowseController::class, 'index'])
->name('browse');
// Browse by content type + category path (slug-based)
Route::get('browse/{contentTypeSlug}/{categoryPath}', [\App\Http\Controllers\Api\BrowseController::class, 'byCategoryPath'])
->where('contentTypeSlug', '[a-z0-9\-]+')
->where('categoryPath', '.+')
->name('browse.category');
// Browse by content type only (slug-based)
Route::get('browse/{contentTypeSlug}', [\App\Http\Controllers\Api\BrowseController::class, 'byContentType'])
->where('contentTypeSlug', '[a-z0-9\-]+')
->name('browse.content_type');
// Public artwork by slug
Route::get('artworks/{slug}', [\App\Http\Controllers\Api\ArtworkController::class, 'show'])
->where('slug', '[A-Za-z0-9\-]+')
->name('artworks.show');
// Category artworks (Category route-model binding uses slug)
Route::get('categories/{category}/artworks', [\App\Http\Controllers\Api\ArtworkController::class, 'categoryArtworks'])
->name('categories.artworks');
});

59
routes/auth.php Normal file
View File

@@ -0,0 +1,59 @@
<?php
use App\Http\Controllers\Auth\AuthenticatedSessionController;
use App\Http\Controllers\Auth\ConfirmablePasswordController;
use App\Http\Controllers\Auth\EmailVerificationNotificationController;
use App\Http\Controllers\Auth\EmailVerificationPromptController;
use App\Http\Controllers\Auth\NewPasswordController;
use App\Http\Controllers\Auth\PasswordController;
use App\Http\Controllers\Auth\PasswordResetLinkController;
use App\Http\Controllers\Auth\RegisteredUserController;
use App\Http\Controllers\Auth\VerifyEmailController;
use Illuminate\Support\Facades\Route;
Route::middleware('guest')->group(function () {
Route::get('register', [RegisteredUserController::class, 'create'])
->name('register');
Route::post('register', [RegisteredUserController::class, 'store']);
Route::get('login', [AuthenticatedSessionController::class, 'create'])
->name('login');
Route::post('login', [AuthenticatedSessionController::class, 'store']);
Route::get('forgot-password', [PasswordResetLinkController::class, 'create'])
->name('password.request');
Route::post('forgot-password', [PasswordResetLinkController::class, 'store'])
->name('password.email');
Route::get('reset-password/{token}', [NewPasswordController::class, 'create'])
->name('password.reset');
Route::post('reset-password', [NewPasswordController::class, 'store'])
->name('password.store');
});
Route::middleware('auth')->group(function () {
Route::get('verify-email', EmailVerificationPromptController::class)
->name('verification.notice');
Route::get('verify-email/{id}/{hash}', VerifyEmailController::class)
->middleware(['signed', 'throttle:6,1'])
->name('verification.verify');
Route::post('email/verification-notification', [EmailVerificationNotificationController::class, 'store'])
->middleware('throttle:6,1')
->name('verification.send');
Route::get('confirm-password', [ConfirmablePasswordController::class, 'show'])
->name('password.confirm');
Route::post('confirm-password', [ConfirmablePasswordController::class, 'store']);
Route::put('password', [PasswordController::class, 'update'])->name('password.update');
Route::post('logout', [AuthenticatedSessionController::class, 'destroy'])
->name('logout');
});

8
routes/console.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');

81
routes/legacy.php Normal file
View File

@@ -0,0 +1,81 @@
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Legacy\HomeController;
use App\Http\Controllers\Legacy\ArtController;
use App\Http\Controllers\Legacy\AvatarController;
use App\Http\Controllers\Legacy\ForumController;
use App\Http\Controllers\Legacy\NewsController;
use App\Http\Controllers\Legacy\CategoryController;
use App\Http\Controllers\Legacy\BrowseController;
use App\Http\Controllers\Legacy\FeaturedArtworksController;
use App\Http\Controllers\Legacy\DailyUploadsController;
use App\Http\Controllers\Legacy\ChatController;
use App\Http\Controllers\Legacy\ProfileController as LegacyProfileController;
use App\Http\Controllers\Legacy\TopFavouritesController;
use App\Http\Controllers\Legacy\TopAuthorsController;
use App\Http\Controllers\Legacy\TodayInHistoryController;
use App\Http\Controllers\Legacy\TodayDownloadsController;
use App\Http\Controllers\Legacy\MonthlyCommentatorsController;
use App\Http\Controllers\Legacy\MembersController;
use App\Http\Controllers\Legacy\LatestController;
use App\Http\Controllers\Legacy\LatestCommentsController;
use App\Http\Controllers\Legacy\InterviewController;
use App\Http\Controllers\BrowseCategoriesController;
// Legacy site routes
Route::get('/', [HomeController::class, 'index'])->name('legacy.home');
Route::get('/home', [HomeController::class, 'index']);
Route::get('/art/{id}/{slug?}', [ArtController::class, 'show'])->where('id', '\\d+')->name('legacy.art.show');
Route::match(['get','post'], '/art/{id}/comment', [ArtController::class, 'show'])->where('id', '\\d+');
Route::get('/avatar/{id}/{name?}', [AvatarController::class, 'show'])->where('id', '\\d+')->name('legacy.avatar');
Route::get('/forum', [ForumController::class, 'index'])->name('legacy.forum.index');
Route::get('/forum/{topic_id}/{slug?}', [ForumController::class, 'topic'])->where('topic_id', '\\d+')->name('legacy.forum.topic');
Route::get('/news/{id}/{slug?}', [NewsController::class, 'show'])->where('id', '\\d+')->name('legacy.news.show');
Route::get('/categories', [CategoryController::class, 'index'])->name('legacy.categories');
Route::get('/category/{group}/{slug?}/{id?}', [CategoryController::class, 'show'])->name('legacy.category');
// Short legacy routes for top-level category URLs like /Photography/3
// Short legacy routes for top-level category URLs (mapped to CategoryController@show)
Route::get('/Photography/{id}', [CategoryController::class, 'show'])
->defaults('group', 'Photography')
->where('id', '\\d+');
Route::get('/Wallpapers/{id}', [CategoryController::class, 'show'])
->defaults('group', 'Wallpapers')
->where('id', '\\d+');
Route::get('/Skins/{id}', [CategoryController::class, 'show'])
->defaults('group', 'Skins')
->where('id', '\\d+');
Route::get('/Other/{id}', [CategoryController::class, 'show'])
->defaults('group', 'Other')
->where('id', '\\d+');
Route::get('/browse', [BrowseController::class, 'index'])->name('legacy.browse');
Route::get('/featured', [FeaturedArtworksController::class, 'index'])->name('legacy.featured');
Route::get('/featured-artworks', [FeaturedArtworksController::class, 'index'])->name('legacy.featured_artworks');
Route::get('/daily-uploads', [DailyUploadsController::class, 'index'])->name('legacy.daily_uploads');
Route::get('/chat', [ChatController::class, 'index'])->name('legacy.chat');
Route::get('/browse-categories', [BrowseCategoriesController::class, 'index'])->name('browse.categories');
Route::get('/profile/{username?}', [LegacyProfileController::class, 'show'])->name('legacy.profile');
Route::get('/top-favourites', [TopFavouritesController::class, 'index'])->name('legacy.top_favourites');
Route::get('/top-authors', [TopAuthorsController::class, 'index'])->name('legacy.top_authors');
Route::get('/today-in-history', [TodayInHistoryController::class, 'index'])->name('legacy.today_in_history');
Route::get('/today-downloads', [TodayDownloadsController::class, 'index'])->name('legacy.today_downloads');
Route::get('/monthly-commentators', [MonthlyCommentatorsController::class, 'index'])->name('legacy.monthly_commentators');
Route::get('/members', [MembersController::class, 'index'])->name('legacy.members');
Route::get('/latest', [LatestController::class, 'index'])->name('legacy.latest');
Route::get('/latest-comments', [LatestCommentsController::class, 'index'])->name('legacy.latest_comments');
Route::get('/interviews', [InterviewController::class, 'index'])->name('legacy.interviews');

55
routes/web.php Normal file
View File

@@ -0,0 +1,55 @@
<?php
use App\Http\Controllers\ProfileController;
use Illuminate\Support\Facades\Route;
// Legacy routes are defined in routes/legacy.php and provide the site's
// legacy pages (art, forum, news, profile, etc.). We keep the auth routes
// and dashboard as before.
require __DIR__.'/legacy.php';
Route::get('/dashboard', function () {
return view('dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
});
require __DIR__.'/auth.php';
// Artwork public show (slug-based). This must come before the category route so the artwork
// slug (last segment) is matched correctly while allowing multi-segment category paths.
Route::get('/{contentTypeSlug}/{categoryPath}/{artwork}', [\App\Http\Controllers\ArtworkController::class, 'show'])
->where([
'contentTypeSlug' => 'photography|wallpapers|skins|other',
'categoryPath' => '.*',
'artwork' => '[A-Za-z0-9\-]+'
])
->name('artworks.show');
// New slug-based category routes (e.g., /photography/audio/winamp)
Route::get('/{contentTypeSlug}/{categoryPath?}', [\App\Http\Controllers\CategoryPageController::class, 'show'])
->where('contentTypeSlug', 'photography|wallpapers|skins|other')
->where('categoryPath', '.*')
->name('category.slug');
use App\Http\Controllers\ManageController;
Route::middleware(['auth'])->group(function () {
Route::get('/manage', [ManageController::class, 'index'])->name('manage');
Route::get('/manage/edit/{id}', [ManageController::class, 'edit'])->name('manage.edit');
Route::post('/manage/update/{id}', [ManageController::class, 'update'])->name('manage.update');
Route::post('/manage/delete/{id}', [ManageController::class, 'destroy'])->name('manage.destroy');
});
// Admin routes for artworks (separated from public routes)
Route::middleware(['auth'])->prefix('admin')->name('admin.')->group(function () {
Route::resource('artworks', \App\Http\Controllers\Admin\ArtworkController::class)->except(['show']);
});