Page Stubs and Click-Through Flow

This commit is contained in:
2026-02-03 10:14:00 +01:00
parent 3684d9ef6b
commit e8be239c32
27 changed files with 595 additions and 31 deletions

View File

@@ -3,16 +3,36 @@
declare(strict_types=1);
use App\Http\Controllers\Auth\SocialiteController;
use App\Http\Controllers\LandingController;
use App\Http\Controllers\ScreeningController;
use App\Http\Controllers\SessionController;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
Route::get('/', fn () => Inertia::render('Landing'))->name('landing');
// Landing page (public)
Route::get('/', [LandingController::class, 'index'])->name('landing');
// Authentication routes
Route::get('/login', [SocialiteController::class, 'redirect'])->name('login');
Route::get('/auth/callback', [SocialiteController::class, 'callback']);
Route::post('/logout', [SocialiteController::class, 'logout'])->name('logout')->middleware('auth');
// Questionnaire routes (authenticated)
Route::middleware('auth')->group(function () {
// Screening routes
Route::post('/screening', [ScreeningController::class, 'store'])->name('screening.store');
Route::get('/screening/{screening}', [ScreeningController::class, 'show'])->name('screening.show');
Route::put('/screening/{screening}', [ScreeningController::class, 'update'])->name('screening.update');
Route::get('/screening/{screening}/result', [ScreeningController::class, 'result'])->name('screening.result');
// Session routes (with history encryption)
Route::middleware('encrypt.history')->group(function () {
Route::post('/sessions', [SessionController::class, 'store'])->name('sessions.store');
Route::get('/sessions/{session}', [SessionController::class, 'show'])->name('sessions.show');
Route::put('/sessions/{session}', [SessionController::class, 'update'])->name('sessions.update');
Route::get('/sessions/{session}/result', [SessionController::class, 'result'])->name('sessions.result');
});
});
// Dev auto-login route
if (app()->environment('local', 'testing')) {
Route::get('/login-jonathan', function () {